1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00

[LTO][NewPM] Run verifier when doing LTO

This matches the legacy PM.

Reviewed By: ychen

Differential Revision: https://reviews.llvm.org/D92138
This commit is contained in:
Arthur Eubanks 2020-12-01 10:14:38 -08:00
parent b7eee47753
commit 3801be51e1

View File

@ -250,7 +250,9 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
ModulePassManager MPM(Conf.DebugPassManager);
// FIXME (davide): verify the input.
if (!Conf.DisableVerify)
MPM.addPass(VerifierPass());
PassBuilder::OptimizationLevel OL;
@ -272,12 +274,14 @@ static void runNewPMPasses(const Config &Conf, Module &Mod, TargetMachine *TM,
}
if (IsThinLTO)
MPM = PB.buildThinLTODefaultPipeline(OL, ImportSummary);
MPM.addPass(PB.buildThinLTODefaultPipeline(OL, ImportSummary));
else
MPM = PB.buildLTODefaultPipeline(OL, ExportSummary);
MPM.run(Mod, MAM);
MPM.addPass(PB.buildLTODefaultPipeline(OL, ExportSummary));
// FIXME (davide): verify the output.
if (!Conf.DisableVerify)
MPM.addPass(VerifierPass());
MPM.run(Mod, MAM);
}
static void runNewPMCustomPasses(const Config &Conf, Module &Mod,