LLVM  14.0.0git
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | List of all members
llvm::CodeGenPassBuilder< DerivedT > Class Template Reference

This class provides access to building LLVM's passes. More...

#include "llvm/CodeGen/CodeGenPassBuilder.h"

Collaboration diagram for llvm::CodeGenPassBuilder< DerivedT >:
Collaboration graph
[legend]

Classes

class  AddIRPass
 
class  AddMachinePass
 

Public Member Functions

 CodeGenPassBuilder (LLVMTargetMachine &TM, CGPassBuilderOption Opts, PassInstrumentationCallbacks *PIC)
 
Error buildPipeline (ModulePassManager &MPM, MachineFunctionPassManager &MFPM, raw_pwrite_stream &Out, raw_pwrite_stream *DwoOut, CodeGenFileType FileType) const
 
void registerModuleAnalyses (ModuleAnalysisManager &) const
 
void registerFunctionAnalyses (FunctionAnalysisManager &) const
 
void registerMachineFunctionAnalyses (MachineFunctionAnalysisManager &) const
 
std::pair< StringRef, bool > getPassNameFromLegacyName (StringRef) const
 
void registerAnalyses (MachineFunctionAnalysisManager &MFAM) const
 
PassInstrumentationCallbacksgetPassInstrumentationCallbacks () const
 

Protected Types

template<typename PassT >
using has_key_t = decltype(PassT::Key)
 
template<typename PassT >
using is_module_pass_t = decltype(std::declval< PassT & >().run(std::declval< Module & >(), std::declval< ModuleAnalysisManager & >()))
 
template<typename PassT >
using is_function_pass_t = decltype(std::declval< PassT & >().run(std::declval< Function & >(), std::declval< FunctionAnalysisManager & >()))
 
using CreateMCStreamer = std::function< Expected< std::unique_ptr< MCStreamer > >(MCContext &)>
 

Protected Member Functions

void registerTargetAnalysis (ModuleAnalysisManager &) const
 Target override these hooks to parse target-specific analyses. More...
 
void registerTargetAnalysis (FunctionAnalysisManager &) const
 
void registerTargetAnalysis (MachineFunctionAnalysisManager &) const
 
std::pair< StringRef, bool > getTargetPassNameFromLegacyName (StringRef) const
 
template<typename TMC >
TMC & getTM () const
 
CodeGenOpt::Level getOptLevel () const
 
bool isGlobalISelAbortEnabled () const
 Check whether or not GlobalISel should abort on error. More...
 
bool reportDiagnosticWhenGlobalISelFallback () const
 Check whether or not a diagnostic should be emitted when GlobalISel uses the fallback path. More...
 
Error addInstSelector (AddMachinePass &) const
 addInstSelector - This method should install an instruction selector pass, which converts from LLVM code to machine instructions. More...
 
void addILPOpts (AddMachinePass &) const
 Add passes that optimize instruction level parallelism for out-of-order targets. More...
 
void addPreRegAlloc (AddMachinePass &) const
 This method may be implemented by targets that want to run passes immediately before register allocation. More...
 
void addPreRewrite (AddMachinePass &) const
 addPreRewrite - Add passes to the optimized register allocation pipeline after register allocation is complete, but before virtual registers are rewritten to physical registers. More...
 
void addPostRewrite (AddMachinePass &) const
 Add passes to be run immediately after virtual registers are rewritten to physical registers. More...
 
void addPostRegAlloc (AddMachinePass &) const
 This method may be implemented by targets that want to run passes after register allocation pass pipeline but before prolog-epilog insertion. More...
 
void addPreSched2 (AddMachinePass &) const
 This method may be implemented by targets that want to run passes after prolog-epilog insertion and before the second instruction scheduling pass. More...
 
void addPreEmitPass (AddMachinePass &) const
 This pass may be implemented by targets that want to run passes immediately before machine code is emitted. More...
 
void addPreEmitPass2 (AddMachinePass &) const
 Targets may add passes immediately before machine code is emitted in this callback. More...
 
