[PATCH] D50925: [LICM] Hoist stores of invariant values to invariant addresses out of loops

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 23 09:26:41 PDT 2018


anna added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:748
+    // load store promotion instead.
+    auto &AS = CurAST->getAliasSetFor(MemoryLocation::get(SI));
+
----------------
I might be missing something. Here we're only checking for the address we're storing into is invariant. Where's the check for the stored value is invariant? That decides if we should hoist or sink the store right?

Also, could you pls add test cases where the stored value is variant while the store address is invariant.


https://reviews.llvm.org/D50925





More information about the llvm-commits mailing list