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

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

Issue 909463002: [turbofan] Fix loop analysis bug with certain phi structures. (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 | « no previous file | test/cctest/compiler/test-loop-analysis.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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 // Create a new loop. 229 // Create a new loop.
230 loops_.push_back({node, nullptr, nullptr, nullptr}); 230 loops_.push_back({node, nullptr, nullptr, nullptr});
231 loop_tree_->NewLoop(); 231 loop_tree_->NewLoop();
232 SetBackwardMark(node, loop_num); 232 SetBackwardMark(node, loop_num);
233 loop_tree_->node_to_loop_num_[node->id()] = loop_num; 233 loop_tree_->node_to_loop_num_[node->id()] = loop_num;
234 234
235 // Setup loop mark for phis attached to loop header. 235 // Setup loop mark for phis attached to loop header.
236 for (Node* use : node->uses()) { 236 for (Node* use : node->uses()) {
237 if (NodeProperties::IsPhi(use)) { 237 if (NodeProperties::IsPhi(use)) {
238 info(use); // create the NodeInfo
238 SetBackwardMark(use, loop_num); 239 SetBackwardMark(use, loop_num);
239 loop_tree_->node_to_loop_num_[use->id()] = loop_num; 240 loop_tree_->node_to_loop_num_[use->id()] = loop_num;
240 } 241 }
241 } 242 }
242 243
243 return loop_num; 244 return loop_num;
244 } 245 }
245 246
246 void ResizeBackwardMarks() { 247 void ResizeBackwardMarks() {
247 int new_width = width_ + 1; 248 int new_width = width_ + 1;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 finder.Run(); 458 finder.Run();
458 if (FLAG_trace_turbo_graph) { 459 if (FLAG_trace_turbo_graph) {
459 finder.Print(); 460 finder.Print();
460 } 461 }
461 return loop_tree; 462 return loop_tree;
462 } 463 }
463 464
464 } // namespace compiler 465 } // namespace compiler
465 } // namespace internal 466 } // namespace internal
466 } // namespace v8 467 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | test/cctest/compiler/test-loop-analysis.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698