Skip to content

Commit e931c2e

Browse files
committed
[LegacyPM] Remove InstrOrderFileLegacyPass
Following recent changes removing non-core features of the legacy PM/optimization pipeline.
1 parent c96ddd7 commit e931c2e

File tree

6 files changed

+0
-39
lines changed

6 files changed

+0
-39
lines changed

llvm/include/llvm/InitializePasses.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ void initializeInlineCostAnalysisPass(PassRegistry&);
196196
void initializeInstCountLegacyPassPass(PassRegistry &);
197197
void initializeInstNamerPass(PassRegistry&);
198198
void initializeInstSimplifyLegacyPassPass(PassRegistry &);
199-
void initializeInstrOrderFileLegacyPassPass(PassRegistry&);
200199
void initializeInstructionCombiningPassPass(PassRegistry&);
201200
void initializeInstructionSelectPass(PassRegistry&);
202201
void initializeInterleavedAccessPass(PassRegistry&);

llvm/include/llvm/Transforms/Instrumentation.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,6 @@ struct InstrProfOptions {
123123
InstrProfOptions() = default;
124124
};
125125

126-
ModulePass *createInstrOrderFilePass();
127-
128126
// Insert DataFlowSanitizer (dynamic data flow analysis) instrumentation
129127
ModulePass *createDataFlowSanitizerLegacyPassPass(
130128
const std::vector<std::string> &ABIListFiles = std::vector<std::string>());

llvm/lib/Transforms/IPO/PassManagerBuilder.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -689,9 +689,6 @@ void PassManagerBuilder::populateModulePassManager(
689689
// and saves running remaining passes on the eliminated functions.
690690
MPM.add(createEliminateAvailableExternallyPass());
691691

692-
if (EnableOrderFileInstrumentation)
693-
MPM.add(createInstrOrderFilePass());
694-
695692
MPM.add(createReversePostOrderFunctionAttrsPass());
696693

697694
// The inliner performs some kind of dead code elimination as it goes,

llvm/lib/Transforms/Instrumentation/InstrOrderFile.cpp

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -163,42 +163,11 @@ struct InstrOrderFile {
163163
}
164164

165165
}; // End of InstrOrderFile struct
166-
167-
class InstrOrderFileLegacyPass : public ModulePass {
168-
public:
169-
static char ID;
170-
171-
InstrOrderFileLegacyPass() : ModulePass(ID) {
172-
initializeInstrOrderFileLegacyPassPass(
173-
*PassRegistry::getPassRegistry());
174-
}
175-
176-
bool runOnModule(Module &M) override;
177-
};
178-
179166
} // End anonymous namespace
180167

181-
bool InstrOrderFileLegacyPass::runOnModule(Module &M) {
182-
if (skipModule(M))
183-
return false;
184-
185-
return InstrOrderFile().run(M);
186-
}
187-
188168
PreservedAnalyses
189169
InstrOrderFilePass::run(Module &M, ModuleAnalysisManager &AM) {
190170
if (InstrOrderFile().run(M))
191171
return PreservedAnalyses::none();
192172
return PreservedAnalyses::all();
193173
}
194-
195-
INITIALIZE_PASS_BEGIN(InstrOrderFileLegacyPass, "instrorderfile",
196-
"Instrumentation for Order File", false, false)
197-
INITIALIZE_PASS_END(InstrOrderFileLegacyPass, "instrorderfile",
198-
"Instrumentation for Order File", false, false)
199-
200-
char InstrOrderFileLegacyPass::ID = 0;
201-
202-
ModulePass *llvm::createInstrOrderFilePass() {
203-
return new InstrOrderFileLegacyPass();
204-
}

llvm/lib/Transforms/Instrumentation/Instrumentation.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ void llvm::initializeInstrumentation(PassRegistry &Registry) {
9494
initializeMemProfilerLegacyPassPass(Registry);
9595
initializeModuleMemProfilerLegacyPassPass(Registry);
9696
initializeBoundsCheckingLegacyPassPass(Registry);
97-
initializeInstrOrderFileLegacyPassPass(Registry);
9897
initializeDataFlowSanitizerLegacyPassPass(Registry);
9998
}
10099

llvm/test/Instrumentation/InstrOrderFile/basic.ll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
; RUN: opt -instrorderfile -S < %s | FileCheck %s
21
; RUN: opt -passes=instrorderfile -S < %s | FileCheck %s
32

43
target triple = "x86_64-apple-macosx10.10.0"

0 commit comments

Comments
 (0)