[IRGen] Add flags to control LLVM verify-each.

Analogous to -sil-verify-all, the new flags cause LLVM verification to
be run after each LLVM optimization pass.
This commit is contained in:
Nate Chandler
2025-03-14 17:49:17 -07:00
parent 974767eb83
commit dd8c715aa6
4 changed files with 14 additions and 2 deletions

View File

@@ -294,7 +294,7 @@ void swift::performLLVMOptimizations(const IRGenOptions &Opts,
PrintPassOpts.Indent = DebugPassStructure;
PrintPassOpts.SkipAnalyses = DebugPassStructure;
StandardInstrumentations SI(Module->getContext(), DebugPassStructure,
/*VerifyEach*/ false, PrintPassOpts);
Opts.VerifyEach, PrintPassOpts);
SI.registerCallbacks(PIC, &MAM);
PassBuilder PB(TargetMachine, PTO, PGOOpt, &PIC);