[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
================
@@ -1537,11 +1560,26 @@ void MemorySSA::buildMemorySSA(BatchAAResults &BAA) {
// Now do regular SSA renaming on the MemoryDef/MemoryUse. Visited will get
// filled in with all blocks.
SmallPtrSet<BasicBlock *, 16> Visited;
- renamePass(DT->getRootNode(), LiveOnEntryDef.get(), Visited);
+ if (L) {
+ if (auto *P = getMemoryAccess(L->getLoopPreheader())) {
+ for (Use &U : make_early_inc_range(P->uses())) {
----------------
fhahn wrote:
Removed, thanks!
https://github.com/llvm/llvm-project/pull/83860
More information about the llvm-commits
mailing list