Stop inlining the SupportsWasmSimd128 function

Change-Id: Id9b69f960887f55d26842ecad57c43367c7ddfcd
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2704951
Reviewed-by: Zhi An Ng <zhin@chromium.org>
Commit-Queue: Deepti Gandluri <gdeepti@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73083}
This commit is contained in:
Deepti Gandluri 2021-02-18 20:59:36 -08:00 committed by Commit Bot
parent 8bc2cfb749
commit 9960f69ffd
19 changed files with 29 additions and 30 deletions

View File

@ -49,8 +49,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return true; }
bool CpuFeatures::SupportsWasmSimd128() { return IsSupported(NEON); }
int DoubleRegister::SupportedRegisterCount() {
return CpuFeatures::IsSupported(VFP32DREGS) ? 32 : 16;
}

View File

@ -198,6 +198,8 @@ static constexpr unsigned CpuFeaturesFromCompiler() {
#endif
}
bool CpuFeatures::SupportsWasmSimd128() { return IsSupported(NEON); }
void CpuFeatures::ProbeImpl(bool cross_compile) {
dcache_line_size_ = 64;

View File

@ -19,8 +19,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return true; }
bool CpuFeatures::SupportsWasmSimd128() { return true; }
void RelocInfo::apply(intptr_t delta) {
// On arm64 only internal references and immediate branches need extra work.
if (RelocInfo::IsInternalReference(rmode_)) {

View File

@ -82,6 +82,7 @@ constexpr unsigned CpuFeaturesFromTargetOS() {
// -----------------------------------------------------------------------------
// CpuFeatures implementation.
bool CpuFeatures::SupportsWasmSimd128() { return true; }
void CpuFeatures::ProbeImpl(bool cross_compile) {
// Only use statically determined features for cross compile (snapshot).

View File

@ -108,9 +108,9 @@ class V8_EXPORT_PRIVATE CpuFeatures : public AllStatic {
return (supported_ & (1u << f)) != 0;
}
static inline bool SupportsOptimizer();
static bool SupportsWasmSimd128();
static inline bool SupportsWasmSimd128();
static inline bool SupportsOptimizer();
static inline unsigned icache_line_size() {
DCHECK_NE(icache_line_size_, 0);

View File

@ -49,12 +49,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return true; }
bool CpuFeatures::SupportsWasmSimd128() {
if (IsSupported(SSE4_1)) return true;
if (FLAG_wasm_simd_ssse3_codegen && IsSupported(SSSE3)) return true;
return false;
}
// The modes possibly affected by apply must be in kApplyMask.
void RelocInfo::apply(intptr_t delta) {
DCHECK_EQ(kApplyMask, (RelocInfo::ModeMask(RelocInfo::CODE_TARGET) |

View File

@ -122,6 +122,12 @@ bool OSHasAVXSupport() {
} // namespace
bool CpuFeatures::SupportsWasmSimd128() {
if (IsSupported(SSE4_1)) return true;
if (FLAG_wasm_simd_ssse3_codegen && IsSupported(SSSE3)) return true;
return false;
}
void CpuFeatures::ProbeImpl(bool cross_compile) {
base::CPU cpu;
CHECK(cpu.has_sse2()); // SSE2 support is mandatory.

View File

@ -47,8 +47,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return IsSupported(FPU); }
bool CpuFeatures::SupportsWasmSimd128() { return IsSupported(MIPS_SIMD); }
// -----------------------------------------------------------------------------
// Operand and MemOperand.

View File

@ -67,6 +67,8 @@ static unsigned CpuFeaturesImpliedByCompiler() {
return answer;
}
bool CpuFeatures::SupportsWasmSimd128() { return IsSupported(MIPS_SIMD); }
void CpuFeatures::ProbeImpl(bool cross_compile) {
supported_ |= CpuFeaturesImpliedByCompiler();

View File

@ -47,8 +47,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return IsSupported(FPU); }
bool CpuFeatures::SupportsWasmSimd128() { return IsSupported(MIPS_SIMD); }
// -----------------------------------------------------------------------------
// Operand and MemOperand.

View File

@ -67,6 +67,8 @@ static unsigned CpuFeaturesImpliedByCompiler() {
return answer;
}
bool CpuFeatures::SupportsWasmSimd128() { return IsSupported(MIPS_SIMD); }
void CpuFeatures::ProbeImpl(bool cross_compile) {
supported_ |= CpuFeaturesImpliedByCompiler();

View File

@ -48,8 +48,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return true; }
bool CpuFeatures::SupportsWasmSimd128() { return false; }
void RelocInfo::apply(intptr_t delta) {
// absolute code pointer inside code object moves with the code object.
if (IsInternalReference(rmode_)) {

View File

@ -54,6 +54,8 @@ static unsigned CpuFeaturesImpliedByCompiler() {
return answer;
}
bool CpuFeatures::SupportsWasmSimd128() { return false; }
void CpuFeatures::ProbeImpl(bool cross_compile) {
supported_ |= CpuFeaturesImpliedByCompiler();
icache_line_size_ = 128;

View File

@ -45,8 +45,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return IsSupported(FPU); }
bool CpuFeatures::SupportsWasmSimd128() { return IsSupported(RISCV_SIMD); }
// -----------------------------------------------------------------------------
// Operand and MemOperand.

View File

@ -60,6 +60,8 @@ static unsigned CpuFeaturesImpliedByCompiler() {
return answer;
}
bool CpuFeatures::SupportsWasmSimd128() { return IsSupported(RISCV_SIMD); }
void CpuFeatures::ProbeImpl(bool cross_compile) {
supported_ |= CpuFeaturesImpliedByCompiler();

View File

@ -48,10 +48,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return true; }
bool CpuFeatures::SupportsWasmSimd128() {
return CpuFeatures::IsSupported(VECTOR_ENHANCE_FACILITY_1);
}
void RelocInfo::apply(intptr_t delta) {
// Absolute code pointer inside code object moves with the code object.
if (IsInternalReference(rmode_)) {

View File

@ -159,6 +159,10 @@ static bool supportsSTFLE() {
#endif
}
bool CpuFeatures::SupportsWasmSimd128() {
return CpuFeatures::IsSupported(VECTOR_ENHANCE_FACILITY_1);
}
void CpuFeatures::ProbeImpl(bool cross_compile) {
supported_ |= CpuFeaturesImpliedByCompiler();
icache_line_size_ = 256;

View File

@ -17,12 +17,6 @@ namespace internal {
bool CpuFeatures::SupportsOptimizer() { return true; }
bool CpuFeatures::SupportsWasmSimd128() {
if (IsSupported(SSE4_1)) return true;
if (FLAG_wasm_simd_ssse3_codegen && IsSupported(SSSE3)) return true;
return false;
}
// -----------------------------------------------------------------------------
// Implementation of Assembler

View File

@ -71,6 +71,12 @@ bool OSHasAVXSupport() {
} // namespace
bool CpuFeatures::SupportsWasmSimd128() {
if (IsSupported(SSE4_1)) return true;
if (FLAG_wasm_simd_ssse3_codegen && IsSupported(SSSE3)) return true;
return false;
}
void CpuFeatures::ProbeImpl(bool cross_compile) {
base::CPU cpu;
CHECK(cpu.has_sse2()); // SSE2 support is mandatory.