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

Side by Side Diff: src/compiler/verifier.cc

Issue 1206533002: [turbofan] Run DeadCodeElimination together with the advanced reducers. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix test262 test failure Created 5 years, 6 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/pipeline.cc ('k') | test/unittests/compiler/graph-reducer-unittest.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/verifier.h" 5 #include "src/compiler/verifier.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 #include <queue> 9 #include <queue>
10 #include <sstream> 10 #include <sstream>
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 case IrOpcode::kEnd: 187 case IrOpcode::kEnd:
188 // End has no outputs. 188 // End has no outputs.
189 CHECK(node->op()->ValueOutputCount() == 0); 189 CHECK(node->op()->ValueOutputCount() == 0);
190 CHECK(node->op()->EffectOutputCount() == 0); 190 CHECK(node->op()->EffectOutputCount() == 0);
191 CHECK(node->op()->ControlOutputCount() == 0); 191 CHECK(node->op()->ControlOutputCount() == 0);
192 // Type is empty. 192 // Type is empty.
193 CheckNotTyped(node); 193 CheckNotTyped(node);
194 break; 194 break;
195 case IrOpcode::kDead: 195 case IrOpcode::kDead:
196 // Dead is never connected to the graph. 196 // Dead is never connected to the graph.
197 // TODO(mstarzinger): Make the GraphReducer immediately perform control 197 UNREACHABLE();
198 // reduction in case control is killed. This will prevent {Dead} from
199 // being reachable after a phase finished. Then re-enable below assert.
200 // UNREACHABLE();
201 break; 198 break;
202 case IrOpcode::kBranch: { 199 case IrOpcode::kBranch: {
203 // Branch uses are IfTrue and IfFalse. 200 // Branch uses are IfTrue and IfFalse.
204 int count_true = 0, count_false = 0; 201 int count_true = 0, count_false = 0;
205 for (auto use : node->uses()) { 202 for (auto use : node->uses()) {
206 CHECK(use->opcode() == IrOpcode::kIfTrue || 203 CHECK(use->opcode() == IrOpcode::kIfTrue ||
207 use->opcode() == IrOpcode::kIfFalse); 204 use->opcode() == IrOpcode::kIfFalse);
208 if (use->opcode() == IrOpcode::kIfTrue) ++count_true; 205 if (use->opcode() == IrOpcode::kIfTrue) ++count_true;
209 if (use->opcode() == IrOpcode::kIfFalse) ++count_false; 206 if (use->opcode() == IrOpcode::kIfFalse) ++count_false;
210 } 207 }
(...skipping 920 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 // Check inputs for all nodes in the block. 1128 // Check inputs for all nodes in the block.
1132 for (size_t i = 0; i < block->NodeCount(); i++) { 1129 for (size_t i = 0; i < block->NodeCount(); i++) {
1133 Node* node = block->NodeAt(i); 1130 Node* node = block->NodeAt(i);
1134 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); 1131 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1);
1135 } 1132 }
1136 } 1133 }
1137 } 1134 }
1138 } // namespace compiler 1135 } // namespace compiler
1139 } // namespace internal 1136 } // namespace internal
1140 } // namespace v8 1137 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | test/unittests/compiler/graph-reducer-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698