| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 63b58bc commit b9d806a
31 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -37,7 +37,7 @@ | |||
| 37 | 37 | ||
| 38 | 38 | # Reset this number to 0 on major V8 upgrades. | |
| 39 | 39 | # Increment by one for each non-official patch applied to deps/v8. | |
| 40 | - 'v8_embedder_string': '-node.6', | ||
| 40 | + 'v8_embedder_string': '-node.7', | ||
| 41 | 41 | ||
| 42 | 42 | ##### V8 defaults for Node.js ##### | |
| 43 | 43 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -2782,10 +2782,9 @@ TNode<Word32T> WeakCollectionsBuiltinsAssembler::ShouldShrink( | |||
| 2782 | 2782 | ||
| 2783 | 2783 | TNode<IntPtrT> WeakCollectionsBuiltinsAssembler::ValueIndexFromKeyIndex( | |
| 2784 | 2784 | TNode<IntPtrT> key_index) { | |
| 2785 | - return IntPtrAdd( | ||
| 2786 | - key_index, | ||
| 2787 | - IntPtrConstant(EphemeronHashTable::TodoShape::kEntryValueIndex - | ||
| 2788 | - EphemeronHashTable::kEntryKeyIndex)); | ||
| 2785 | + return IntPtrAdd(key_index, | ||
| 2786 | + IntPtrConstant(EphemeronHashTable::ShapeT::kEntryValueIndex - | ||
| 2787 | + EphemeronHashTable::kEntryKeyIndex)); | ||
| 2789 | 2788 | } | |
| 2790 | 2789 | ||
| 2791 | 2790 | TF_BUILTIN(WeakMapConstructor, WeakCollectionsBuiltinsAssembler) { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -9455,7 +9455,7 @@ void CodeStubAssembler::NameDictionaryLookup( | |||
| 9455 | 9455 | CAST(UnsafeLoadFixedArrayElement(dictionary, index)); | |
| 9456 | 9456 | GotoIf(TaggedEqual(current, undefined), if_not_found); | |
| 9457 | 9457 | if (mode == kFindExisting) { | |
| 9458 | - if (Dictionary::TodoShape::kMatchNeedsHoleCheck) { | ||
| 9458 | + if (Dictionary::ShapeT::kMatchNeedsHoleCheck) { | ||
| 9459 | 9459 | GotoIf(TaggedEqual(current, TheHoleConstant()), &next_probe); | |
| 9460 | 9460 | } | |
| 9461 | 9461 | current = LoadName<Dictionary>(current); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3934,8 +3934,14 @@ class TSAssembler | |||
| 3934 | 3934 | : public Assembler<reducer_list<TurboshaftAssemblerOpInterface, Reducers..., | |
| 3935 | 3935 | TSReducerBase>> { | |
| 3936 | 3936 | public: | |
| 3937 | + #ifdef _WIN32 | ||
| 3938 | + explicit TSAssembler(Graph& input_graph, Graph& output_graph, | ||
| 3939 | + Zone* phase_zone) | ||
| 3940 | + : Assembler(input_graph, output_graph, phase_zone) {} | ||
| 3941 | + #else | ||
| 3937 | 3942 | using Assembler<reducer_list<TurboshaftAssemblerOpInterface, Reducers..., | |
| 3938 | 3943 | TSReducerBase>>::Assembler; | |
| 3944 | + #endif | ||
| 3939 | 3945 | }; | |
| 3940 | 3946 | ||
| 3941 | 3947 | #include "src/compiler/turboshaft/undef-assembler-macros.inc" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,8 @@ void CodeEliminationAndSimplificationPhase::Run(Zone* temp_zone) { | |||
| 32 | 32 | // (which, for simplificy, doesn't use the Assembler helper | |
| 33 | 33 | // methods, but only calls Next::ReduceLoad/Store). | |
| 34 | 34 | DuplicationOptimizationReducer, | |
| 35 | - ValueNumberingReducer>::Run(temp_zone); | ||
| 35 | + VariableReducerHotfix, | ||
| 36 | + ValueNumberingReducer>::Run<false>(temp_zone); | ||
| 36 | 37 | } | |
| 37 | 38 | ||
| 38 | 39 | } // namespace v8::internal::compiler::turboshaft | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -36,6 +36,18 @@ struct PaddingSpace { | |||
| 36 | 36 | V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, | |
| 37 | 37 | PaddingSpace padding); | |
| 38 | 38 | ||
| 39 | + template <class Next> | ||
| 40 | + class VariableReducerHotfix : public Next { | ||
| 41 | + public: | ||
| 42 | + TURBOSHAFT_REDUCER_BOILERPLATE() | ||
| 43 | + | ||
| 44 | + void SetVariable(Variable var, OpIndex new_index) {} | ||
| 45 | + Variable NewLoopInvariantVariable(MaybeRegisterRepresentation rep) { return Variable(); } | ||
| 46 | + | ||
| 47 | + OpIndex GetVariable(Variable var) { return OpIndex(); } | ||
| 48 | + OpIndex GetPredecessorValue(Variable var, int predecessor_index) { return OpIndex(); } | ||
| 49 | + }; | ||
| 50 | + | ||
| 39 | 51 | template <typename Next> | |
| 40 | 52 | class ReducerBaseForwarder; | |
| 41 | 53 | template <typename Next> | |
@@ -46,6 +58,9 @@ class GraphVisitor : public Next { | |||
| 46 | 58 | template <typename N> | |
| 47 | 59 | friend class ReducerBaseForwarder; | |
| 48 | 60 | ||
| 61 | + private: | ||
| 62 | + bool contains_variable_reducer_; | ||
| 63 | + | ||
| 49 | 64 | public: | |
| 50 | 65 | TURBOSHAFT_REDUCER_BOILERPLATE() | |
| 51 | 66 | ||
@@ -66,7 +81,8 @@ class GraphVisitor : public Next { | |||
| 66 | 81 | // `trace_reduction` is a template parameter to avoid paying for tracing at | |
| 67 | 82 | // runtime. | |
| 68 | 83 | template <bool trace_reduction> | |
| 69 | - void VisitGraph() { | ||
| 84 | + void VisitGraph(bool contains_variable_reducer) { | ||
| 85 | + contains_variable_reducer_ = contains_variable_reducer; | ||
| 70 | 86 | Asm().Analyze(); | |
| 71 | 87 | ||
| 72 | 88 | // Creating initial old-to-new Block mapping. | |
@@ -177,8 +193,7 @@ class GraphVisitor : public Next { | |||
| 177 | 193 | DCHECK(old_index.valid()); | |
| 178 | 194 | OpIndex result = op_mapping_[old_index]; | |
| 179 | 195 | ||
| 180 | - if constexpr (reducer_list_contains<typename Next::ReducerList, | ||
| 181 | - VariableReducer>::value) { | ||
| 196 | + if (contains_variable_reducer_) { | ||
| 182 | 197 | if (!result.valid()) { | |
| 183 | 198 | // {op_mapping} doesn't have a mapping for {old_index}. The assembler | |
| 184 | 199 | // should provide the mapping. | |
@@ -1294,8 +1309,7 @@ class GraphVisitor : public Next { | |||
| 1294 | 1309 | DCHECK(Asm().input_graph().BelongsToThisGraph(old_index)); | |
| 1295 | 1310 | DCHECK_IMPLIES(new_index.valid(), | |
| 1296 | 1311 | Asm().output_graph().BelongsToThisGraph(new_index)); | |
| 1297 | - if constexpr (reducer_list_contains<typename Next::ReducerList, | ||
| 1298 | - VariableReducer>::value) { | ||
| 1312 | + if (contains_variable_reducer_) { | ||
| 1299 | 1313 | if (current_block_needs_variables_) { | |
| 1300 | 1314 | MaybeVariable var = GetVariableFor(old_index); | |
| 1301 | 1315 | if (!var.has_value()) { | |
@@ -1393,29 +1407,30 @@ template <template <class> class... Reducers> | |||
| 1393 | 1407 | class CopyingPhaseImpl { | |
| 1394 | 1408 | public: | |
| 1395 | 1409 | static void Run(Graph& input_graph, Zone* phase_zone, | |
| 1396 | - bool trace_reductions = false) { | ||
| 1410 | + bool contains_variable_reducer, bool trace_reductions = false) { | ||
| 1397 | 1411 | TSAssembler<GraphVisitor, Reducers...> phase( | |
| 1398 | 1412 | input_graph, input_graph.GetOrCreateCompanion(), phase_zone); | |
| 1399 | 1413 | #ifdef DEBUG | |
| 1400 | 1414 | if (trace_reductions) { | |
| 1401 | - phase.template VisitGraph<true>(); | ||
| 1415 | + phase.template VisitGraph<true>(contains_variable_reducer); | ||
| 1402 | 1416 | } else { | |
| 1403 | - phase.template VisitGraph<false>(); | ||
| 1417 | + phase.template VisitGraph<false>(contains_variable_reducer); | ||
| 1404 | 1418 | } | |
| 1405 | 1419 | #else | |
| 1406 | - phase.template VisitGraph<false>(); | ||
| 1420 | + phase.template VisitGraph<false>(contains_variable_reducer); | ||
| 1407 | 1421 | #endif // DEBUG | |
| 1408 | 1422 | } | |
| 1409 | 1423 | }; | |
| 1410 | 1424 | ||
| 1411 | 1425 | template <template <typename> typename... Reducers> | |
| 1412 | 1426 | class CopyingPhase { | |
| 1413 | 1427 | public: | |
| 1428 | + template <bool contains_variable_reducer> | ||
| 1414 | 1429 | static void Run(Zone* phase_zone) { | |
| 1415 | 1430 | PipelineData& data = PipelineData::Get(); | |
| 1416 | 1431 | Graph& input_graph = data.graph(); | |
| 1417 | 1432 | CopyingPhaseImpl<Reducers...>::Run( | |
| 1418 | - input_graph, phase_zone, data.info()->turboshaft_trace_reduction()); | ||
| 1433 | + input_graph, phase_zone, contains_variable_reducer, data.info()->turboshaft_trace_reduction()); | ||
| 1419 | 1434 | } | |
| 1420 | 1435 | }; | |
| 1421 | 1436 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -25,23 +25,23 @@ namespace v8::internal::compiler::turboshaft { | |||
| 25 | 25 | void CsaLoadEliminationPhase::Run(Zone* temp_zone) { | |
| 26 | 26 | CopyingPhase<VariableReducer, MachineOptimizationReducer, | |
| 27 | 27 | RequiredOptimizationReducer, | |
| 28 | - ValueNumberingReducer>::Run(temp_zone); | ||
| 28 | + ValueNumberingReducer>::Run<true>(temp_zone); | ||
| 29 | 29 | ||
| 30 | 30 | CopyingPhase<VariableReducer, LateLoadEliminationReducer, | |
| 31 | 31 | MachineOptimizationReducer, RequiredOptimizationReducer, | |
| 32 | - ValueNumberingReducer>::Run(temp_zone); | ||
| 32 | + ValueNumberingReducer>::Run<true>(temp_zone); | ||
| 33 | 33 | } | |
| 34 | 34 | ||
| 35 | 35 | void CsaLateEscapeAnalysisPhase::Run(Zone* temp_zone) { | |
| 36 | 36 | CopyingPhase<VariableReducer, LateEscapeAnalysisReducer, | |
| 37 | 37 | MachineOptimizationReducer, RequiredOptimizationReducer, | |
| 38 | - ValueNumberingReducer>::Run(temp_zone); | ||
| 38 | + ValueNumberingReducer>::Run<true>(temp_zone); | ||
| 39 | 39 | } | |
| 40 | 40 | ||
| 41 | 41 | void CsaBranchEliminationPhase::Run(Zone* temp_zone) { | |
| 42 | 42 | CopyingPhase<VariableReducer, MachineOptimizationReducer, | |
| 43 | 43 | BranchEliminationReducer, RequiredOptimizationReducer, | |
| 44 | - ValueNumberingReducer>::Run(temp_zone); | ||
| 44 | + ValueNumberingReducer>::Run<true>(temp_zone); | ||
| 45 | 45 | } | |
| 46 | 46 | ||
| 47 | 47 | void CsaOptimizePhase::Run(Zone* temp_zone) { | |
@@ -51,7 +51,7 @@ void CsaOptimizePhase::Run(Zone* temp_zone) { | |||
| 51 | 51 | CopyingPhase<VariableReducer, PretenuringPropagationReducer, | |
| 52 | 52 | MachineOptimizationReducer, MemoryOptimizationReducer, | |
| 53 | 53 | RequiredOptimizationReducer, | |
| 54 | - ValueNumberingReducer>::Run(temp_zone); | ||
| 54 | + ValueNumberingReducer>::Run<true>(temp_zone); | ||
| 55 | 55 | } | |
| 56 | 56 | ||
| 57 | 57 | } // namespace v8::internal::compiler::turboshaft | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -11,7 +11,7 @@ namespace v8::internal::compiler::turboshaft { | |||
| 11 | 11 | ||
| 12 | 12 | void DebugFeatureLoweringPhase::Run(Zone* temp_zone) { | |
| 13 | 13 | #ifdef V8_ENABLE_DEBUG_CODE | |
| 14 | - turboshaft::CopyingPhase<turboshaft::DebugFeatureLoweringReducer>::Run( | ||
| 14 | + turboshaft::CopyingPhase<turboshaft::DebugFeatureLoweringReducer>::Run<false>( | ||
| 15 | 15 | temp_zone); | |
| 16 | 16 | #endif | |
| 17 | 17 | } | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -16,7 +16,7 @@ void Int64LoweringPhase::Run(Zone* temp_zone) { | |||
| 16 | 16 | #if V8_TARGET_ARCH_32_BIT | |
| 17 | 17 | turboshaft::CopyingPhase< | |
| 18 | 18 | turboshaft::Int64LoweringReducer, turboshaft::VariableReducer, | |
| 19 | - turboshaft::RequiredOptimizationReducer>::Run(temp_zone); | ||
| 19 | + turboshaft::RequiredOptimizationReducer>::Run<true>(temp_zone); | ||
| 20 | 20 | #else | |
| 21 | 21 | UNREACHABLE(); | |
| 22 | 22 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -23,7 +23,7 @@ void LoopPeelingPhase::Run(Zone* temp_zone) { | |||
| 23 | 23 | turboshaft::VariableReducer, | |
| 24 | 24 | turboshaft::MachineOptimizationReducer, | |
| 25 | 25 | turboshaft::RequiredOptimizationReducer, | |
| 26 | - turboshaft::ValueNumberingReducer>::Run(temp_zone); | ||
| 26 | + turboshaft::ValueNumberingReducer>::Run<true>(temp_zone); | ||
| 27 | 27 | } | |
| 28 | 28 | ||
| 29 | 29 | } // namespace v8::internal::compiler::turboshaft | |
| Back | FazBrowse Home | New Git URL |
0 commit comments