| 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) { | 64 } else if (input->opcode() == IrOpcode::kEffectPhi || |
| 65 input->opcode() == IrOpcode::kLoop) { |
| 65 stack_.push_front({input, 0}); | 66 stack_.push_front({input, 0}); |
| 66 } else { | 67 } else { |
| 67 stack_.push_back({input, 0}); | 68 stack_.push_back({input, 0}); |
| 68 } | 69 } |
| 69 state_.Set(input, State::kOnStack); | 70 state_.Set(input, State::kOnStack); |
| 70 } | 71 } |
| 71 } | 72 } |
| 72 } | 73 } |
| 73 } | 74 } |
| 74 | 75 |
| (...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 888 common()->Phi(MachineRepresentation::kWord32, value_count), | 889 common()->Phi(MachineRepresentation::kWord32, value_count), |
| 889 value_count + 1, inputs_low, false), | 890 value_count + 1, inputs_low, false), |
| 890 graph()->NewNode( | 891 graph()->NewNode( |
| 891 common()->Phi(MachineRepresentation::kWord32, value_count), | 892 common()->Phi(MachineRepresentation::kWord32, value_count), |
| 892 value_count + 1, inputs_high, false)); | 893 value_count + 1, inputs_high, false)); |
| 893 } | 894 } |
| 894 } | 895 } |
| 895 } // namespace compiler | 896 } // namespace compiler |
| 896 } // namespace internal | 897 } // namespace internal |
| 897 } // namespace v8 | 898 } // namespace v8 |
| OLD | NEW |