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

Side by Side Diff: src/compiler/loop-analysis.cc

Issue 2164263003: [turbofan] Induction variable bound analysis. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 4 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/common-operator.cc ('k') | src/compiler/loop-peeling.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 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 for (LoopTree::Loop* child : loop->children_) PrintLoop(child); 502 for (LoopTree::Loop* child : loop->children_) PrintLoop(child);
503 } 503 }
504 }; 504 };
505 505
506 506
507 LoopTree* LoopFinder::BuildLoopTree(Graph* graph, Zone* zone) { 507 LoopTree* LoopFinder::BuildLoopTree(Graph* graph, Zone* zone) {
508 LoopTree* loop_tree = 508 LoopTree* loop_tree =
509 new (graph->zone()) LoopTree(graph->NodeCount(), graph->zone()); 509 new (graph->zone()) LoopTree(graph->NodeCount(), graph->zone());
510 LoopFinderImpl finder(graph, loop_tree, zone); 510 LoopFinderImpl finder(graph, loop_tree, zone);
511 finder.Run(); 511 finder.Run();
512 if (FLAG_trace_turbo_graph) { 512 if (FLAG_trace_turbo_loop) {
513 finder.Print(); 513 finder.Print();
514 } 514 }
515 return loop_tree; 515 return loop_tree;
516 } 516 }
517 517
518 518
519 Node* LoopTree::HeaderNode(Loop* loop) { 519 Node* LoopTree::HeaderNode(Loop* loop) {
520 Node* first = *HeaderNodes(loop).begin(); 520 Node* first = *HeaderNodes(loop).begin();
521 if (first->opcode() == IrOpcode::kLoop) return first; 521 if (first->opcode() == IrOpcode::kLoop) return first;
522 DCHECK(IrOpcode::IsPhiOpcode(first->opcode())); 522 DCHECK(IrOpcode::IsPhiOpcode(first->opcode()));
523 Node* header = NodeProperties::GetControlInput(first); 523 Node* header = NodeProperties::GetControlInput(first);
524 DCHECK_EQ(IrOpcode::kLoop, header->opcode()); 524 DCHECK_EQ(IrOpcode::kLoop, header->opcode());
525 return header; 525 return header;
526 } 526 }
527 527
528 } // namespace compiler 528 } // namespace compiler
529 } // namespace internal 529 } // namespace internal
530 } // namespace v8 530 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/common-operator.cc ('k') | src/compiler/loop-peeling.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698