[PATCH] D35439: Make promoteLoopAccessesToScalars independent of AliasSet [NFC]

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 19:16:07 PDT 2017


sanjoy added inline comments.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:306
+
+        //Value *SomePtr = AS.begin()->getValue();
+        SmallPtrSet<Value *, 4> PointerMustAliases;
----------------
I'd just remove this.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:309
+        for (const auto &ASI : AS) {
+          PointerMustAliases.insert(ASI.getValue());
+        }
----------------
Can you see duplicates here?  If not, I'd suggest changing this to a `SmallVector` (and pass in an `ArrayRef` to `promoteLoopAccessesToScalars`).


https://reviews.llvm.org/D35439





More information about the llvm-commits mailing list