mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
[Analysis] Remove changeCondBranchToUnconditionalTo (NFC)
The last use was removed on Jan 21, 2021 in commit 0895b836d74ed333468ddece2102140494eb33b6.
This commit is contained in:
parent
9f0fbee225
commit
a6c7669e73
@ -240,11 +240,6 @@ public:
|
||||
/// 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; }
|
||||
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user