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

Sanjoy Das via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 11 16:27:10 PDT 2017


sanjoy accepted this revision.
sanjoy added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lib/Transforms/Scalar/LICM.cpp:971
   Value *SomePtr; // Designated pointer to store to.
-  SmallPtrSetImpl<Value *> &PointerMustAliases;
+  const SmallSetVector<Value *, 8> &PointerMustAliases;
   SmallVectorImpl<BasicBlock *> &LoopExitBlocks;
----------------
You could also add a `getSetRef()` (like `getArrayRef()`) method to `SetVector` to expose the contained set and pass that into `LoopPromoter` instead of changing `LoopPromoter` itself.

But this is fine too.


https://reviews.llvm.org/D35439





More information about the llvm-commits mailing list