[llvm] c292fba - [MemorySSA] Update phi map with replacement value.
Alina Sbirlea via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 1 11:58:23 PDT 2020
Author: Alina Sbirlea
Date: 2020-09-01T11:56:40-07:00
New Revision: c292fba46fc2919c5310c07911e3650d2b24cf28
URL: https://github.com/llvm/llvm-project/commit/c292fba46fc2919c5310c07911e3650d2b24cf28
DIFF: https://github.com/llvm/llvm-project/commit/c292fba46fc2919c5310c07911e3650d2b24cf28.diff
LOG: [MemorySSA] Update phi map with replacement value.
Added:
Modified:
llvm/lib/Analysis/MemorySSAUpdater.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Analysis/MemorySSAUpdater.cpp b/llvm/lib/Analysis/MemorySSAUpdater.cpp
index 671d9e60ab7a..19f434f82cc6 100644
--- a/llvm/lib/Analysis/MemorySSAUpdater.cpp
+++ b/llvm/lib/Analysis/MemorySSAUpdater.cpp
@@ -713,8 +713,8 @@ void MemorySSAUpdater::updateForClonedLoop(const LoopBlocksRPO &LoopBlocks,
NewPhi->addIncoming(IncPhi, IncBB);
}
}
- if (onlySingleValue(NewPhi)) {
- MPhiMap[Phi] = nullptr;
+ if (auto *SingleAccess = onlySingleValue(NewPhi)) {
+ MPhiMap[Phi] = SingleAccess;
removeMemoryAccess(NewPhi);
}
};
More information about the llvm-commits
mailing list