[PATCH] D32699: [PM/Unswitch] Teach the new simple loop unswitch to handle loop invariant PHI inputs and to rewrite PHI nodes during the actual unswitching.

Chandler Carruth via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 1 03:59:47 PDT 2017


chandlerc created this revision.
Herald added a subscriber: mcrosier.

The checking is quite easy, but rewriting the PHI nodes is somewhat
surprisingly challenging. This should handle both branches and switches.

I think this is now a full featured trivial unswitcher, and more full
featured than the trivial cases in the old pass while still being (IMO)
somewhat simpler in how it works.

Next up is to verify its correctness in more widespread testing, and
then to add non-trivial unswitching.


https://reviews.llvm.org/D32699

Files:
  lib/Transforms/Scalar/SimpleLoopUnswitch.cpp
  test/Transforms/SimpleLoopUnswitch/trivial-unswitch.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32699.97278.patch
Type: text/x-patch
Size: 16987 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170501/2c0ad164/attachment.bin>


More information about the llvm-commits mailing list