1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-18 10:32:48 +02:00

[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:
Jon Roelofs 2020-07-27 13:37:35 -06:00
parent 2d65e976a4
commit f9714f9d78

View File

@ -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 {