| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |