@@ -289,17 +289,15 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
289
289
}
290
290
291
291
static void runNewPMCustomPasses (const Config &Conf, Module &Mod,
292
- TargetMachine *TM, std::string PipelineDesc,
293
- std::string AAPipelineDesc,
294
- bool DisableVerify) {
292
+ TargetMachine *TM) {
295
293
PassBuilder PB (Conf.DebugPassManager , TM);
296
294
AAManager AA;
297
295
298
296
// Parse a custom AA pipeline if asked to.
299
- if (!AAPipelineDesc .empty ())
300
- if (auto Err = PB.parseAAPipeline (AA, AAPipelineDesc ))
297
+ if (!Conf. AAPipeline .empty ())
298
+ if (auto Err = PB.parseAAPipeline (AA, Conf. AAPipeline ))
301
299
report_fatal_error (" unable to parse AA pipeline description '" +
302
- AAPipelineDesc + " ': " + toString (std::move (Err)));
300
+ Conf. AAPipeline + " ': " + toString (std::move (Err)));
303
301
304
302
RegisterPassPlugins (Conf.PassPlugins , PB);
305
303
@@ -330,11 +328,11 @@ static void runNewPMCustomPasses(const Config &Conf, Module &Mod,
330
328
MPM.addPass (VerifierPass ());
331
329
332
330
// Now, add all the passes we've been requested to.
333
- if (auto Err = PB.parsePassPipeline (MPM, PipelineDesc ))
331
+ if (auto Err = PB.parsePassPipeline (MPM, Conf. OptPipeline ))
334
332
report_fatal_error (" unable to parse pass pipeline description '" +
335
- PipelineDesc + " ': " + toString (std::move (Err)));
333
+ Conf. OptPipeline + " ': " + toString (std::move (Err)));
336
334
337
- if (!DisableVerify)
335
+ if (!Conf. DisableVerify )
338
336
MPM.addPass (VerifierPass ());
339
337
MPM.run (Mod, MAM);
340
338
}
@@ -395,8 +393,7 @@ bool lto::opt(const Config &Conf, TargetMachine *TM, unsigned Task, Module &Mod,
395
393
}
396
394
// FIXME: Plumb the combined index into the new pass manager.
397
395
if (!Conf.OptPipeline .empty ())
398
- runNewPMCustomPasses (Conf, Mod, TM, Conf.OptPipeline , Conf.AAPipeline ,
399
- Conf.DisableVerify );
396
+ runNewPMCustomPasses (Conf, Mod, TM);
400
397
else if (Conf.UseNewPM )
401
398
runNewPMPasses (Conf, Mod, TM, Conf.OptLevel , IsThinLTO, ExportSummary,
402
399
ImportSummary);
0 commit comments