[llvm] 4f94121 - [Analysis] Remove changeCondBranchToUnconditionalTo (NFC)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 10 17:56:58 PDT 2021
Author: Kazu Hirata
Date: 2021-07-10T17:31:43-07:00
New Revision: 4f94121cce24af28b64a9b67e2f5355bcca43574
URL: https://github.com/llvm/llvm-project/commit/4f94121cce24af28b64a9b67e2f5355bcca43574
DIFF: https://github.com/llvm/llvm-project/commit/4f94121cce24af28b64a9b67e2f5355bcca43574.diff
LOG: [Analysis] Remove changeCondBranchToUnconditionalTo (NFC)
The last use was removed on Jan 21, 2021 in commit
0895b836d74ed333468ddece2102140494eb33b6.
Added:
Modified:
llvm/include/llvm/Analysis/MemorySSAUpdater.h
llvm/lib/Analysis/MemorySSAUpdater.cpp
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/MemorySSAUpdater.h b/llvm/include/llvm/Analysis/MemorySSAUpdater.h
index b0bf2e5ead623..659e6aff6e28b 100644
--- a/llvm/include/llvm/Analysis/MemorySSAUpdater.h
+++ b/llvm/include/llvm/Analysis/MemorySSAUpdater.h
@@ -240,11 +240,6 @@ class MemorySSAUpdater {
/// successors.
void changeToUnreachable(const Instruction *I);
- /// Conditional branch BI is changed or replaced with an unconditional branch
- /// to `To`. Update Phis in BI's successors to remove BI's BB.
- void changeCondBranchToUnconditionalTo(const BranchInst *BI,
- const BasicBlock *To);
-
/// Get handle on MemorySSA.
MemorySSA* getMemorySSA() const { return MSSA; }
diff --git a/llvm/lib/Analysis/MemorySSAUpdater.cpp b/llvm/lib/Analysis/MemorySSAUpdater.cpp
index faaafae543fab..616864f360bf3 100644
--- a/llvm/lib/Analysis/MemorySSAUpdater.cpp
+++ b/llvm/lib/Analysis/MemorySSAUpdater.cpp
@@ -1426,22 +1426,6 @@ void MemorySSAUpdater::changeToUnreachable(const Instruction *I) {
tryRemoveTrivialPhis(UpdatedPHIs);
}
-void MemorySSAUpdater::changeCondBranchToUnconditionalTo(const BranchInst *BI,
- const BasicBlock *To) {
- const BasicBlock *BB = BI->getParent();
- SmallVector<WeakVH, 16> UpdatedPHIs;
- for (const BasicBlock *Succ : successors(BB)) {
- removeDuplicatePhiEdgesBetween(BB, Succ);
- if (Succ != To)
- if (auto *MPhi = MSSA->getMemoryAccess(Succ)) {
- MPhi->unorderedDeleteIncomingBlock(BB);
- UpdatedPHIs.push_back(MPhi);
- }
- }
- // Optimize trivial phis.
- tryRemoveTrivialPhis(UpdatedPHIs);
-}
-
MemoryAccess *MemorySSAUpdater::createMemoryAccessInBB(
Instruction *I, MemoryAccess *Definition, const BasicBlock *BB,
MemorySSA::InsertionPlace Point) {
More information about the llvm-commits
mailing list