[PATCH] D152636: [Transforms] Remove AddDiscriminatorsLegacyPass
Kazu Hirata via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 10 15:32:54 PDT 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2509c93edd36: [Transforms] Remove AddDiscriminatorsLegacyPass (authored by kazu).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152636/new/
https://reviews.llvm.org/D152636
Files:
llvm/include/llvm/InitializePasses.h
llvm/lib/Transforms/Utils/AddDiscriminators.cpp
llvm/lib/Transforms/Utils/Utils.cpp
Index: llvm/lib/Transforms/Utils/Utils.cpp
===================================================================
--- llvm/lib/Transforms/Utils/Utils.cpp
+++ llvm/lib/Transforms/Utils/Utils.cpp
@@ -21,7 +21,6 @@
/// initializeTransformUtils - Initialize all passes in the TransformUtils
/// library.
void llvm::initializeTransformUtils(PassRegistry &Registry) {
- initializeAddDiscriminatorsLegacyPassPass(Registry);
initializeAssumeBuilderPassLegacyPassPass(Registry);
initializeBreakCriticalEdgesPass(Registry);
initializeCanonicalizeFreezeInLoopsPass(Registry);
Index: llvm/lib/Transforms/Utils/AddDiscriminators.cpp
===================================================================
--- llvm/lib/Transforms/Utils/AddDiscriminators.cpp
+++ llvm/lib/Transforms/Utils/AddDiscriminators.cpp
@@ -85,28 +85,6 @@
"no-discriminators", cl::init(false),
cl::desc("Disable generation of discriminator information."));
-namespace {
-
-// The legacy pass of AddDiscriminators.
-struct AddDiscriminatorsLegacyPass : public FunctionPass {
- static char ID; // Pass identification, replacement for typeid
-
- AddDiscriminatorsLegacyPass() : FunctionPass(ID) {
- initializeAddDiscriminatorsLegacyPassPass(*PassRegistry::getPassRegistry());
- }
-
- bool runOnFunction(Function &F) override;
-};
-
-} // end anonymous namespace
-
-char AddDiscriminatorsLegacyPass::ID = 0;
-
-INITIALIZE_PASS_BEGIN(AddDiscriminatorsLegacyPass, "add-discriminators",
- "Add DWARF path discriminators", false, false)
-INITIALIZE_PASS_END(AddDiscriminatorsLegacyPass, "add-discriminators",
- "Add DWARF path discriminators", false, false)
-
static bool shouldHaveDiscriminator(const Instruction *I) {
return !isa<IntrinsicInst>(I) || isa<MemIntrinsic>(I);
}
@@ -264,10 +242,6 @@
return Changed;
}
-bool AddDiscriminatorsLegacyPass::runOnFunction(Function &F) {
- return addDiscriminators(F);
-}
-
PreservedAnalyses AddDiscriminatorsPass::run(Function &F,
FunctionAnalysisManager &AM) {
if (!addDiscriminators(F))
Index: llvm/include/llvm/InitializePasses.h
===================================================================
--- llvm/include/llvm/InitializePasses.h
+++ llvm/include/llvm/InitializePasses.h
@@ -51,7 +51,6 @@
void initializeAAEvalLegacyPassPass(PassRegistry&);
void initializeAAResultsWrapperPassPass(PassRegistry&);
void initializeADCELegacyPassPass(PassRegistry&);
-void initializeAddDiscriminatorsLegacyPassPass(PassRegistry&);
void initializeAlwaysInlinerLegacyPassPass(PassRegistry&);
void initializeAssignmentTrackingAnalysisPass(PassRegistry &);
void initializeAssumeBuilderPassLegacyPassPass(PassRegistry &);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152636.530262.patch
Type: text/x-patch
Size: 2736 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230610/c3a0b694/attachment.bin>
More information about the llvm-commits
mailing list