Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/compiler/int64-lowering.cc

Issue 2428583002: [wasm] Break effect cycles in the Int64Lowering. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/int64-lowering.h" 5 #include "src/compiler/int64-lowering.h"
6 #include "src/compiler/common-operator.h" 6 #include "src/compiler/common-operator.h"
7 #include "src/compiler/diamond.h" 7 #include "src/compiler/diamond.h"
8 #include "src/compiler/graph.h" 8 #include "src/compiler/graph.h"
9 #include "src/compiler/linkage.h" 9 #include "src/compiler/linkage.h"
10 #include "src/compiler/machine-operator.h" 10 #include "src/compiler/machine-operator.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 LowerNode(top.node); 54 LowerNode(top.node);
55 } else { 55 } else {
56 // Push the next input onto the stack. 56 // Push the next input onto the stack.
57 Node* input = top.node->InputAt(top.input_index++); 57 Node* input = top.node->InputAt(top.input_index++);
58 if (state_.Get(input) == State::kUnvisited) { 58 if (state_.Get(input) == State::kUnvisited) {
59 if (input->opcode() == IrOpcode::kPhi) { 59 if (input->opcode() == IrOpcode::kPhi) {
60 // To break cycles with phi nodes we push phis on a separate stack so 60 // To break cycles with phi nodes we push phis on a separate stack so
61 // that they are processed after all other nodes. 61 // that they are processed after all other nodes.
62 PreparePhiReplacement(input); 62 PreparePhiReplacement(input);
63 stack_.push_front({input, 0}); 63 stack_.push_front({input, 0});
64 } else if (input->opcode() == IrOpcode::kEffectPhi) {
65 stack_.push_front({input, 0});
64 } else { 66 } else {
65 stack_.push_back({input, 0}); 67 stack_.push_back({input, 0});
66 } 68 }
67 state_.Set(input, State::kOnStack); 69 state_.Set(input, State::kOnStack);
68 } 70 }
69 } 71 }
70 } 72 }
71 } 73 }
72 74
73 static int GetParameterIndexAfterLowering( 75 static int GetParameterIndexAfterLowering(
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after
886 common()->Phi(MachineRepresentation::kWord32, value_count), 888 common()->Phi(MachineRepresentation::kWord32, value_count),
887 value_count + 1, inputs_low, false), 889 value_count + 1, inputs_low, false),
888 graph()->NewNode( 890 graph()->NewNode(
889 common()->Phi(MachineRepresentation::kWord32, value_count), 891 common()->Phi(MachineRepresentation::kWord32, value_count),
890 value_count + 1, inputs_high, false)); 892 value_count + 1, inputs_high, false));
891 } 893 }
892 } 894 }
893 } // namespace compiler 895 } // namespace compiler
894 } // namespace internal 896 } // namespace internal
895 } // namespace v8 897 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698