[turbofan] Propagate "deferredness" to dominated basic blocks.
TEST=cctest/test-scheduler R=mstarzinger@chromium.org Review URL: https://codereview.chromium.org/686273005 Cr-Commit-Position: refs/heads/master@{#25141} git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25141 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
24079dda3a
commit
0c1a545a93
@ -415,8 +415,6 @@ class CFGBuilder {
|
||||
IrOpcode::kIfFalse);
|
||||
|
||||
// Consider branch hints.
|
||||
// TODO(turbofan): Propagate the deferred flag to all blocks dominated by
|
||||
// this IfTrue/IfFalse later.
|
||||
switch (BranchHintOf(branch->op())) {
|
||||
case BranchHint::kNone:
|
||||
break;
|
||||
@ -1061,6 +1059,8 @@ void Scheduler::GenerateImmediateDominatorTree() {
|
||||
}
|
||||
current->set_dominator(dominator);
|
||||
current->set_dominator_depth(dominator->dominator_depth() + 1);
|
||||
// Propagate "deferredness" of the dominator.
|
||||
if (dominator->deferred()) current->set_deferred(true);
|
||||
Trace("Block B%d's idom is B%d, depth = %d\n", current->id().ToInt(),
|
||||
dominator->id().ToInt(), current->dominator_depth());
|
||||
}
|
||||
|
@ -34,6 +34,17 @@ static void CheckRPONumbers(BasicBlockVector* order, size_t expected,
|
||||
CHECK_EQ(NULL, order->at(i)->loop_header());
|
||||
}
|
||||
}
|
||||
int number = 0;
|
||||
for (auto const block : *order) {
|
||||
if (block->deferred()) continue;
|
||||
CHECK_EQ(number, block->ao_number());
|
||||
++number;
|
||||
}
|
||||
for (auto const block : *order) {
|
||||
if (!block->deferred()) continue;
|
||||
CHECK_EQ(number, block->ao_number());
|
||||
++number;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -155,6 +166,7 @@ TEST(RPOLine) {
|
||||
BasicBlock* last = schedule.start();
|
||||
for (int j = 0; j < i; j++) {
|
||||
BasicBlock* block = schedule.NewBasicBlock();
|
||||
block->set_deferred(i & 1);
|
||||
schedule.AddGoto(last, block);
|
||||
last = block;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user