void addPreISel (AddIRPass &) const
 {{@ For GlobalISel More...
 
Error addIRTranslator (AddMachinePass &) const
 This method should install an IR translator pass, which converts from LLVM code to machine instructions with possibly generic opcodes. More...
 
void addPreLegalizeMachineIR (AddMachinePass &) const
 This method may be implemented by targets that want to run passes immediately before legalization. More...
 
Error addLegalizeMachineIR (AddMachinePass &) const
 This method should install a legalize pass, which converts the instruction sequence into one that can be selected by the target. More...
 
void addPreRegBankSelect (AddMachinePass &) const
 This method may be implemented by targets that want to run passes immediately before the register bank selection. More...
 
Error addRegBankSelect (AddMachinePass &) const
 This method should install a register bank selector pass, which assigns register banks to virtual registers without a register class or register banks. More...
 
void addPreGlobalInstructionSelect (AddMachinePass &) const
 This method may be implemented by targets that want to run passes immediately before the (global) instruction selection. More...
 
Error addGlobalInstructionSelect (AddMachinePass &) const
 This method should install a (global) instruction selector pass, which converts possibly generic instructions to fully target-specific instructions, thereby constraining all generic virtual registers to register classes. More...
 
void addISelPasses (AddIRPass &) const
 High level function that adds all passes necessary to go from llvm IR representation to the MI representation. More...
 
Error addCoreISelPasses (AddMachinePass &) const
 Add the actual instruction selection passes. More...
 
Error addMachinePasses (AddMachinePass &) const
 Add the complete, standard set of LLVM CodeGen passes. More...
 
void addPassesToHandleExceptions (AddIRPass &) const
 Add passes to lower exception handling for the code generator. More...
 
void addIRPasses (AddIRPass &) const
 Add common target configurable passes that perform LLVM IR to IR transforms following machine independent optimization. More...
 
void addCodeGenPrepare (AddIRPass &) const
 Add pass to prepare the LLVM IR for code generation. More...
 
void addISelPrepare (AddIRPass &) const
 Add common passes that perform LLVM IR to IR transforms in preparation for instruction selection. More...
 
void addMachineSSAOptimization (AddMachinePass &) const
 Methods with trivial inline returns are convenient points in the common codegen pass pipeline where targets may insert passes. More...
 
Error addFastRegAlloc (AddMachinePass &) const
 addFastRegAlloc - Add the minimum set of target-independent passes that are required for fast register allocation. More...
 
void addOptimizedRegAlloc (AddMachinePass &) const
 addOptimizedRegAlloc - Add passes related to register allocation. More...
 
void addMachineLateOptimization (AddMachinePass &) const
 Add passes that optimize machine instructions after register allocation. More...
 
void addGCPasses (AddMachinePass &) const
 addGCPasses - Add late codegen passes that analyze code for garbage collection. More...
 
void addBlockPlacement (AddMachinePass &) const
 Add standard basic block placement passes. More...
 
void addAsmPrinter (AddMachinePass &, CreateMCStreamer) const
 
void addTargetRegisterAllocator (AddMachinePass &, bool Optimized) const
 Utilities for targets to add passes to the pass manager. More...
 
void addRegAllocPass (AddMachinePass &, bool Optimized) const
 addMachinePasses helper to create the target-selected or overriden regalloc pass. More...
 
Error addRegAssignmentFast (AddMachinePass &) const
 Add core register alloator passes which do the actual register assignment and rewriting. More...
 
Error addRegAssignmentOptimized (AddMachinePass &) const
 

Protected Attributes

LLVMTargetMachineTM
 
CGPassBuilderOption Opt
 
PassInstrumentationCallbacksPIC
 

Detailed Description

template<typename DerivedT>
class llvm::CodeGenPassBuilder< DerivedT >

This class provides access to building LLVM's passes.

Its members provide the baseline state available to passes during their construction. The MachinePassRegistry.def file specifies how to construct all of the built-in passes, and those may reference these members during construction.

Definition at line 108 of file CodeGenPassBuilder.h.

Member Typedef Documentation

◆ CreateMCStreamer

template<typename DerivedT >
using llvm::CodeGenPassBuilder< DerivedT >::CreateMCStreamer = std::function<Expected<std::unique_ptr<MCStreamer> >(MCContext &)>
protected

Definition at line 439 of file CodeGenPassBuilder.h.

◆ has_key_t

template<typename DerivedT >
template<typename PassT >
using llvm::CodeGenPassBuilder< DerivedT >::has_key_t = decltype(PassT::Key)
protected

Definition at line 148 of file CodeGenPassBuilder.h.

◆ is_function_pass_t

template<typename DerivedT >
template<typename PassT >
using llvm::CodeGenPassBuilder< DerivedT >::is_function_pass_t = decltype(std::declval<PassT &>().run( std::declval<Function &>(), std::declval<FunctionAnalysisManager &>()))
protected

Definition at line 156 of file CodeGenPassBuilder.h.

◆ is_module_pass_t

template<typename DerivedT >
template<typename PassT >
using llvm::CodeGenPassBuilder< DerivedT >::is_module_pass_t = decltype(std::declval<PassT &>().run( std::declval<Module &>(), std::declval<ModuleAnalysisManager &>()))
protected

Definition at line 152 of file CodeGenPassBuilder.h.

Constructor & Destructor Documentation

◆ CodeGenPassBuilder()

template<typename DerivedT >
llvm::CodeGenPassBuilder< DerivedT >::CodeGenPassBuilder ( LLVMTargetMachine TM,
CGPassBuilderOption  Opts,
PassInstrumentationCallbacks PIC 
)
inlineexplicit

Member Function Documentation

◆ addAsmPrinter()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addAsmPrinter ( AddMachinePass ,
CreateMCStreamer   
) const
inlineprotected

Definition at line 440 of file CodeGenPassBuilder.h.

References llvm_unreachable.

◆ addBlockPlacement()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addBlockPlacement ( AddMachinePass addPass) const
protected

Add standard basic block placement passes.

Definition at line 1140 of file CodeGenPassBuilder.h.

◆ addCodeGenPrepare()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addCodeGenPrepare ( AddIRPass addPass) const
protected

Add pass to prepare the LLVM IR for code generation.

This should be done before exception handling preparation passes.

Definition at line 722 of file CodeGenPassBuilder.h.

References llvm::CodeGenOpt::None.

◆ addCoreISelPasses()

template<typename Derived >
Error llvm::CodeGenPassBuilder< Derived >::addCoreISelPasses ( AddMachinePass addPass) const
protected

Add the actual instruction selection passes.

This does not include preparation passes on IR.

Definition at line 751 of file CodeGenPassBuilder.h.

References llvm::CodeGenOpt::None, and TM.

◆ addFastRegAlloc()

template<typename Derived >
Error llvm::CodeGenPassBuilder< Derived >::addFastRegAlloc ( AddMachinePass addPass) const
protected

addFastRegAlloc - Add the minimum set of target-independent passes that are required for fast register allocation.

Add the minimum set of target-independent passes that are required for register allocation.

No coalescing or scheduling.

Definition at line 1065 of file CodeGenPassBuilder.h.

◆ addGCPasses()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addGCPasses ( AddMachinePass ) const
inlineprotected

addGCPasses - Add late codegen passes that analyze code for garbage collection.

This should return true if GC info should be printed after these passes.

Definition at line 433 of file CodeGenPassBuilder.h.

◆ addGlobalInstructionSelect()

template<typename DerivedT >
Error llvm::CodeGenPassBuilder< DerivedT >::addGlobalInstructionSelect ( AddMachinePass ) const
inlineprotected

This method should install a (global) instruction selector pass, which converts possibly generic instructions to fully target-specific instructions, thereby constraining all generic virtual registers to register classes.

Definition at line 372 of file CodeGenPassBuilder.h.

References llvm::inconvertibleErrorCode().

◆ addILPOpts()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addILPOpts ( AddMachinePass ) const
inlineprotected

Add passes that optimize instruction level parallelism for out-of-order targets.

These passes are run while the machine code is still in SSA form, so they can use MachineTraceMetrics to control their heuristics.

All passes added here should preserve the MachineDominatorTree, MachineLoopInfo, and MachineTraceMetrics analyses.

Definition at line 282 of file CodeGenPassBuilder.h.

◆ addInstSelector()

template<typename DerivedT >
Error llvm::CodeGenPassBuilder< DerivedT >::addInstSelector ( AddMachinePass ) const
inlineprotected

addInstSelector - This method should install an instruction selector pass, which converts from LLVM code to machine instructions.

Definition at line 271 of file CodeGenPassBuilder.h.

References llvm::inconvertibleErrorCode().

◆ addIRPasses()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addIRPasses ( AddIRPass addPass) const
protected

Add common target configurable passes that perform LLVM IR to IR transforms following machine independent optimization.

Definition at line 615 of file CodeGenPassBuilder.h.

References llvm::createFunctionToLoopPassAdaptor(), llvm::dbgs(), and llvm::CodeGenOpt::None.

◆ addIRTranslator()

template<typename DerivedT >
Error llvm::CodeGenPassBuilder< DerivedT >::addIRTranslator ( AddMachinePass ) const
inlineprotected

This method should install an IR translator pass, which converts from LLVM code to machine instructions with possibly generic opcodes.

Definition at line 336 of file CodeGenPassBuilder.h.

References llvm::inconvertibleErrorCode().

◆ addISelPasses()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addISelPasses ( AddIRPass addPass) const
protected

High level function that adds all passes necessary to go from llvm IR representation to the MI representation.

Adds IR based lowering and target specific optimization passes and finally the core instruction selection passes.

Definition at line 600 of file CodeGenPassBuilder.h.

References TM.

◆ addISelPrepare()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addISelPrepare ( AddIRPass addPass) const
protected

Add common passes that perform LLVM IR to IR transforms in preparation for instruction selection.

Definition at line 732 of file CodeGenPassBuilder.h.

References llvm::dbgs().

◆ addLegalizeMachineIR()

template<typename DerivedT >
Error llvm::CodeGenPassBuilder< DerivedT >::addLegalizeMachineIR ( AddMachinePass ) const
inlineprotected

This method should install a legalize pass, which converts the instruction sequence into one that can be selected by the target.

Definition at line 347 of file CodeGenPassBuilder.h.

References llvm::inconvertibleErrorCode().

◆ addMachineLateOptimization()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addMachineLateOptimization ( AddMachinePass addPass) const
protected

Add passes that optimize machine instructions after register allocation.

Post RegAlloc Pass Configuration.

Add passes that optimize machine instructions after register allocation.

Definition at line 1122 of file CodeGenPassBuilder.h.

References TM.

◆ addMachinePasses()

template<typename Derived >
Error llvm::CodeGenPassBuilder< Derived >::addMachinePasses ( AddMachinePass addPass) const
protected

Add the complete, standard set of LLVM CodeGen passes.

Add the complete set of target-independent postISel code generator passes.

Fully developed targets will not generally override this.

This can be read as the standard order of major LLVM CodeGen stages. Stages with nontrivial configuration or multiple passes are broken out below in addStage routines.

Any CodeGenPassBuilder<Derived>::addXX routine may be overriden by the Target. The addPre/Post methods with empty header implementations allow injecting target-specific fixups just before or after major stages. Additionally, targets have the flexibility to change pass order within a stage by overriding default implementation of addStage routines below. Each technique has maintainability tradeoffs because alternate pass orders are not well supported. addPre/Post works better if the target pass is easily tied to a common pass. But if it has subtle dependencies on multiple passes, the target should override the stage instead.

Add passes that optimize machine instructions after register allocation.

Definition at line 843 of file CodeGenPassBuilder.h.

References llvm::CodeGenOpt::None, and TM.

◆ addMachineSSAOptimization()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addMachineSSAOptimization ( AddMachinePass addPass) const
protected

Methods with trivial inline returns are convenient points in the common codegen pass pipeline where targets may insert passes.

Add passes that optimize machine instructions in SSA form.

Methods with out-of-line standard implementations are major CodeGen stages called by addMachinePasses. Some targets may override major stages when inserting passes is insufficient, but maintaining overriden stages is more work. addMachineSSAOptimization - Add standard passes that optimize machine instructions in SSA form.

Definition at line 948 of file CodeGenPassBuilder.h.

◆ addOptimizedRegAlloc()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addOptimizedRegAlloc ( AddMachinePass addPass) const
protected

addOptimizedRegAlloc - Add passes related to register allocation.

Add standard target-independent passes that are tightly coupled with optimized register allocation, including coalescing, machine instruction scheduling, and register allocation itself.

LLVMTargetMachine provides standard regalloc passes for most targets.

Definition at line 1076 of file CodeGenPassBuilder.h.

◆ addPassesToHandleExceptions()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addPassesToHandleExceptions ( AddIRPass addPass) const
protected

Add passes to lower exception handling for the code generator.

Turn exception handling constructs into something the code generators can handle.

Definition at line 676 of file CodeGenPassBuilder.h.

References llvm::AIX, llvm::ARM, assert(), llvm::DwarfCFI, llvm::MCAsmInfo::getExceptionHandlingType(), LLVM_FALLTHROUGH, llvm::None, llvm::SjLj, TM, llvm::Wasm, and llvm::WinEH.

◆ addPostRegAlloc()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPostRegAlloc ( AddMachinePass ) const
inlineprotected

This method may be implemented by targets that want to run passes after register allocation pass pipeline but before prolog-epilog insertion.

Definition at line 308 of file CodeGenPassBuilder.h.

◆ addPostRewrite()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPostRewrite ( AddMachinePass ) const
inlineprotected

Add passes to be run immediately after virtual registers are rewritten to physical registers.

Definition at line 304 of file CodeGenPassBuilder.h.

◆ addPreEmitPass()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreEmitPass ( AddMachinePass ) const
inlineprotected

This pass may be implemented by targets that want to run passes immediately before machine code is emitted.

Definition at line 316 of file CodeGenPassBuilder.h.

◆ addPreEmitPass2()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreEmitPass2 ( AddMachinePass ) const
inlineprotected

Targets may add passes immediately before machine code is emitted in this callback.

This is called even later than addPreEmitPass.

Definition at line 323 of file CodeGenPassBuilder.h.

◆ addPreGlobalInstructionSelect()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreGlobalInstructionSelect ( AddMachinePass ) const
inlineprotected

This method may be implemented by targets that want to run passes immediately before the (global) instruction selection.

Definition at line 366 of file CodeGenPassBuilder.h.

◆ addPreISel()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreISel ( AddIRPass ) const
inlineprotected

{{@ For GlobalISel

addPreISel - This method should add any "last minute" LLVM->LLVM passes (which are run just before instruction selector).

Definition at line 330 of file CodeGenPassBuilder.h.

References llvm_unreachable.

◆ addPreLegalizeMachineIR()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreLegalizeMachineIR ( AddMachinePass ) const
inlineprotected

This method may be implemented by targets that want to run passes immediately before legalization.

Definition at line 343 of file CodeGenPassBuilder.h.

◆ addPreRegAlloc()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreRegAlloc ( AddMachinePass ) const
inlineprotected

This method may be implemented by targets that want to run passes immediately before register allocation.

Definition at line 286 of file CodeGenPassBuilder.h.

◆ addPreRegBankSelect()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreRegBankSelect ( AddMachinePass ) const
inlineprotected

This method may be implemented by targets that want to run passes immediately before the register bank selection.

Definition at line 354 of file CodeGenPassBuilder.h.

◆ addPreRewrite()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreRewrite ( AddMachinePass ) const
inlineprotected

addPreRewrite - Add passes to the optimized register allocation pipeline after register allocation is complete, but before virtual registers are rewritten to physical registers.

These passes must preserve VirtRegMap and LiveIntervals, and when running after RABasic or RAGreedy, they should take advantage of LiveRegMatrix. When these passes run, VirtRegMap contains legal physreg assignments for all virtual registers.

Note if the target overloads addRegAssignAndRewriteOptimized, this may not be honored. This is also not generally used for the the fast variant, where the allocation and rewriting are done in one pass.

Definition at line 300 of file CodeGenPassBuilder.h.

◆ addPreSched2()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::addPreSched2 ( AddMachinePass ) const
inlineprotected

This method may be implemented by targets that want to run passes after prolog-epilog insertion and before the second instruction scheduling pass.

Definition at line 312 of file CodeGenPassBuilder.h.

◆ addRegAllocPass()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addRegAllocPass ( AddMachinePass addPass,
bool  Optimized 
) const
protected

addMachinePasses helper to create the target-selected or overriden regalloc pass.

Find and instantiate the register allocation pass requested by this target at the current optimization level.

Different register allocators are defined as separate passes because they may require different analysis.

Definition at line 1012 of file CodeGenPassBuilder.h.

References llvm::Basic, llvm::Default, llvm::Fast, llvm::Greedy, llvm_unreachable, and llvm::PBQP.

◆ addRegAssignmentFast()

template<typename Derived >
Error llvm::CodeGenPassBuilder< Derived >::addRegAssignmentFast ( AddMachinePass addPass) const
protected

Add core register alloator passes which do the actual register assignment and rewriting.

Returns
true if any passes were added.

Definition at line 1030 of file CodeGenPassBuilder.h.

References llvm::Default, llvm::Fast, llvm::inconvertibleErrorCode(), and llvm::Error::success().

◆ addRegAssignmentOptimized()

template<typename Derived >
Error llvm::CodeGenPassBuilder< Derived >::addRegAssignmentOptimized ( AddMachinePass addPass) const
protected

Definition at line 1043 of file CodeGenPassBuilder.h.

References llvm::Error::success().

◆ addRegBankSelect()

template<typename DerivedT >
Error llvm::CodeGenPassBuilder< DerivedT >::addRegBankSelect ( AddMachinePass ) const
inlineprotected

This method should install a register bank selector pass, which assigns register banks to virtual registers without a register class or register banks.

Definition at line 359 of file CodeGenPassBuilder.h.

References llvm::inconvertibleErrorCode().

◆ addTargetRegisterAllocator()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::addTargetRegisterAllocator ( AddMachinePass addPass,
bool  Optimized 
) const
protected

Utilities for targets to add passes to the pass manager.

Register Allocation Pass Configuration.

createTargetRegisterAllocator - Create the register allocator pass for this target at the current optimization level.

Instantiate the default register allocator pass for this target for either the optimized or unoptimized allocation path. This will be added to the pass manager by addFastRegAlloc in the unoptimized case or addOptimizedRegAlloc in the optimized case.

A target that uses the standard regalloc pass order for fast or optimized allocation may still override this for per-target regalloc selection. But -regalloc=... always takes precedence.

Definition at line 1000 of file CodeGenPassBuilder.h.

◆ buildPipeline()

template<typename Derived >
Error llvm::CodeGenPassBuilder< Derived >::buildPipeline ( ModulePassManager MPM,
MachineFunctionPassManager MFPM,
raw_pwrite_stream Out,
raw_pwrite_stream DwoOut,
CodeGenFileType  FileType 
) const

Definition at line 468 of file CodeGenPassBuilder.h.

References MPM.

◆ getOptLevel()

template<typename DerivedT >
CodeGenOpt::Level llvm::CodeGenPassBuilder< DerivedT >::getOptLevel ( ) const
inlineprotected

◆ getPassInstrumentationCallbacks()

template<typename DerivedT >
PassInstrumentationCallbacks* llvm::CodeGenPassBuilder< DerivedT >::getPassInstrumentationCallbacks ( ) const
inline

Definition at line 143 of file CodeGenPassBuilder.h.

References llvm::CodeGenPassBuilder< DerivedT >::PIC.

◆ getPassNameFromLegacyName()

template<typename Derived >
std::pair< StringRef, bool > llvm::CodeGenPassBuilder< Derived >::getPassNameFromLegacyName ( StringRef  Name) const

Definition at line 558 of file CodeGenPassBuilder.h.

References llvm::report_fatal_error(), and llvm::MipsISD::Ret.

◆ getTargetPassNameFromLegacyName()

template<typename DerivedT >
std::pair<StringRef, bool> llvm::CodeGenPassBuilder< DerivedT >::getTargetPassNameFromLegacyName ( StringRef  ) const
inlineprotected

Definition at line 248 of file CodeGenPassBuilder.h.

◆ getTM()

template<typename DerivedT >
template<typename TMC >
TMC& llvm::CodeGenPassBuilder< DerivedT >::getTM ( ) const
inlineprotected

Definition at line 252 of file CodeGenPassBuilder.h.

References llvm::CodeGenPassBuilder< DerivedT >::TM.

◆ isGlobalISelAbortEnabled()

template<typename DerivedT >
bool llvm::CodeGenPassBuilder< DerivedT >::isGlobalISelAbortEnabled ( ) const
inlineprotected

Check whether or not GlobalISel should abort on error.

When this is disabled, GlobalISel will fall back on SDISel instead of erroring out.

Definition at line 258 of file CodeGenPassBuilder.h.

References llvm::Enable, llvm::TargetOptions::GlobalISelAbort, llvm::TargetMachine::Options, and llvm::CodeGenPassBuilder< DerivedT >::TM.

◆ registerAnalyses()

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::registerAnalyses ( MachineFunctionAnalysisManager MFAM) const
inline

◆ registerFunctionAnalyses()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::registerFunctionAnalyses ( FunctionAnalysisManager FAM) const

◆ registerMachineFunctionAnalyses()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::registerMachineFunctionAnalyses ( MachineFunctionAnalysisManager MFAM) const

◆ registerModuleAnalyses()

template<typename Derived >
void llvm::CodeGenPassBuilder< Derived >::registerModuleAnalyses ( ModuleAnalysisManager MAM) const

Definition at line 524 of file CodeGenPassBuilder.h.

References MAM.

Referenced by llvm::CodeGenPassBuilder< DerivedT >::registerAnalyses().

◆ registerTargetAnalysis() [1/3]

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::registerTargetAnalysis ( FunctionAnalysisManager ) const
inlineprotected

Definition at line 246 of file CodeGenPassBuilder.h.

◆ registerTargetAnalysis() [2/3]

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::registerTargetAnalysis ( MachineFunctionAnalysisManager ) const
inlineprotected

Definition at line 247 of file CodeGenPassBuilder.h.

◆ registerTargetAnalysis() [3/3]

template<typename DerivedT >
void llvm::CodeGenPassBuilder< DerivedT >::registerTargetAnalysis ( ModuleAnalysisManager ) const
inlineprotected

Target override these hooks to parse target-specific analyses.

Definition at line 245 of file CodeGenPassBuilder.h.

◆ reportDiagnosticWhenGlobalISelFallback()

template<typename DerivedT >
bool llvm::CodeGenPassBuilder< DerivedT >::reportDiagnosticWhenGlobalISelFallback ( ) const
inlineprotected

Check whether or not a diagnostic should be emitted when GlobalISel uses the fallback path.

In other words, it will emit a diagnostic when GlobalISel failed and isGlobalISelAbortEnabled is false.

Definition at line 265 of file CodeGenPassBuilder.h.

References llvm::DisableWithDiag, llvm::TargetOptions::GlobalISelAbort, llvm::TargetMachine::Options, and llvm::CodeGenPassBuilder< DerivedT >::TM.

Member Data Documentation

◆ Opt

template<typename DerivedT >
CGPassBuilderOption llvm::CodeGenPassBuilder< DerivedT >::Opt
protected

◆ PIC

template<typename DerivedT >
PassInstrumentationCallbacks* llvm::CodeGenPassBuilder< DerivedT >::PIC
protected

◆ TM

template<typename DerivedT >
LLVMTargetMachine& llvm::CodeGenPassBuilder< DerivedT >::TM
protected

The documentation for this class was generated from the following file: