[PATCH] D28583: CodeGen: Allow small copyable blocks to "break" the CFG.

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 27 11:12:37 PST 2017


davidxl added a comment.

This looks very clean now.

However the amount of churns remind me of one thing.  Since the profit computation is based on static branch prediction (without PGO),  it is the right thing to do to be a little more conservative in taildup. In other words, instead of making 'isProtifiable' return true when the taildup cost is smaller than baseline cost, add a predefined margin (controlled by a parameter):

if (baseline_cost - taildup_cost > threshold)

  return true;

return false;

The threshold also roughly models the side effect of taildup -- increased icache footprint etc due to code size increase.


https://reviews.llvm.org/D28583





More information about the llvm-commits mailing list