Skip to content

[clang][CodeGen] Remove SimplifyCFGPass preceding RemoveTrapsPass #84852

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

6 changes: 0 additions & 6 deletions clang/lib/CodeGen/BackendUtil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@
#include "llvm/Transforms/Scalar/EarlyCSE.h"
#include "llvm/Transforms/Scalar/GVN.h"
#include "llvm/Transforms/Scalar/JumpThreading.h"
#include "llvm/Transforms/Scalar/SimplifyCFG.h"
#include "llvm/Transforms/Utils/Debugify.h"
#include "llvm/Transforms/Utils/EntryExitInstrumenter.h"
#include "llvm/Transforms/Utils/ModuleUtils.h"
Expand Down Expand Up @@ -753,11 +752,6 @@ static void addSanitizers(const Triple &TargetTriple,
// from `buildInlinerPipeline`, which called after profile matching.
PB.registerScalarOptimizerLateEPCallback(
[](FunctionPassManager &FPM, OptimizationLevel Level) {
// RemoveTrapsPass expects trap blocks preceded by conditional
// branches, which usually is not the case without SimplifyCFG.
// TODO: Remove `SimplifyCFGPass` after switching to dedicated
// intrinsic.
FPM.addPass(SimplifyCFGPass());
FPM.addPass(RemoveTrapsPass());
});
}
Expand Down