forked from OSchip/llvm-project
[SimplifyCFG] Don't actually take DomTreeUpdater unless we intend to maintain DomTree validity
This guards against unintentional mistakes like the one i just fixed in previous commit.
This commit is contained in:
parent
f4ea21947d
commit
b9da488ad7
|
@ -6700,7 +6700,7 @@ bool SimplifyCFGOpt::run(BasicBlock *BB) {
|
|||
bool llvm::simplifyCFG(BasicBlock *BB, const TargetTransformInfo &TTI,
|
||||
DomTreeUpdater *DTU, const SimplifyCFGOptions &Options,
|
||||
SmallPtrSetImpl<BasicBlock *> *LoopHeaders) {
|
||||
return SimplifyCFGOpt(TTI, DTU, BB->getModule()->getDataLayout(), LoopHeaders,
|
||||
Options)
|
||||
return SimplifyCFGOpt(TTI, RequireAndPreserveDomTree ? DTU : nullptr,
|
||||
BB->getModule()->getDataLayout(), LoopHeaders, Options)
|
||||
.run(BB);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue