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

Side by Side 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 unified diff | Download patch
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/loop-analysis.h" 5 #include "src/compiler/loop-analysis.h"
6 6
7 #include "src/compiler/graph.h" 7 #include "src/compiler/graph.h"
8 #include "src/compiler/node.h" 8 #include "src/compiler/node.h"
9 #include "src/compiler/node-marker.h" 9 #include "src/compiler/node-marker.h"
10 #include "src/compiler/node-properties.h" 10 #include "src/compiler/node-properties.h"
(...skipping 444 matching lines...) Expand 10 before | Expand all | Expand 10 after
455 LoopTree* loop_tree = 455 LoopTree* loop_tree =
456 new (graph->zone()) LoopTree(graph->NodeCount(), graph->zone()); 456 new (graph->zone()) LoopTree(graph->NodeCount(), graph->zone());
457 LoopFinderImpl finder(graph, loop_tree, zone); 457 LoopFinderImpl finder(graph, loop_tree, zone);
458 finder.Run(); 458 finder.Run();
459 if (FLAG_trace_turbo_graph) { 459 if (FLAG_trace_turbo_graph) {
460 finder.Print(); 460 finder.Print();
461 } 461 }
462 return loop_tree; 462 return loop_tree;
463 } 463 }
464 464
465
466 Node* LoopTree::HeaderNode(Loop* loop) {
467 Node* first = *HeaderNodes(loop).begin();
468 if (first->opcode() == IrOpcode::kLoop) return first;
469 DCHECK(IrOpcode::IsPhiOpcode(first->opcode()));
470 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.
471 }
472
465 } // namespace compiler 473 } // namespace compiler
466 } // namespace internal 474 } // namespace internal
467 } // namespace v8 475 } // namespace v8
OLDNEW
« 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