mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 18:54:02 +01:00
Revert "[NewPM] Add OptimizationLevel param to registerPipelineStartEPCallback"
This reverts commit 7a83aa0520d24ee5285a9c60b97b57a1db1d65e8. Causing buildbot failures.
This commit is contained in:
parent
753c4830f9
commit
3a6a4e9f83
@ -587,7 +587,7 @@ public:
|
||||
/// pipeline. This does not apply to 'backend' compiles (LTO and ThinLTO
|
||||
/// link-time pipelines).
|
||||
void registerPipelineStartEPCallback(
|
||||
const std::function<void(ModulePassManager &, OptimizationLevel)> &C) {
|
||||
const std::function<void(ModulePassManager &)> &C) {
|
||||
PipelineStartEPCallbacks.push_back(C);
|
||||
}
|
||||
|
||||
@ -722,7 +722,7 @@ private:
|
||||
SmallVector<std::function<void(ModulePassManager &, OptimizationLevel)>, 2>
|
||||
OptimizerLastEPCallbacks;
|
||||
// Module callbacks
|
||||
SmallVector<std::function<void(ModulePassManager &, OptimizationLevel)>, 2>
|
||||
SmallVector<std::function<void(ModulePassManager &)>, 2>
|
||||
PipelineStartEPCallbacks;
|
||||
SmallVector<std::function<void(ModuleAnalysisManager &)>, 2>
|
||||
ModuleAnalysisRegistrationCallbacks;
|
||||
|
@ -1319,7 +1319,7 @@ PassBuilder::buildPerModuleDefaultPipeline(OptimizationLevel Level,
|
||||
|
||||
// Apply module pipeline start EP callback.
|
||||
for (auto &C : PipelineStartEPCallbacks)
|
||||
C(MPM, Level);
|
||||
C(MPM);
|
||||
|
||||
if (PGOOpt && PGOOpt->SamplePGOSupport)
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(AddDiscriminatorsPass()));
|
||||
@ -1348,7 +1348,7 @@ PassBuilder::buildThinLTOPreLinkDefaultPipeline(OptimizationLevel Level) {
|
||||
|
||||
// Apply module pipeline start EP callback.
|
||||
for (auto &C : PipelineStartEPCallbacks)
|
||||
C(MPM, Level);
|
||||
C(MPM);
|
||||
|
||||
// If we are planning to perform ThinLTO later, we don't bloat the code with
|
||||
// unrolling/vectorization/... now. Just simplify the module as much as we
|
||||
|
@ -125,13 +125,12 @@ void BPFTargetMachine::adjustPassManager(PassManagerBuilder &Builder) {
|
||||
|
||||
void BPFTargetMachine::registerPassBuilderCallbacks(PassBuilder &PB,
|
||||
bool DebugPassManager) {
|
||||
PB.registerPipelineStartEPCallback(
|
||||
[=](ModulePassManager &MPM, PassBuilder::OptimizationLevel) {
|
||||
FunctionPassManager FPM(DebugPassManager);
|
||||
FPM.addPass(BPFAbstractMemberAccessPass(this));
|
||||
FPM.addPass(BPFPreserveDITypePass());
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
|
||||
});
|
||||
PB.registerPipelineStartEPCallback([=](ModulePassManager &MPM) {
|
||||
FunctionPassManager FPM(DebugPassManager);
|
||||
FPM.addPass(BPFAbstractMemberAccessPass(this));
|
||||
FPM.addPass(BPFPreserveDITypePass());
|
||||
MPM.addPass(createModuleToFunctionPassAdaptor(std::move(FPM)));
|
||||
});
|
||||
PB.registerPeepholeEPCallback([=](FunctionPassManager &FPM,
|
||||
PassBuilder::OptimizationLevel Level) {
|
||||
FPM.addPass(SimplifyCFGPass(SimplifyCFGOptions().hoistCommonInsts(true)));
|
||||
|
@ -190,11 +190,10 @@ static void registerEPCallbacks(PassBuilder &PB) {
|
||||
Err(PB.parsePassPipeline(PM, VectorizerStartEPPipeline));
|
||||
});
|
||||
if (tryParsePipelineText<ModulePassManager>(PB, PipelineStartEPPipeline))
|
||||
PB.registerPipelineStartEPCallback(
|
||||
[&PB](ModulePassManager &PM, PassBuilder::OptimizationLevel) {
|
||||
ExitOnError Err("Unable to parse PipelineStartEP pipeline: ");
|
||||
Err(PB.parsePassPipeline(PM, PipelineStartEPPipeline));
|
||||
});
|
||||
PB.registerPipelineStartEPCallback([&PB](ModulePassManager &PM) {
|
||||
ExitOnError Err("Unable to parse PipelineStartEP pipeline: ");
|
||||
Err(PB.parsePassPipeline(PM, PipelineStartEPPipeline));
|
||||
});
|
||||
if (tryParsePipelineText<FunctionPassManager>(PB, OptimizerLastEPPipeline))
|
||||
PB.registerOptimizerLastEPCallback(
|
||||
[&PB](ModulePassManager &PM, PassBuilder::OptimizationLevel) {
|
||||
|
Loading…
Reference in New Issue
Block a user