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

Side by Side Diff: test/cctest/compiler/test-osr.cc

Issue 2226293002: [turbolizer] Visualize also the dead nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@t-p2
Patch Set: 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/verifier.cc ('k') | tools/turbolizer/graph-view.js » ('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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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/codegen.h" 5 #include "src/codegen.h"
6 #include "src/compiler/all-nodes.h" 6 #include "src/compiler/all-nodes.h"
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/diamond.h" 8 #include "src/compiler/diamond.h"
9 #include "src/compiler/graph.h" 9 #include "src/compiler/graph.h"
10 #include "src/compiler/js-graph.h" 10 #include "src/compiler/js-graph.h"
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 } 113 }
114 114
115 void DeconstructOsr() { 115 void DeconstructOsr() {
116 OsrHelper helper(0, 0); 116 OsrHelper helper(0, 0);
117 helper.Deconstruct(&jsgraph, &common, main_zone()); 117 helper.Deconstruct(&jsgraph, &common, main_zone());
118 AllNodes nodes(main_zone(), &graph); 118 AllNodes nodes(main_zone(), &graph);
119 // Should be edited out. 119 // Should be edited out.
120 CHECK(!nodes.IsLive(osr_normal_entry)); 120 CHECK(!nodes.IsLive(osr_normal_entry));
121 CHECK(!nodes.IsLive(osr_loop_entry)); 121 CHECK(!nodes.IsLive(osr_loop_entry));
122 // No dangling nodes should be left over. 122 // No dangling nodes should be left over.
123 for (Node* const node : nodes.live) { 123 for (Node* const node : nodes.reachable) {
124 for (Node* const use : node->uses()) { 124 for (Node* const use : node->uses()) {
125 CHECK(std::find(nodes.live.begin(), nodes.live.end(), use) != 125 CHECK(std::find(nodes.reachable.begin(), nodes.reachable.end(), use) !=
126 nodes.live.end()); 126 nodes.reachable.end());
127 } 127 }
128 } 128 }
129 } 129 }
130 }; 130 };
131 131
132 132
133 TEST(Deconstruct_osr0) { 133 TEST(Deconstruct_osr0) {
134 OsrDeconstructorTester T(0); 134 OsrDeconstructorTester T(0);
135 135
136 Node* loop = T.NewOsrLoop(1); 136 Node* loop = T.NewOsrLoop(1);
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 CHECK_EQ(new_loop0_phi, FindSuccessor(new_loop0_loop, IrOpcode::kPhi)); 566 CHECK_EQ(new_loop0_phi, FindSuccessor(new_loop0_loop, IrOpcode::kPhi));
567 567
568 // Check that the return returns the phi from the OSR loop and control 568 // Check that the return returns the phi from the OSR loop and control
569 // depends on the copy of the outer loop0. 569 // depends on the copy of the outer loop0.
570 CheckInputs(new_ret, new_loop0_phi, T.graph.start(), new_loop0_exit); 570 CheckInputs(new_ret, new_loop0_phi, T.graph.start(), new_loop0_exit);
571 } 571 }
572 572
573 } // namespace compiler 573 } // namespace compiler
574 } // namespace internal 574 } // namespace internal
575 } // namespace v8 575 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/verifier.cc ('k') | tools/turbolizer/graph-view.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698