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

Unified Diff: src/compiler/loop-analysis.cc

Issue 898353002: [turbofan] Use heavy-handed graph duplication to do loop peeling for OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add maze tests. Created 5 years, 10 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 side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « src/compiler/loop-analysis.h ('k') | src/compiler/osr.cc » ('j') | src/compiler/osr.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698