[PATCH] D52827: [LICM] Make LICM able to hoist phis

John Brawn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 3 05:06:46 PDT 2018


john.brawn created this revision.
john.brawn added reviewers: reames, hfinkel, mkazantsev, skatkov.

The general approach taken is to make note of loop invariant branches, then when we see something conditional on that branch, such as a phi, we create a copy of the branch and (empty versions of) its successors and hoist using that.

This has no impact by itself that I've been able to see, as LICM typically doesn't see such phis as they will have been converted into selects by the time LICM is run, but once we start doing phi-to-select conversion later it will be important.


Repository:
  rL LLVM

https://reviews.llvm.org/D52827

Files:
  lib/Transforms/Scalar/LICM.cpp
  test/Transforms/LICM/hoist-phi.ll
  test/Transforms/LoopVectorize/invariant-store-vectorization.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52827.168101.patch
Type: text/x-patch
Size: 38273 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181003/aca8e0d4/attachment.bin>


More information about the llvm-commits mailing list