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

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

Issue 2857983004: [turbofan] Fix verification of duplicate projections. (Closed)
Patch Set: Created 3 years, 7 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 | no next file » | 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 1427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1438 AllNodes all(&zone, graph); 1438 AllNodes all(&zone, graph);
1439 for (Node* node : all.reachable) visitor.Check(node); 1439 for (Node* node : all.reachable) visitor.Check(node);
1440 1440
1441 // Check the uniqueness of projections. 1441 // Check the uniqueness of projections.
1442 for (Node* proj : all.reachable) { 1442 for (Node* proj : all.reachable) {
1443 if (proj->opcode() != IrOpcode::kProjection) continue; 1443 if (proj->opcode() != IrOpcode::kProjection) continue;
1444 Node* node = proj->InputAt(0); 1444 Node* node = proj->InputAt(0);
1445 for (Node* other : node->uses()) { 1445 for (Node* other : node->uses()) {
1446 if (all.IsLive(other) && other != proj && 1446 if (all.IsLive(other) && other != proj &&
1447 other->opcode() == IrOpcode::kProjection && 1447 other->opcode() == IrOpcode::kProjection &&
1448 other->InputAt(0) == node &&
1448 ProjectionIndexOf(other->op()) == ProjectionIndexOf(proj->op())) { 1449 ProjectionIndexOf(other->op()) == ProjectionIndexOf(proj->op())) {
1449 V8_Fatal(__FILE__, __LINE__, 1450 V8_Fatal(__FILE__, __LINE__,
1450 "Node #%d:%s has duplicate projections #%d and #%d", 1451 "Node #%d:%s has duplicate projections #%d and #%d",
1451 node->id(), node->op()->mnemonic(), proj->id(), other->id()); 1452 node->id(), node->op()->mnemonic(), proj->id(), other->id());
1452 } 1453 }
1453 } 1454 }
1454 } 1455 }
1455 } 1456 }
1456 1457
1457 1458
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
1746 replacement->op()->EffectOutputCount() > 0); 1747 replacement->op()->EffectOutputCount() > 0);
1747 DCHECK(!NodeProperties::IsFrameStateEdge(edge) || 1748 DCHECK(!NodeProperties::IsFrameStateEdge(edge) ||
1748 replacement->opcode() == IrOpcode::kFrameState); 1749 replacement->opcode() == IrOpcode::kFrameState);
1749 } 1750 }
1750 1751
1751 #endif // DEBUG 1752 #endif // DEBUG
1752 1753
1753 } // namespace compiler 1754 } // namespace compiler
1754 } // namespace internal 1755 } // namespace internal
1755 } // namespace v8 1756 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698