Commit 6eb242ee authored by danno's avatar danno Committed by Commit bot

[turbofan] Better handling of inserted split-edge blocks

Previously, split-edge blocks inserted into CodeStubAssembler schedules
inherited the "deferredness" of their predecessor block. This tended to inline
newly inserted blocks that preceeded deferred code inline with non-deferred
code. The stack frame elider sometimes inserted stack construction into these
blocks, code which was actually was only needed in the deferred case.

This CL marks inserted split edge blocks with the deferredness of their
successors, e.g. they are defererred if their predecessor is deferrred. This
moves stack building code that logically belongs to deferred code into the
deferred code area rather than inlining it in non-deferred code.

Review-Url: https://codereview.chromium.org/2003663002
Cr-Commit-Position: refs/heads/master@{#36446}
parent eac1b38d
...@@ -344,7 +344,7 @@ void Schedule::EnsureSplitEdgeForm(BasicBlock* block) { ...@@ -344,7 +344,7 @@ void Schedule::EnsureSplitEdgeForm(BasicBlock* block) {
split_edge_block->set_control(BasicBlock::kGoto); split_edge_block->set_control(BasicBlock::kGoto);
split_edge_block->successors().push_back(block); split_edge_block->successors().push_back(block);
split_edge_block->predecessors().push_back(pred); split_edge_block->predecessors().push_back(pred);
split_edge_block->set_deferred(pred->deferred()); split_edge_block->set_deferred(block->deferred());
*current_pred = split_edge_block; *current_pred = split_edge_block;
// Find a corresponding successor in the previous block, replace it // Find a corresponding successor in the previous block, replace it
// with the split edge block... but only do it once, since we only // with the split edge block... but only do it once, since we only
......
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