[PATCH] D50501: [LICM] Hoist guards with invariant conditions

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 9 20:14:39 PDT 2018


mkazantsev added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:523
+          CurLoop->hasLoopInvariantOperands(&I)) {
+        bool Hoisted = hoist(I, DT, CurLoop, SafetyInfo, ORE);
+        Changed |= Hoisted;
----------------
reames wrote:
> hoist always returns true.  Separately, change it to return void and update other caller.  
Not sure if it's a good idea... What if it changes in the future? Besides, `sink` can actually return `false`, and it would be strange to have different signatures for these two.


https://reviews.llvm.org/D50501





More information about the llvm-commits mailing list