OLD | NEW |
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 Loading... |
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 UNREACHABLE(); | 197 // TODO(mstarzinger): Make the GraphReducer immediately perform control |
| 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 case IrOpcode::kBranch: { | 202 case IrOpcode::kBranch: { |
199 // Branch uses are IfTrue and IfFalse. | 203 // Branch uses are IfTrue and IfFalse. |
200 int count_true = 0, count_false = 0; | 204 int count_true = 0, count_false = 0; |
201 for (auto use : node->uses()) { | 205 for (auto use : node->uses()) { |
202 CHECK(use->opcode() == IrOpcode::kIfTrue || | 206 CHECK(use->opcode() == IrOpcode::kIfTrue || |
203 use->opcode() == IrOpcode::kIfFalse); | 207 use->opcode() == IrOpcode::kIfFalse); |
204 if (use->opcode() == IrOpcode::kIfTrue) ++count_true; | 208 if (use->opcode() == IrOpcode::kIfTrue) ++count_true; |
205 if (use->opcode() == IrOpcode::kIfFalse) ++count_false; | 209 if (use->opcode() == IrOpcode::kIfFalse) ++count_false; |
206 } | 210 } |
207 CHECK_EQ(1, count_true); | 211 CHECK_EQ(1, count_true); |
(...skipping 918 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1126 // Check inputs for all nodes in the block. | 1130 // Check inputs for all nodes in the block. |
1127 for (size_t i = 0; i < block->NodeCount(); i++) { | 1131 for (size_t i = 0; i < block->NodeCount(); i++) { |
1128 Node* node = block->NodeAt(i); | 1132 Node* node = block->NodeAt(i); |
1129 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 1133 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
1130 } | 1134 } |
1131 } | 1135 } |
1132 } | 1136 } |
1133 } // namespace compiler | 1137 } // namespace compiler |
1134 } // namespace internal | 1138 } // namespace internal |
1135 } // namespace v8 | 1139 } // namespace v8 |
OLD | NEW |