1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[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.
This commit is contained in:
Roman Lebedev 2021-01-02 14:38:52 +03:00
parent 98987bb754
commit 6a6a75d9f9

View File

@ -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?");