Commit 37f16450 authored by dcarney@chromium.org's avatar dcarney@chromium.org

[turbofan] more verification of rpo

R=titzer@chromium.org

BUG=

Review URL: https://codereview.chromium.org/603533002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24630 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6fc00b4d
......@@ -741,6 +741,17 @@ void ScheduleVerifier::Run(Schedule* schedule) {
for (BasicBlockVector::iterator b = rpo_order->begin(); b != rpo_order->end();
++b) {
CHECK_EQ((*b), schedule->GetBlockById((*b)->id()));
// All predecessors and successors should be in rpo and in this schedule.
for (BasicBlock::Predecessors::iterator j = (*b)->predecessors_begin();
j != (*b)->predecessors_end(); ++j) {
CHECK_GE((*j)->rpo_number(), 0);
CHECK_EQ((*j), schedule->GetBlockById((*j)->id()));
}
for (BasicBlock::Successors::iterator j = (*b)->successors_begin();
j != (*b)->successors_end(); ++j) {
CHECK_GE((*j)->rpo_number(), 0);
CHECK_EQ((*j), schedule->GetBlockById((*j)->id()));
}
}
// Verify RPO numbers of blocks.
......
......@@ -141,21 +141,6 @@ TEST(RunRedundantBranch1) {
TEST(RunRedundantBranch2) {
RawMachineAssemblerTester<int32_t> m;
int constant = 955777;
MLabel blocka, blockb;
m.Branch(m.Int32Constant(0), &blocka, &blocka);
m.Bind(&blockb);
m.Goto(&blocka);
m.Bind(&blocka);
m.Return(m.Int32Constant(constant));
CHECK_EQ(constant, m.Call());
}
TEST(RunRedundantBranch3) {
RawMachineAssemblerTester<int32_t> m;
int constant = 966777;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment