forked from OSchip/llvm-project
[llvm][examples][SimplifyCFG] Fix pass's IR changed reporting
... under the EXPENSIVE_CHECKS build, this fails the assert in the LegacyPM that verifies whether a pass really did leave the IR alone when it reports no changes back from its return status.
This commit is contained in:
parent
536baa11cf
commit
6dadf7cb65
|
@ -354,18 +354,18 @@ static bool mergeIntoSinglePredecessor_v2(Function &F, DominatorTree &DT) {
|
|||
}
|
||||
|
||||
static bool doSimplify_v1(Function &F) {
|
||||
return eliminateCondBranches_v1(F) & mergeIntoSinglePredecessor_v1(F) &
|
||||
return eliminateCondBranches_v1(F) | mergeIntoSinglePredecessor_v1(F) |
|
||||
removeDeadBlocks_v1(F);
|
||||
}
|
||||
|
||||
static bool doSimplify_v2(Function &F, DominatorTree &DT) {
|
||||
return eliminateCondBranches_v2(F, DT) &
|
||||
mergeIntoSinglePredecessor_v2(F, DT) & removeDeadBlocks_v2(F, DT);
|
||||
return eliminateCondBranches_v2(F, DT) |
|
||||
mergeIntoSinglePredecessor_v2(F, DT) | removeDeadBlocks_v2(F, DT);
|
||||
}
|
||||
|
||||
static bool doSimplify_v3(Function &F, DominatorTree &DT) {
|
||||
return eliminateCondBranches_v3(F, DT) &
|
||||
mergeIntoSinglePredecessor_v2(F, DT) & removeDeadBlocks_v2(F, DT);
|
||||
return eliminateCondBranches_v3(F, DT) |
|
||||
mergeIntoSinglePredecessor_v2(F, DT) | removeDeadBlocks_v2(F, DT);
|
||||
}
|
||||
|
||||
namespace {
|
||||
|
|
Loading…
Reference in New Issue