[llvm] [LoopUnroll] Add CSE to remove redundant loads after unrolling. (PR #83860)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 24 06:51:06 PDT 2024


================
@@ -1239,7 +1240,28 @@ MemorySSA::MemorySSA(Function &Func, AliasAnalysis *AA, DominatorTree *DT)
   // make queries about all the instructions in the Function.
   assert(AA && "No alias analysis?");
   BatchAAResults BatchAA(*AA);
-  buildMemorySSA(BatchAA);
+  buildMemorySSA(BatchAA, iterator_range(F->begin(), F->end()));
+  // Intentionally leave AA to nullptr while building so we don't accidently
----------------
fhahn wrote:

Done, thanks!

https://github.com/llvm/llvm-project/pull/83860


More information about the llvm-commits mailing list