Chromium Code Reviews| Index: src/compiler/loop-analysis.cc |
| diff --git a/src/compiler/loop-analysis.cc b/src/compiler/loop-analysis.cc |
| index 2a1487136971530e78f88aa43741f7b2a3afbe5a..616bbd342541798425f3cad172358c238f9124f9 100644 |
| --- a/src/compiler/loop-analysis.cc |
| +++ b/src/compiler/loop-analysis.cc |
| @@ -462,6 +462,14 @@ LoopTree* LoopFinder::BuildLoopTree(Graph* graph, Zone* zone) { |
| return loop_tree; |
| } |
| + |
| +Node* LoopTree::HeaderNode(Loop* loop) { |
| + Node* first = *HeaderNodes(loop).begin(); |
| + if (first->opcode() == IrOpcode::kLoop) return first; |
| + DCHECK(IrOpcode::IsPhiOpcode(first->opcode())); |
| + return first->InputAt(first->InputCount() - 1); |
|
Michael Starzinger
2015/02/10 15:28:21
nit: Can we use NodeProperties::GetControlInput he
titzer
2015/02/11 13:03:35
Done.
|
| +} |
| + |
| } // namespace compiler |
| } // namespace internal |
| } // namespace v8 |