[PATCH] D28241: [LICM] Untangle some of the logic in LICM canSinkOrHoistInst

Hal Finkel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 8 05:19:57 PST 2017


hfinkel added a comment.

In https://reviews.llvm.org/D28241#639213, @trentxintong wrote:

> @hfinkel can you please confirm this is correct. Basically, I do not think we need to check for isSafeToExecuteUnconditionally for the set of SSA instructions we handle when we are sinking.


Sinking into the exit block should be safe, subject to aliasing considerations for memory accesses, even for instructions not safe to speculate, so long as it is a dedicated exit (i.e. LI->hasDedicatedExits() returns true).


https://reviews.llvm.org/D28241





More information about the llvm-commits mailing list