[llvm-branch-commits] [llvm] f4ea219 - [NFCI][CodeGen] DwarfEHPrepare: don't actually pass DTU into simplifyCFG by default
Roman Lebedev via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Jan 2 04:04:24 PST 2021
Author: Roman Lebedev
Date: 2021-01-02T14:38:52+03:00
New Revision: f4ea21947d907c8730fef2be8fbad457f1d96a0e
URL: https://github.com/llvm/llvm-project/commit/f4ea21947d907c8730fef2be8fbad457f1d96a0e
DIFF: https://github.com/llvm/llvm-project/commit/f4ea21947d907c8730fef2be8fbad457f1d96a0e.diff
LOG: [NFCI][CodeGen] DwarfEHPrepare: don't actually pass DTU into simplifyCFG by default
also, don't verify DomTree unless we intend to maintain it.
This is a very dumb think-o, i guess i was even warned about it
by subconsciousness in 4b80647367950ba3da6a08260487fd0dbc50a9c5's
commit message..
Fixes a compile-time regression reported by Martin Storsjö
in post-commit review of 2461cdb41724298591133c811df82b0064adfa6b.
Added:
Modified:
llvm/lib/CodeGen/DwarfEHPrepare.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
index 34a04feec040..c1b764214546 100644
--- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
@@ -153,7 +153,7 @@ size_t DwarfEHPrepare::pruneUnreachableResumes(
BasicBlock *BB = RI->getParent();
new UnreachableInst(Ctx, RI);
RI->eraseFromParent();
- simplifyCFG(BB, *TTI, DTU);
+ simplifyCFG(BB, *TTI, RequireAndPreserveDomTree ? DTU : nullptr);
}
}
Resumes.resize(ResumesLeft);
@@ -249,7 +249,7 @@ bool DwarfEHPrepare::InsertUnwindResumeCalls() {
}
bool DwarfEHPrepare::run() {
- assert(((OptLevel == CodeGenOpt::None) ||
+ assert(((OptLevel == CodeGenOpt::None || !RequireAndPreserveDomTree) ||
(DTU &&
DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) &&
"Original domtree is invalid?");
More information about the llvm-branch-commits
mailing list