31 std::unique_ptr<ToolOutputFile> &DwoOS,
33 bool DisableSimplifyLibCalls) {
39 if (DisableSimplifyLibCalls)
57 std::unique_ptr<ToolOutputFile> &DwoOS,
73 PB.registerModuleAnalyses(
MAM);
74 PB.registerCGSCCAnalyses(
CGAM);
75 PB.registerFunctionAnalyses(
FAM);
76 PB.registerLoopAnalyses(
LAM);
77 PB.registerMachineFunctionAnalyses(MFAM);
82 Error BuildPipelineError =
85 if (BuildPipelineError)
86 return BuildPipelineError;
94 std::unique_ptr<ToolOutputFile> &DwoOS,
96 bool DisableSimplifyLibCalls,
98 if (
valueOr(PassesOptions::Global.force_new_pm_codegen,
104 DisableSimplifyLibCalls);
This header provides classes for managing passes over SCCs of the call graph.
This header defines various interfaces for pass management in LLVM.
This header provides classes for managing per-loop analyses.
CGSCCAnalysisManager CGAM
FunctionAnalysisManager FAM
ModuleAnalysisManager MAM
PassInstrumentationCallbacks PIC
PassBuilder PB(Machine, PassOpts->PTO, std::nullopt, &PIC)
static Error runCodeGenPipelineLegacy(TargetMachine &TM, Module &M, raw_pwrite_stream &OS, std::unique_ptr< ToolOutputFile > &DwoOS, CodeGenFileType CGFT, bool DisableVerify, bool DisableSimplifyLibCalls)
static Error runCodeGenPipelineNewPM(TargetMachine &TM, Module &M, raw_pwrite_stream &OS, std::unique_ptr< ToolOutputFile > &DwoOS, CodeGenFileType CGFT, bool DisableVerify, IntrusiveRefCntPtr< vfs::FileSystem > VFS)
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...
An analysis that produces MachineModuleInfo for a module.
This class contains meta information specific to a module.
const MCContext & getContext() const
A Module instance is used to store all the information related to an LLVM module.
This class provides access to building LLVM's passes.
This class manages callbacks registration, as well as provides a way for PassInstrumentation to pass ...
PreservedAnalyses run(IRUnitT &IR, AnalysisManagerT &AM, ExtraArgTs... ExtraArgs)
Run all of the passes in this manager over the given unit of IR.
Tunable parameters for passes in the default pipelines.
Implementation of the target library information.
LLVM_ABI void disableAllFunctions()
Disables all builtins.
Primary interface to the complete machine description for the target machine.
virtual bool shouldDefaultToNewPM() const
Returns true if frontends should default to using the NewPM for this specific target.
virtual bool addPassesToEmitFile(PassManagerBase &, raw_pwrite_stream &, raw_pwrite_stream *, CodeGenFileType, bool=true, MachineModuleInfoWrapperPass *MMIWP=nullptr)
Add passes to the specified pass manager to get the specified file emitted.
virtual Error buildCodeGenPipeline(ModulePassManager &MPM, ModuleAnalysisManager &MAM, raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut, CodeGenFileType FileType, const CGPassBuilderOption &Opt, MCContext &Ctx, PassInstrumentationCallbacks *PIC)
const Triple & getTargetTriple() const
TargetIRAnalysis getTargetIRAnalysis() const
Get a TargetIRAnalysis appropriate for the target.
VectorLibrary VecLib
Vector math library to use.
PassManager manages ModulePassManagers.
void add(Pass *P) override
Add a pass to the queue of passes to run.
bool run(Module &M)
run - Execute all of the passes scheduled for execution.
An abstract base class for streams implementations that also support a pwrite operation.
Interfaces for registering analysis passes, producing common pass manager configurations,...
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
AnalysisManager< LazyCallGraph::SCC, LazyCallGraph & > CGSCCAnalysisManager
The CGSCC analysis manager.
AnalysisManager< Loop, LoopStandardAnalysisResults & > LoopAnalysisManager
The loop analysis manager.
CodeGenFileType
These enums are meant to be passed into addPassesToEmitFile to indicate what type of file to emit,...
PassManager< Module > ModulePassManager
Convenience typedef for a pass manager over modules.
LLVM_ABI ImmutablePass * createTargetTransformInfoWrapperPass(TargetIRAnalysis TIRA)
Create an analysis pass wrapper around a TTI object.
constexpr bool valueOr(BoolOrDefault X, bool Default)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
LLVM_ABI Error runCodeGenPipeline(TargetMachine &TM, Module &M, raw_pwrite_stream &OS, std::unique_ptr< ToolOutputFile > &DwoOS, CodeGenFileType CGFT, bool DisableVerify=true, bool DisableSimplifyLibCalls=false, IntrusiveRefCntPtr< vfs::FileSystem > VFS=vfs::getRealFileSystem())
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
LLVM_ABI CGPassBuilderOption getCGPassBuilderOption()