[PATCH] D67470: [MemorySSA] Pass (for update) MSSAU when hoisting instructions.

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 17:03:20 PDT 2019


george.burgess.iv accepted this revision.
george.burgess.iv added a comment.
This revision is now accepted and ready to land.

Thanks for this!

Just a general style nit, and LGTM



================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:424
+                                   DenseMap<Value *, Value *> &Cache,
+                                   std::unique_ptr<MemorySSAUpdater> &MSSAU) {
   auto CacheIt = Cache.find(Cond);
----------------
nit: generally `unique_ptr<T>&` is only used when you want to update what the `unique_ptr` itself is pointing to. if you just want to use `*MSSAU` from the function, please pass it as a `MemorySSAUpdater &` (or `MemorySSAUpdater *` if it's potentially null)


================
Comment at: lib/Transforms/Scalar/LoopUnswitch.cpp:506
+FindLIVLoopCondition(Value *Cond, Loop *L, bool &Changed,
+                     std::unique_ptr<MemorySSAUpdater> &MSSAU) {
   DenseMap<Value *, Value *> Cache;
----------------
same nit


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D67470/new/

https://reviews.llvm.org/D67470





More information about the llvm-commits mailing list