[llvm] e931c2e - [LegacyPM] Remove InstrOrderFileLegacyPass
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 23:59:03 PDT 2022
Author: Fangrui Song
Date: 2022-07-19T23:58:51-07:00
New Revision: e931c2e870f96a19669e354086c49fa3ec8e6716
URL: https://github.com/llvm/llvm-project/commit/e931c2e870f96a19669e354086c49fa3ec8e6716
DIFF: https://github.com/llvm/llvm-project/commit/e931c2e870f96a19669e354086c49fa3ec8e6716.diff
LOG: [LegacyPM] Remove InstrOrderFileLegacyPass
Following recent changes removing non-core features of the legacy
PM/optimization pipeline.
Added:
Modified:
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/Instrumentation.h
llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
llvm/test/Instrumentation/InstrOrderFile/basic.ll
Removed:
################################################################################
diff --git a/llvm/include/llvm/InitializePasses.h b/llvm/include/llvm/InitializePasses.h
index b1e51a2635cf0..df617361a6794 100644
--- a/llvm/include/llvm/InitializePasses.h
+++ b/llvm/include/llvm/InitializePasses.h
@@ -196,7 +196,6 @@ void initializeInlineCostAnalysisPass(PassRegistry&);
void initializeInstCountLegacyPassPass(PassRegistry &);
void initializeInstNamerPass(PassRegistry&);
void initializeInstSimplifyLegacyPassPass(PassRegistry &);
-void initializeInstrOrderFileLegacyPassPass(PassRegistry&);
void initializeInstructionCombiningPassPass(PassRegistry&);
void initializeInstructionSelectPass(PassRegistry&);
void initializeInterleavedAccessPass(PassRegistry&);
diff --git a/llvm/include/llvm/Transforms/Instrumentation.h b/llvm/include/llvm/Transforms/Instrumentation.h
index 20ea4581c05bd..0c688e3bdaf6f 100644
--- a/llvm/include/llvm/Transforms/Instrumentation.h
+++ b/llvm/include/llvm/Transforms/Instrumentation.h
@@ -123,8 +123,6 @@ struct InstrProfOptions {
InstrProfOptions() = default;
};
-ModulePass *createInstrOrderFilePass();
-
// Insert DataFlowSanitizer (dynamic data flow analysis) instrumentation
ModulePass *createDataFlowSanitizerLegacyPassPass(
const std::vector<std::string> &ABIListFiles = std::vector<std::string>());
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index fe3c9295c279a..f1b6f2bb7de4f 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -689,9 +689,6 @@ void PassManagerBuilder::populateModulePassManager(
// and saves running remaining passes on the eliminated functions.
MPM.add(createEliminateAvailableExternallyPass());
- if (EnableOrderFileInstrumentation)
- MPM.add(createInstrOrderFilePass());
-
MPM.add(createReversePostOrderFunctionAttrsPass());
// The inliner performs some kind of dead code elimination as it goes,
diff --git a/llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp b/llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
index 2091881c29fe3..d7561c193aa35 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp
@@ -163,42 +163,11 @@ struct InstrOrderFile {
}
}; // End of InstrOrderFile struct
-
-class InstrOrderFileLegacyPass : public ModulePass {
-public:
- static char ID;
-
- InstrOrderFileLegacyPass() : ModulePass(ID) {
- initializeInstrOrderFileLegacyPassPass(
- *PassRegistry::getPassRegistry());
- }
-
- bool runOnModule(Module &M) override;
-};
-
} // End anonymous namespace
-bool InstrOrderFileLegacyPass::runOnModule(Module &M) {
- if (skipModule(M))
- return false;
-
- return InstrOrderFile().run(M);
-}
-
PreservedAnalyses
InstrOrderFilePass::run(Module &M, ModuleAnalysisManager &AM) {
if (InstrOrderFile().run(M))
return PreservedAnalyses::none();
return PreservedAnalyses::all();
}
-
-INITIALIZE_PASS_BEGIN(InstrOrderFileLegacyPass, "instrorderfile",
- "Instrumentation for Order File", false, false)
-INITIALIZE_PASS_END(InstrOrderFileLegacyPass, "instrorderfile",
- "Instrumentation for Order File", false, false)
-
-char InstrOrderFileLegacyPass::ID = 0;
-
-ModulePass *llvm::createInstrOrderFilePass() {
- return new InstrOrderFileLegacyPass();
-}
diff --git a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
index 22ba2f58d2c00..bd575b6cf3b0c 100644
--- a/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
+++ b/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp
@@ -94,7 +94,6 @@ void llvm::initializeInstrumentation(PassRegistry &Registry) {
initializeMemProfilerLegacyPassPass(Registry);
initializeModuleMemProfilerLegacyPassPass(Registry);
initializeBoundsCheckingLegacyPassPass(Registry);
- initializeInstrOrderFileLegacyPassPass(Registry);
initializeDataFlowSanitizerLegacyPassPass(Registry);
}
diff --git a/llvm/test/Instrumentation/InstrOrderFile/basic.ll b/llvm/test/Instrumentation/InstrOrderFile/basic.ll
index 110873ac5eec7..7399ebad4519e 100644
--- a/llvm/test/Instrumentation/InstrOrderFile/basic.ll
+++ b/llvm/test/Instrumentation/InstrOrderFile/basic.ll
@@ -1,4 +1,3 @@
-; RUN: opt -instrorderfile -S < %s | FileCheck %s
; RUN: opt -passes=instrorderfile -S < %s | FileCheck %s
target triple = "x86_64-apple-macosx10.10.0"
More information about the llvm-commits
mailing list