Commit ef9c757c authored by titzer@chromium.org's avatar titzer@chromium.org

Fix schedule for interleaved floating control by wiring one floating control structure per block.

R=mstarzinger@chromium.org, bmeurer@chromium.org
BUG=

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

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@23949 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 28f4efc9
......@@ -638,13 +638,19 @@ bool Scheduler::ConnectFloatingControl() {
int max = static_cast<int>(schedule_->rpo_order()->size());
for (int i = max - 1; i >= 0; i--) {
BasicBlock* block = schedule_->rpo_order()->at(i);
// TODO(titzer): we place at most one floating control structure per
// basic block because scheduling currently can interleave phis from
// one subgraph with the merges from another subgraph.
bool one_placed = false;
for (int j = static_cast<int>(block->nodes_.size()) - 1; j >= 0; j--) {
Node* node = block->nodes_[j];
SchedulerData* data = GetData(node);
if (data->is_floating_control_ && !data->is_connected_control_) {
if (data->is_floating_control_ && !data->is_connected_control_ &&
!one_placed) {
Trace(" Floating control #%d:%s was scheduled in B%d\n", node->id(),
node->op()->mnemonic(), block->id());
ConnectFloatingControlSubgraph(block, node);
one_placed = true;
}
}
}
......
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