diff --git a/src/wasm/function-compiler.cc b/src/wasm/function-compiler.cc index b3da2853cb..f285deca1c 100644 --- a/src/wasm/function-compiler.cc +++ b/src/wasm/function-compiler.cc @@ -110,7 +110,7 @@ std::unique_ptr WasmInstructionBuffer::New(size_t size) { // End of PIMPL interface WasmInstructionBuffer for WasmInstBufferImpl // static -ExecutionTier WasmCompilationUnit::GetDefaultExecutionTier( +ExecutionTier WasmCompilationUnit::GetBaselineExecutionTier( const WasmModule* module) { // Liftoff does not support the special asm.js opcodes, thus always compile // asm.js modules with TurboFan. diff --git a/src/wasm/function-compiler.h b/src/wasm/function-compiler.h index 10fa5e3998..9d6d40e140 100644 --- a/src/wasm/function-compiler.h +++ b/src/wasm/function-compiler.h @@ -76,7 +76,7 @@ struct WasmCompilationResult { class V8_EXPORT_PRIVATE WasmCompilationUnit final { public: - static ExecutionTier GetDefaultExecutionTier(const WasmModule*); + static ExecutionTier GetBaselineExecutionTier(const WasmModule*); WasmCompilationUnit(int index, ExecutionTier tier) : func_index_(index), tier_(tier) {} diff --git a/src/wasm/module-compiler.cc b/src/wasm/module-compiler.cc index 2cca8f604f..97b0b507fe 100644 --- a/src/wasm/module-compiler.cc +++ b/src/wasm/module-compiler.cc @@ -668,17 +668,15 @@ ExecutionTierPair GetRequestedExecutionTiers( const WasmFeatures& enabled_features, uint32_t func_index) { ExecutionTierPair result; + result.baseline_tier = WasmCompilationUnit::GetBaselineExecutionTier(module); switch (compile_mode) { case CompileMode::kRegular: - result.baseline_tier = - WasmCompilationUnit::GetDefaultExecutionTier(module); result.top_tier = result.baseline_tier; return result; case CompileMode::kTiering: // Default tiering behaviour. - result.baseline_tier = ExecutionTier::kLiftoff; result.top_tier = ExecutionTier::kTurbofan; // Check if compilation hints override default tiering behaviour. @@ -711,9 +709,7 @@ ExecutionTierPair GetRequestedExecutionTiers( class CompilationUnitBuilder { public: explicit CompilationUnitBuilder(NativeModule* native_module) - : native_module_(native_module), - default_tier_(WasmCompilationUnit::GetDefaultExecutionTier( - native_module->module())) {} + : native_module_(native_module) {} void AddUnits(uint32_t func_index) { if (func_index < native_module_->module()->num_imported_functions) { @@ -775,7 +771,6 @@ class CompilationUnitBuilder { } NativeModule* const native_module_; - const ExecutionTier default_tier_; std::vector baseline_units_; std::vector tiering_units_; std::vector>