1 //===- NewPMDriver.cpp - Driver for opt with new PM -----------------------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 /// \file 9 /// 10 /// This file is just a split of the code that logically belongs in opt.cpp but 11 /// that includes the new pass manager headers. 12 /// 13 //===----------------------------------------------------------------------===// 14 15 #include "NewPMDriver.h" 16 #include "llvm/ADT/SmallVector.h" 17 #include "llvm/ADT/StringRef.h" 18 #include "llvm/Analysis/AliasAnalysis.h" 19 #include "llvm/Analysis/CGSCCPassManager.h" 20 #include "llvm/Analysis/TargetLibraryInfo.h" 21 #include "llvm/Bitcode/BitcodeWriterPass.h" 22 #include "llvm/Config/llvm-config.h" 23 #include "llvm/IR/Dominators.h" 24 #include "llvm/IR/IRPrintingPasses.h" 25 #include "llvm/IR/LLVMContext.h" 26 #include "llvm/IR/Module.h" 27 #include "llvm/IR/PassManager.h" 28 #include "llvm/IR/Verifier.h" 29 #include "llvm/Passes/PassBuilder.h" 30 #include "llvm/Passes/PassPlugin.h" 31 #include "llvm/Passes/StandardInstrumentations.h" 32 #include "llvm/Support/ErrorHandling.h" 33 #include "llvm/Support/ToolOutputFile.h" 34 #include "llvm/Target/TargetMachine.h" 35 #include "llvm/Transforms/IPO/ThinLTOBitcodeWriter.h" 36 #include "llvm/Transforms/Instrumentation/AddressSanitizer.h" 37 #include "llvm/Transforms/Scalar/LoopPassManager.h" 38 #include "llvm/Transforms/Utils/Debugify.h" 39 40 using namespace llvm; 41 using namespace opt_tool; 42 43 namespace llvm { 44 cl::opt<bool> DebugifyEach( 45 "debugify-each", 46 cl::desc("Start each pass with debugify and end it with check-debugify")); 47 48 cl::opt<std::string> 49 DebugifyExport("debugify-export", 50 cl::desc("Export per-pass debugify statistics to this file"), 51 cl::value_desc("filename")); 52 } // namespace llvm 53 54 enum class DebugLogging { None, Normal, Verbose, Quiet }; 55 56 static cl::opt<DebugLogging> DebugPM( 57 "debug-pass-manager", cl::Hidden, cl::ValueOptional, 58 cl::desc("Print pass management debugging information"), 59 cl::init(DebugLogging::None), 60 cl::values( 61 clEnumValN(DebugLogging::Normal, "", ""), 62 clEnumValN(DebugLogging::Quiet, "quiet", 63 "Skip printing info about analyses"), 64 clEnumValN( 65 DebugLogging::Verbose, "verbose", 66 "Print extra information about adaptors and pass managers"))); 67 68 // This flag specifies a textual description of the alias analysis pipeline to 69 // use when querying for aliasing information. It only works in concert with 70 // the "passes" flag above. 71 static cl::opt<std::string> 72 AAPipeline("aa-pipeline", 73 cl::desc("A textual description of the alias analysis " 74 "pipeline for handling managed aliasing queries"), 75 cl::Hidden, cl::init("default")); 76 77 /// {{@ These options accept textual pipeline descriptions which will be 78 /// inserted into default pipelines at the respective extension points 79 static cl::opt<std::string> PeepholeEPPipeline( 80 "passes-ep-peephole", 81 cl::desc("A textual description of the function pass pipeline inserted at " 82 "the Peephole extension points into default pipelines"), 83 cl::Hidden); 84 static cl::opt<std::string> LateLoopOptimizationsEPPipeline( 85 "passes-ep-late-loop-optimizations", 86 cl::desc( 87 "A textual description of the loop pass pipeline inserted at " 88 "the LateLoopOptimizations extension point into default pipelines"), 89 cl::Hidden); 90 static cl::opt<std::string> LoopOptimizerEndEPPipeline( 91 "passes-ep-loop-optimizer-end", 92 cl::desc("A textual description of the loop pass pipeline inserted at " 93 "the LoopOptimizerEnd extension point into default pipelines"), 94 cl::Hidden); 95 static cl::opt<std::string> ScalarOptimizerLateEPPipeline( 96 "passes-ep-scalar-optimizer-late", 97 cl::desc("A textual description of the function pass pipeline inserted at " 98 "the ScalarOptimizerLate extension point into default pipelines"), 99 cl::Hidden); 100 static cl::opt<std::string> CGSCCOptimizerLateEPPipeline( 101 "passes-ep-cgscc-optimizer-late", 102 cl::desc("A textual description of the cgscc pass pipeline inserted at " 103 "the CGSCCOptimizerLate extension point into default pipelines"), 104 cl::Hidden); 105 static cl::opt<std::string> VectorizerStartEPPipeline( 106 "passes-ep-vectorizer-start", 107 cl::desc("A textual description of the function pass pipeline inserted at " 108 "the VectorizerStart extension point into default pipelines"), 109 cl::Hidden); 110 static cl::opt<std::string> PipelineStartEPPipeline( 111 "passes-ep-pipeline-start", 112 cl::desc("A textual description of the module pass pipeline inserted at " 113 "the PipelineStart extension point into default pipelines"), 114 cl::Hidden); 115 static cl::opt<std::string> PipelineEarlySimplificationEPPipeline( 116 "passes-ep-pipeline-early-simplification", 117 cl::desc("A textual description of the module pass pipeline inserted at " 118 "the EarlySimplification extension point into default pipelines"), 119 cl::Hidden); 120 static cl::opt<std::string> OptimizerEarlyEPPipeline( 121 "passes-ep-optimizer-early", 122 cl::desc("A textual description of the module pass pipeline inserted at " 123 "the OptimizerEarly extension point into default pipelines"), 124 cl::Hidden); 125 static cl::opt<std::string> OptimizerLastEPPipeline( 126 "passes-ep-optimizer-last", 127 cl::desc("A textual description of the module pass pipeline inserted at " 128 "the OptimizerLast extension point into default pipelines"), 129 cl::Hidden); 130 static cl::opt<std::string> FullLinkTimeOptimizationEarlyEPPipeline( 131 "passes-ep-full-link-time-optimization-early", 132 cl::desc("A textual description of the module pass pipeline inserted at " 133 "the FullLinkTimeOptimizationEarly extension point into default " 134 "pipelines"), 135 cl::Hidden); 136 static cl::opt<std::string> FullLinkTimeOptimizationLastEPPipeline( 137 "passes-ep-full-link-time-optimization-last", 138 cl::desc("A textual description of the module pass pipeline inserted at " 139 "the FullLinkTimeOptimizationLast extension point into default " 140 "pipelines"), 141 cl::Hidden); 142 143 // Individual pipeline tuning options. 144 extern cl::opt<bool> DisableLoopUnrolling; 145 146 namespace llvm { 147 extern cl::opt<PGOKind> PGOKindFlag; 148 extern cl::opt<std::string> ProfileFile; 149 extern cl::opt<CSPGOKind> CSPGOKindFlag; 150 extern cl::opt<std::string> CSProfileGenFile; 151 extern cl::opt<bool> DisableBasicAA; 152 extern cl::opt<bool> PrintPipelinePasses; 153 } // namespace llvm 154 155 static cl::opt<std::string> 156 ProfileRemappingFile("profile-remapping-file", 157 cl::desc("Path to the profile remapping file."), 158 cl::Hidden); 159 static cl::opt<bool> DebugInfoForProfiling( 160 "new-pm-debug-info-for-profiling", cl::init(false), cl::Hidden, 161 cl::desc("Emit special debug info to enable PGO profile generation.")); 162 static cl::opt<bool> PseudoProbeForProfiling( 163 "new-pm-pseudo-probe-for-profiling", cl::init(false), cl::Hidden, 164 cl::desc("Emit pseudo probes to enable PGO profile generation.")); 165 /// @}} 166 167 template <typename PassManagerT> 168 bool tryParsePipelineText(PassBuilder &PB, 169 const cl::opt<std::string> &PipelineOpt) { 170 if (PipelineOpt.empty()) 171 return false; 172 173 // Verify the pipeline is parseable: 174 PassManagerT PM; 175 if (auto Err = PB.parsePassPipeline(PM, PipelineOpt)) { 176 errs() << "Could not parse -" << PipelineOpt.ArgStr 177 << " pipeline: " << toString(std::move(Err)) 178 << "... I'm going to ignore it.\n"; 179 return false; 180 } 181 return true; 182 } 183 184 /// If one of the EPPipeline command line options was given, register callbacks 185 /// for parsing and inserting the given pipeline 186 static void registerEPCallbacks(PassBuilder &PB) { 187 if (tryParsePipelineText<FunctionPassManager>(PB, PeepholeEPPipeline)) 188 PB.registerPeepholeEPCallback( 189 [&PB](FunctionPassManager &PM, OptimizationLevel Level) { 190 ExitOnError Err("Unable to parse PeepholeEP pipeline: "); 191 Err(PB.parsePassPipeline(PM, PeepholeEPPipeline)); 192 }); 193 if (tryParsePipelineText<LoopPassManager>(PB, 194 LateLoopOptimizationsEPPipeline)) 195 PB.registerLateLoopOptimizationsEPCallback( 196 [&PB](LoopPassManager &PM, OptimizationLevel Level) { 197 ExitOnError Err("Unable to parse LateLoopOptimizationsEP pipeline: "); 198 Err(PB.parsePassPipeline(PM, LateLoopOptimizationsEPPipeline)); 199 }); 200 if (tryParsePipelineText<LoopPassManager>(PB, LoopOptimizerEndEPPipeline)) 201 PB.registerLoopOptimizerEndEPCallback( 202 [&PB](LoopPassManager &PM, OptimizationLevel Level) { 203 ExitOnError Err("Unable to parse LoopOptimizerEndEP pipeline: "); 204 Err(PB.parsePassPipeline(PM, LoopOptimizerEndEPPipeline)); 205 }); 206 if (tryParsePipelineText<FunctionPassManager>(PB, 207 ScalarOptimizerLateEPPipeline)) 208 PB.registerScalarOptimizerLateEPCallback( 209 [&PB](FunctionPassManager &PM, OptimizationLevel Level) { 210 ExitOnError Err("Unable to parse ScalarOptimizerLateEP pipeline: "); 211 Err(PB.parsePassPipeline(PM, ScalarOptimizerLateEPPipeline)); 212 }); 213 if (tryParsePipelineText<CGSCCPassManager>(PB, CGSCCOptimizerLateEPPipeline)) 214 PB.registerCGSCCOptimizerLateEPCallback( 215 [&PB](CGSCCPassManager &PM, OptimizationLevel Level) { 216 ExitOnError Err("Unable to parse CGSCCOptimizerLateEP pipeline: "); 217 Err(PB.parsePassPipeline(PM, CGSCCOptimizerLateEPPipeline)); 218 }); 219 if (tryParsePipelineText<FunctionPassManager>(PB, VectorizerStartEPPipeline)) 220 PB.registerVectorizerStartEPCallback( 221 [&PB](FunctionPassManager &PM, OptimizationLevel Level) { 222 ExitOnError Err("Unable to parse VectorizerStartEP pipeline: "); 223 Err(PB.parsePassPipeline(PM, VectorizerStartEPPipeline)); 224 }); 225 if (tryParsePipelineText<ModulePassManager>(PB, PipelineStartEPPipeline)) 226 PB.registerPipelineStartEPCallback( 227 [&PB](ModulePassManager &PM, OptimizationLevel) { 228 ExitOnError Err("Unable to parse PipelineStartEP pipeline: "); 229 Err(PB.parsePassPipeline(PM, PipelineStartEPPipeline)); 230 }); 231 if (tryParsePipelineText<ModulePassManager>( 232 PB, PipelineEarlySimplificationEPPipeline)) 233 PB.registerPipelineEarlySimplificationEPCallback( 234 [&PB](ModulePassManager &PM, OptimizationLevel) { 235 ExitOnError Err("Unable to parse EarlySimplification pipeline: "); 236 Err(PB.parsePassPipeline(PM, PipelineEarlySimplificationEPPipeline)); 237 }); 238 if (tryParsePipelineText<ModulePassManager>(PB, OptimizerEarlyEPPipeline)) 239 PB.registerOptimizerEarlyEPCallback( 240 [&PB](ModulePassManager &PM, OptimizationLevel) { 241 ExitOnError Err("Unable to parse OptimizerEarlyEP pipeline: "); 242 Err(PB.parsePassPipeline(PM, OptimizerEarlyEPPipeline)); 243 }); 244 if (tryParsePipelineText<ModulePassManager>(PB, OptimizerLastEPPipeline)) 245 PB.registerOptimizerLastEPCallback( 246 [&PB](ModulePassManager &PM, OptimizationLevel) { 247 ExitOnError Err("Unable to parse OptimizerLastEP pipeline: "); 248 Err(PB.parsePassPipeline(PM, OptimizerLastEPPipeline)); 249 }); 250 if (tryParsePipelineText<ModulePassManager>( 251 PB, FullLinkTimeOptimizationEarlyEPPipeline)) 252 PB.registerFullLinkTimeOptimizationEarlyEPCallback( 253 [&PB](ModulePassManager &PM, OptimizationLevel) { 254 ExitOnError Err( 255 "Unable to parse FullLinkTimeOptimizationEarlyEP pipeline: "); 256 Err(PB.parsePassPipeline(PM, 257 FullLinkTimeOptimizationEarlyEPPipeline)); 258 }); 259 if (tryParsePipelineText<ModulePassManager>( 260 PB, FullLinkTimeOptimizationLastEPPipeline)) 261 PB.registerFullLinkTimeOptimizationLastEPCallback( 262 [&PB](ModulePassManager &PM, OptimizationLevel) { 263 ExitOnError Err( 264 "Unable to parse FullLinkTimeOptimizationLastEP pipeline: "); 265 Err(PB.parsePassPipeline(PM, FullLinkTimeOptimizationLastEPPipeline)); 266 }); 267 } 268 269 #define HANDLE_EXTENSION(Ext) \ 270 llvm::PassPluginLibraryInfo get##Ext##PluginInfo(); 271 #include "llvm/Support/Extension.def" 272 273 bool llvm::runPassPipeline(StringRef Arg0, Module &M, TargetMachine *TM, 274 TargetLibraryInfoImpl *TLII, ToolOutputFile *Out, 275 ToolOutputFile *ThinLTOLinkOut, 276 ToolOutputFile *OptRemarkFile, 277 StringRef PassPipeline, ArrayRef<StringRef> Passes, 278 ArrayRef<PassPlugin> PassPlugins, 279 OutputKind OK, VerifierKind VK, 280 bool ShouldPreserveAssemblyUseListOrder, 281 bool ShouldPreserveBitcodeUseListOrder, 282 bool EmitSummaryIndex, bool EmitModuleHash, 283 bool EnableDebugify) { 284 bool VerifyEachPass = VK == VK_VerifyEachPass; 285 286 Optional<PGOOptions> P; 287 switch (PGOKindFlag) { 288 case InstrGen: 289 P = PGOOptions(ProfileFile, "", "", PGOOptions::IRInstr); 290 break; 291 case InstrUse: 292 P = PGOOptions(ProfileFile, "", ProfileRemappingFile, PGOOptions::IRUse); 293 break; 294 case SampleUse: 295 P = PGOOptions(ProfileFile, "", ProfileRemappingFile, 296 PGOOptions::SampleUse); 297 break; 298 case NoPGO: 299 if (DebugInfoForProfiling || PseudoProbeForProfiling) 300 P = PGOOptions("", "", "", PGOOptions::NoAction, PGOOptions::NoCSAction, 301 DebugInfoForProfiling, PseudoProbeForProfiling); 302 else 303 P = None; 304 } 305 if (CSPGOKindFlag != NoCSPGO) { 306 if (P && (P->Action == PGOOptions::IRInstr || 307 P->Action == PGOOptions::SampleUse)) 308 errs() << "CSPGOKind cannot be used with IRInstr or SampleUse"; 309 if (CSPGOKindFlag == CSInstrGen) { 310 if (CSProfileGenFile.empty()) 311 errs() << "CSInstrGen needs to specify CSProfileGenFile"; 312 if (P) { 313 P->CSAction = PGOOptions::CSIRInstr; 314 P->CSProfileGenFile = CSProfileGenFile; 315 } else 316 P = PGOOptions("", CSProfileGenFile, ProfileRemappingFile, 317 PGOOptions::NoAction, PGOOptions::CSIRInstr); 318 } else /* CSPGOKindFlag == CSInstrUse */ { 319 if (!P) 320 errs() << "CSInstrUse needs to be together with InstrUse"; 321 P->CSAction = PGOOptions::CSIRUse; 322 } 323 } 324 if (TM) 325 TM->setPGOOption(P); 326 327 LoopAnalysisManager LAM; 328 FunctionAnalysisManager FAM; 329 CGSCCAnalysisManager CGAM; 330 ModuleAnalysisManager MAM; 331 332 PassInstrumentationCallbacks PIC; 333 PrintPassOptions PrintPassOpts; 334 PrintPassOpts.Verbose = DebugPM == DebugLogging::Verbose; 335 PrintPassOpts.SkipAnalyses = DebugPM == DebugLogging::Quiet; 336 StandardInstrumentations SI(DebugPM != DebugLogging::None, VerifyEachPass, 337 PrintPassOpts); 338 SI.registerCallbacks(PIC, &FAM); 339 DebugifyEachInstrumentation Debugify; 340 if (DebugifyEach) 341 Debugify.registerCallbacks(PIC); 342 343 PipelineTuningOptions PTO; 344 // LoopUnrolling defaults on to true and DisableLoopUnrolling is initialized 345 // to false above so we shouldn't necessarily need to check whether or not the 346 // option has been enabled. 347 PTO.LoopUnrolling = !DisableLoopUnrolling; 348 PassBuilder PB(TM, PTO, P, &PIC); 349 registerEPCallbacks(PB); 350 351 // For any loaded plugins, let them register pass builder callbacks. 352 for (auto &PassPlugin : PassPlugins) 353 PassPlugin.registerPassBuilderCallbacks(PB); 354 355 PB.registerPipelineParsingCallback( 356 [](StringRef Name, ModulePassManager &MPM, 357 ArrayRef<PassBuilder::PipelineElement>) { 358 AddressSanitizerOptions Opts; 359 if (Name == "asan-pipeline") { 360 MPM.addPass(ModuleAddressSanitizerPass(Opts)); 361 return true; 362 } 363 return false; 364 }); 365 366 #define HANDLE_EXTENSION(Ext) \ 367 get##Ext##PluginInfo().RegisterPassBuilderCallbacks(PB); 368 #include "llvm/Support/Extension.def" 369 370 // Specially handle the alias analysis manager so that we can register 371 // a custom pipeline of AA passes with it. 372 AAManager AA; 373 if (Passes.empty()) { 374 if (auto Err = PB.parseAAPipeline(AA, AAPipeline)) { 375 errs() << Arg0 << ": " << toString(std::move(Err)) << "\n"; 376 return false; 377 } 378 } 379 380 // For compatibility with the legacy PM AA pipeline. 381 // AAResultsWrapperPass by default provides basic-aa in the legacy PM 382 // unless -disable-basic-aa is specified. 383 // TODO: remove this once tests implicitly requiring basic-aa use -passes= and 384 // -aa-pipeline=basic-aa. 385 if (!Passes.empty() && !DisableBasicAA) { 386 if (auto Err = PB.parseAAPipeline(AA, "basic-aa")) { 387 errs() << Arg0 << ": " << toString(std::move(Err)) << "\n"; 388 return false; 389 } 390 } 391 392 // For compatibility with legacy pass manager. 393 // Alias analyses are not specially specified when using the legacy PM. 394 for (auto PassName : Passes) { 395 if (PB.isAAPassName(PassName)) { 396 if (auto Err = PB.parseAAPipeline(AA, PassName)) { 397 errs() << Arg0 << ": " << toString(std::move(Err)) << "\n"; 398 return false; 399 } 400 } 401 } 402 403 // Register the AA manager first so that our version is the one used. 404 FAM.registerPass([&] { return std::move(AA); }); 405 // Register our TargetLibraryInfoImpl. 406 FAM.registerPass([&] { return TargetLibraryAnalysis(*TLII); }); 407 408 // Register all the basic analyses with the managers. 409 PB.registerModuleAnalyses(MAM); 410 PB.registerCGSCCAnalyses(CGAM); 411 PB.registerFunctionAnalyses(FAM); 412 PB.registerLoopAnalyses(LAM); 413 PB.crossRegisterProxies(LAM, FAM, CGAM, MAM); 414 415 ModulePassManager MPM; 416 if (VK > VK_NoVerifier) 417 MPM.addPass(VerifierPass()); 418 if (EnableDebugify) 419 MPM.addPass(NewPMDebugifyPass()); 420 421 // Add passes according to the -passes options. 422 if (!PassPipeline.empty()) { 423 assert(Passes.empty() && 424 "PassPipeline and Passes should not both contain passes"); 425 if (auto Err = PB.parsePassPipeline(MPM, PassPipeline)) { 426 errs() << Arg0 << ": " << toString(std::move(Err)) << "\n"; 427 return false; 428 } 429 } 430 // Add passes specified using the legacy PM syntax (i.e. not using 431 // -passes). This should be removed later when such support has been 432 // deprecated, i.e. when all lit tests running opt (and not using 433 // -enable-new-pm=0) have been updated to use -passes. 434 for (auto PassName : Passes) { 435 std::string ModifiedPassName(PassName.begin(), PassName.end()); 436 if (PB.isAnalysisPassName(PassName)) 437 ModifiedPassName = "require<" + ModifiedPassName + ">"; 438 // FIXME: These translations are supposed to be removed when lit tests that 439 // use these names have been updated to use the -passes syntax (and when the 440 // support for using the old syntax to specify passes is considered as 441 // deprecated for the new PM). 442 if (ModifiedPassName == "early-cse-memssa") 443 ModifiedPassName = "early-cse<memssa>"; 444 else if (ModifiedPassName == "post-inline-ee-instrument") 445 ModifiedPassName = "ee-instrument<post-inline>"; 446 else if (ModifiedPassName == "loop-extract-single") 447 ModifiedPassName = "loop-extract<single>"; 448 else if (ModifiedPassName == "lower-matrix-intrinsics-minimal") 449 ModifiedPassName = "lower-matrix-intrinsics<minimal>"; 450 if (auto Err = PB.parsePassPipeline(MPM, ModifiedPassName)) { 451 errs() << Arg0 << ": " << toString(std::move(Err)) << "\n"; 452 return false; 453 } 454 } 455 456 if (VK > VK_NoVerifier) 457 MPM.addPass(VerifierPass()); 458 if (EnableDebugify) 459 MPM.addPass(NewPMCheckDebugifyPass()); 460 461 // Add any relevant output pass at the end of the pipeline. 462 switch (OK) { 463 case OK_NoOutput: 464 break; // No output pass needed. 465 case OK_OutputAssembly: 466 MPM.addPass( 467 PrintModulePass(Out->os(), "", ShouldPreserveAssemblyUseListOrder)); 468 break; 469 case OK_OutputBitcode: 470 MPM.addPass(BitcodeWriterPass(Out->os(), ShouldPreserveBitcodeUseListOrder, 471 EmitSummaryIndex, EmitModuleHash)); 472 break; 473 case OK_OutputThinLTOBitcode: 474 MPM.addPass(ThinLTOBitcodeWriterPass( 475 Out->os(), ThinLTOLinkOut ? &ThinLTOLinkOut->os() : nullptr)); 476 break; 477 } 478 479 // Before executing passes, print the final values of the LLVM options. 480 cl::PrintOptionValues(); 481 482 // Print a textual, '-passes=' compatible, representation of pipeline if 483 // requested. 484 if (PrintPipelinePasses) { 485 MPM.printPipeline(outs(), [&PIC](StringRef ClassName) { 486 auto PassName = PIC.getPassNameForClassName(ClassName); 487 return PassName.empty() ? ClassName : PassName; 488 }); 489 outs() << "\n"; 490 return true; 491 } 492 493 // Now that we have all of the passes ready, run them. 494 MPM.run(M, MAM); 495 496 // Declare success. 497 if (OK != OK_NoOutput) { 498 Out->keep(); 499 if (OK == OK_OutputThinLTOBitcode && ThinLTOLinkOut) 500 ThinLTOLinkOut->keep(); 501 } 502 503 if (OptRemarkFile) 504 OptRemarkFile->keep(); 505 506 if (DebugifyEach && !DebugifyExport.empty()) 507 exportDebugifyStats(DebugifyExport, Debugify.StatsMap); 508 509 return true; 510 } 511 512 void llvm::printPasses(raw_ostream &OS) { 513 PassBuilder PB; 514 PB.printPassNames(OS); 515 } 516