[llvm] 00f90e3 - [NFCI][SimplifyCFG] simplifySingleResume(): use DeleteDeadBlock()
Roman Lebedev via llvm-commits
llvm-commits at lists.llvm.org
Wed May 19 02:05:05 PDT 2021
Author: Roman Lebedev
Date: 2021-05-19T12:04:22+03:00
New Revision: 00f90e3fca79e8ba9bf44e7e3a0da0e6311af822
URL: https://github.com/llvm/llvm-project/commit/00f90e3fca79e8ba9bf44e7e3a0da0e6311af822
DIFF: https://github.com/llvm/llvm-project/commit/00f90e3fca79e8ba9bf44e7e3a0da0e6311af822.diff
LOG: [NFCI][SimplifyCFG] simplifySingleResume(): use DeleteDeadBlock()
Added:
Modified:
llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
index add7a6476a24..940f9c5b897e 100644
--- a/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Utils/SimplifyCFG.cpp
@@ -4426,10 +4426,7 @@ bool SimplifyCFGOpt::simplifySingleResume(ResumeInst *RI) {
}
// The landingpad is now unreachable. Zap it.
- if (DTU)
- DTU->deleteBB(BB);
- else
- BB->eraseFromParent();
+ DeleteDeadBlock(BB, DTU);
return true;
}
More information about the llvm-commits
mailing list