[PATCH] D51718: Update MemorySSA in LoopRotate.

David Greene via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 20 11:07:32 PDT 2018


greened added inline comments.


================
Comment at: lib/Transforms/Scalar/LoopRotation.cpp:49
+  bool Changed = LoopRotation(&L, &AR.LI, &AR.TTI, &AR.AC, &AR.DT, &AR.SE,
+                              MSSAU.hasValue() ? MSSAU.getPointer() : nullptr,
+                              SQ, false, Threshold, false);
----------------
Why not just pass the Optional?


================
Comment at: lib/Transforms/Scalar/LoopRotation.cpp:106
+    return LoopRotation(L, LI, TTI, AC, DT, SE,
+                        MSSAU.hasValue() ? MSSAU.getPointer() : nullptr, SQ,
+                        false, MaxHeaderSize, false);
----------------
Again, maybe just pass the Optional.


================
Comment at: lib/Transforms/Utils/LoopRotationUtils.cpp:59
   ScalarEvolution *SE;
+  MemorySSAUpdater *MSSAU;
   const SimplifyQuery &SQ;
----------------
Use an Optional here?


================
Comment at: lib/Transforms/Utils/LoopRotationUtils.cpp:276
   LLVM_DEBUG(dbgs() << "LoopRotation: rotating "; L->dump());
+  if (MSSAU && VerifyMemorySSA)
+    MSSAU->getMemorySSA()->verifyMemorySSA();
----------------
These tests should remain the same with an Optional.


Repository:
  rL LLVM

https://reviews.llvm.org/D51718





More information about the llvm-commits mailing list