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 811 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
822 "Node #%d:%s in B%d is not dominated by control input #%d:%s", | 822 "Node #%d:%s in B%d is not dominated by control input #%d:%s", |
823 node->id(), node->op()->mnemonic(), block->id(), ctl->id(), | 823 node->id(), node->op()->mnemonic(), block->id(), ctl->id(), |
824 ctl->op()->mnemonic()); | 824 ctl->op()->mnemonic()); |
825 } | 825 } |
826 } | 826 } |
827 } | 827 } |
828 | 828 |
829 | 829 |
830 void ScheduleVerifier::Run(Schedule* schedule) { | 830 void ScheduleVerifier::Run(Schedule* schedule) { |
831 const size_t count = schedule->BasicBlockCount(); | 831 const size_t count = schedule->BasicBlockCount(); |
832 Zone tmp_zone(schedule->zone()->isolate()); | 832 Zone tmp_zone; |
833 Zone* zone = &tmp_zone; | 833 Zone* zone = &tmp_zone; |
834 BasicBlock* start = schedule->start(); | 834 BasicBlock* start = schedule->start(); |
835 BasicBlockVector* rpo_order = schedule->rpo_order(); | 835 BasicBlockVector* rpo_order = schedule->rpo_order(); |
836 | 836 |
837 // Verify the RPO order contains only blocks from this schedule. | 837 // Verify the RPO order contains only blocks from this schedule. |
838 CHECK_GE(count, rpo_order->size()); | 838 CHECK_GE(count, rpo_order->size()); |
839 for (BasicBlockVector::iterator b = rpo_order->begin(); b != rpo_order->end(); | 839 for (BasicBlockVector::iterator b = rpo_order->begin(); b != rpo_order->end(); |
840 ++b) { | 840 ++b) { |
841 CHECK_EQ((*b), schedule->GetBlockById((*b)->id())); | 841 CHECK_EQ((*b), schedule->GetBlockById((*b)->id())); |
842 // All predecessors and successors should be in rpo and in this schedule. | 842 // All predecessors and successors should be in rpo and in this schedule. |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
991 // Check inputs for all nodes in the block. | 991 // Check inputs for all nodes in the block. |
992 for (size_t i = 0; i < block->NodeCount(); i++) { | 992 for (size_t i = 0; i < block->NodeCount(); i++) { |
993 Node* node = block->NodeAt(i); | 993 Node* node = block->NodeAt(i); |
994 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); | 994 CheckInputsDominate(schedule, block, node, static_cast<int>(i) - 1); |
995 } | 995 } |
996 } | 996 } |
997 } | 997 } |
998 } | 998 } |
999 } | 999 } |
1000 } // namespace v8::internal::compiler | 1000 } // namespace v8::internal::compiler |
OLD | NEW |