Skip to content

Commit

Permalink
[clang][CodeGen] Remove SimplifyCFGPass preceding RemoveTrapsPass (#8…
Browse files Browse the repository at this point in the history
…4852)

There is no performance difference after switching to
`llvm.experimental.hot`.
  • Loading branch information
vitalybuka committed Apr 5, 2024
1 parent 90453f4 commit b76eb1d
Showing 1 changed file with 0 additions and 6 deletions.
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

0 comments on commit b76eb1d

Please sign in to comment.