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

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: 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
« no previous file with comments | « src/compiler/loop-analysis.h ('k') | src/compiler/osr.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 Node* header = NodeProperties::GetControlInput(first);
471 DCHECK_EQ(IrOpcode::kLoop, header->opcode());
472 return header;
473 }
474
465 } // namespace compiler 475 } // namespace compiler
466 } // namespace internal 476 } // namespace internal
467 } // namespace v8 477 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/loop-analysis.h ('k') | src/compiler/osr.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698