mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-24 22:30:13 +00:00
[NFC][SimplifyCFG] Hoist 'original' DomTree verification from simplifyOnce() into run()
This is NFC since SimplifyCFG still currently defaults to not preserving DomTree. SimplifyCFGOpt::simplifyOnce() is only be called from SimplifyCFGOpt::run(), and can not be called externally, since SimplifyCFGOpt is defined in .cpp This avoids some needless verifications, and is thus a bit faster without sacrificing precision.
This commit is contained in:
parent
a7684940f0
commit
98cd1c33e3
@ -6675,11 +6675,6 @@ bool SimplifyCFGOpt::simplifyOnceImpl(BasicBlock *BB) {
|
||||
}
|
||||
|
||||
bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) {
|
||||
assert((!RequireAndPreserveDomTree ||
|
||||
(DTU &&
|
||||
DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) &&
|
||||
"Original domtree is invalid?");
|
||||
|
||||
bool Changed = simplifyOnceImpl(BB);
|
||||
|
||||
assert((!RequireAndPreserveDomTree ||
|
||||
@ -6691,6 +6686,11 @@ bool SimplifyCFGOpt::simplifyOnce(BasicBlock *BB) {
|
||||
}
|
||||
|
||||
bool SimplifyCFGOpt::run(BasicBlock *BB) {
|
||||
assert((!RequireAndPreserveDomTree ||
|
||||
(DTU &&
|
||||
DTU->getDomTree().verify(DominatorTree::VerificationLevel::Full))) &&
|
||||
"Original domtree is invalid?");
|
||||
|
||||
bool Changed = false;
|
||||
|
||||
// Repeated simplify BB as long as resimplification is requested.
|
||||
|
Loading…
Reference in New Issue
Block a user