Skip to content

Commit

Permalink
Always move out of loops when value proxies are in the graph.
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaswue committed Mar 8, 2017
1 parent 38468d9 commit 623d6f4
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -519,9 +519,12 @@ protected void calcLatestBlock(Block earliestBlock, SchedulingStrategy strategy,
while (currentBlock.getLoopDepth() > earliestBlock.getLoopDepth() && currentBlock != earliestBlock.getDominator()) {
Block previousCurrentBlock = currentBlock;
currentBlock = currentBlock.getDominator();
if (previousCurrentBlock.isLoopHeader() && currentBlock.probability() < latestBlock.probability()) {
// Only assign new latest block if frequency is actually lower.
latestBlock = currentBlock;
if (previousCurrentBlock.isLoopHeader()) {
if (currentBlock.probability() < latestBlock.probability() || ((StructuredGraph) currentNode.graph()).hasValueProxies()) {
// Only assign new latest block if frequency is actually lower or if
// loop proxies would be required otherwise.
latestBlock = currentBlock;
}
}
}
}
Expand Down

0 comments on commit 623d6f4

Please sign in to comment.