[PATCH] D54189: [HotColdSplitting] Ensure PHIs have unique incoming values

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 27 10:34:26 PST 2018


vsk updated this revision to Diff 175528.
vsk added a comment.

- Use an iterative approach to remove blocks from the outlining region, if they would cause PHIs outside of the region to become invalid (i.e. have more than one distinct incoming value from the codeRepl block).

This successfully builds a stage2 clang compiler, which passes the test suite without regressions. I had to disable stack coloring due to llvm.org/PR39671. To stress the splitting pass, I replaced the definition of "unlikelyExecuted" with "BB->hasNPredecessorsOrMore(2)", and rejected outlining regions which would mark the whole function cold.

At this point, I'm confident in https://reviews.llvm.org/D53887 and this patch.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54189/new/

https://reviews.llvm.org/D54189

Files:
  llvm/lib/Transforms/IPO/HotColdSplitting.cpp
  llvm/test/Transforms/HotColdSplit/extraction-subregion-breaks-phis.ll
  llvm/test/Transforms/HotColdSplit/forward-dfs-reaches-marked-block.ll
  llvm/test/Transforms/HotColdSplit/iterated-pruning-for-valid-phi-frontier.ll
  llvm/test/Transforms/HotColdSplit/outline-while-loop.ll
  llvm/test/Transforms/HotColdSplit/phi-with-distinct-outlined-values.ll
  llvm/test/Transforms/HotColdSplit/succ-block-with-self-edge.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D54189.175528.patch
Type: text/x-patch
Size: 17291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181127/44f04a62/attachment.bin>


More information about the llvm-commits mailing list