LLVM 17.0.0git
Classes | Functions
llvm::codegen Namespace Reference

Classes

struct  RegisterCodeGenFlags
 Create this object with static storage to register codegen-related command line options. More...
 

Functions

std::string getMArch ()
 
std::string getMCPU ()
 
std::vector< std::string > getMAttrs ()
 
Reloc::Model getRelocModel ()
 
std::optional< Reloc::ModelgetExplicitRelocModel ()
 
ThreadModel::Model getThreadModel ()
 
CodeModel::Model getCodeModel ()
 
std::optional< CodeModel::ModelgetExplicitCodeModel ()
 
llvm::ExceptionHandling getExceptionModel ()
 
std::optional< CodeGenFileTypegetExplicitFileType ()
 
CodeGenFileType getFileType ()
 
FramePointerKind getFramePointerUsage ()
 
bool getEnableUnsafeFPMath ()
 
bool getEnableNoInfsFPMath ()
 
bool getEnableNoNaNsFPMath ()
 
bool getEnableNoSignedZerosFPMath ()
 
bool getEnableApproxFuncFPMath ()
 
bool getEnableNoTrappingFPMath ()
 
DenormalMode::DenormalModeKind getDenormalFPMath ()
 
DenormalMode::DenormalModeKind getDenormalFP32Math ()
 
bool getEnableHonorSignDependentRoundingFPMath ()
 
llvm::FloatABI::ABIType getFloatABIForCalls ()
 
llvm::FPOpFusion::FPOpFusionMode getFuseFPOps ()
 
SwiftAsyncFramePointerMode getSwiftAsyncFramePointer ()
 
bool getDontPlaceZerosInBSS ()
 
bool getEnableGuaranteedTailCallOpt ()
 
bool getEnableAIXExtendedAltivecABI ()
 
bool getDisableTailCalls ()
 
bool getStackSymbolOrdering ()
 
unsigned getOverrideStackAlignment ()
 
bool getStackRealign ()
 
std::string getTrapFuncName ()
 
bool getUseCtors ()
 
bool getRelaxELFRelocations ()
 
bool getDataSections ()
 
std::optional< boolgetExplicitDataSections ()
 
bool getFunctionSections ()
 
std::optional< boolgetExplicitFunctionSections ()
 
bool getIgnoreXCOFFVisibility ()
 
bool getXCOFFTracebackTable ()
 
std::string getBBSections ()
 
unsigned getTLSSize ()
 
bool getEmulatedTLS ()
 
std::optional< boolgetExplicitEmulatedTLS ()
 
bool getUniqueSectionNames ()
 
bool getUniqueBasicBlockSectionNames ()
 
llvm::EABI getEABIVersion ()
 
llvm::DebuggerKind getDebuggerTuningOpt ()
 
bool getEnableStackSizeSection ()
 
bool getEnableAddrsig ()
 
bool getEmitCallSiteInfo ()
 
bool getEnableMachineFunctionSplitter ()
 
bool getEnableDebugEntryValues ()
 
bool getValueTrackingVariableLocations ()
 
std::optional< boolgetExplicitValueTrackingVariableLocations ()
 
bool getForceDwarfFrameSection ()
 
bool getXRayOmitFunctionIndex ()
 
bool getDebugStrictDwarf ()
 
unsigned getAlignLoops ()
 
bool getJMCInstrument ()
 
bool getXCOFFReadOnlyPointers ()
 
llvm::BasicBlockSection getBBSectionsMode (llvm::TargetOptions &Options)
 
TargetOptions InitTargetOptionsFromCodeGenFlags (const llvm::Triple &TheTriple)
 Common utility function tightly tied to the options listed here.
 
std::string getCPUStr ()
 
std::string getFeaturesStr ()
 
std::vector< std::string > getFeatureList ()
 
void renderBoolStringAttr (AttrBuilder &B, StringRef Name, bool Val)
 
void setFunctionAttributes (StringRef CPU, StringRef Features, Function &F)
 Set function attributes of function F based on CPU, Features, and command line flags.
 
void setFunctionAttributes (StringRef CPU, StringRef Features, Module &M)
 Set function attributes of functions in Module M based on CPU, Features, and command line flags.
 
bool getDefaultValueTrackingVariableLocations (const llvm::Triple &T)
 Should value-tracking variable locations / instruction referencing be enabled by default for this triple?
 

Function Documentation

◆ getAlignLoops()

unsigned llvm::codegen::getAlignLoops ( )

◆ getBBSections()

std::string llvm::codegen::getBBSections ( )

Referenced by getBBSectionsMode().

◆ getBBSectionsMode()

llvm::BasicBlockSection llvm::codegen::getBBSectionsMode ( llvm::TargetOptions Options)

◆ getCodeModel()

CodeModel::Model llvm::codegen::getCodeModel ( )

◆ getCPUStr()

std::string llvm::codegen::getCPUStr ( )

Definition at line 577 of file CommandFlags.cpp.

References llvm::sys::getHostCPUName(), and getMCPU().

◆ getDataSections()

bool llvm::codegen::getDataSections ( )

◆ getDebuggerTuningOpt()

llvm::DebuggerKind llvm::codegen::getDebuggerTuningOpt ( )

◆ getDebugStrictDwarf()

bool llvm::codegen::getDebugStrictDwarf ( )

◆ getDefaultValueTrackingVariableLocations()

bool llvm::codegen::getDefaultValueTrackingVariableLocations ( const llvm::Triple T)

Should value-tracking variable locations / instruction referencing be enabled by default for this triple?

◆ getDenormalFP32Math()

DenormalMode::DenormalModeKind llvm::codegen::getDenormalFP32Math ( )

Referenced by setFunctionAttributes().

◆ getDenormalFPMath()

DenormalMode::DenormalModeKind llvm::codegen::getDenormalFPMath ( )

◆ getDisableTailCalls()

bool llvm::codegen::getDisableTailCalls ( )

Referenced by setFunctionAttributes().

◆ getDontPlaceZerosInBSS()

bool llvm::codegen::getDontPlaceZerosInBSS ( )

◆ getEABIVersion()

llvm::EABI llvm::codegen::getEABIVersion ( )

◆ getEmitCallSiteInfo()

bool llvm::codegen::getEmitCallSiteInfo ( )

◆ getEmulatedTLS()

bool llvm::codegen::getEmulatedTLS ( )

◆ getEnableAddrsig()

bool llvm::codegen::getEnableAddrsig ( )

◆ getEnableAIXExtendedAltivecABI()

bool llvm::codegen::getEnableAIXExtendedAltivecABI ( )

◆ getEnableApproxFuncFPMath()

bool llvm::codegen::getEnableApproxFuncFPMath ( )

◆ getEnableDebugEntryValues()

bool llvm::codegen::getEnableDebugEntryValues ( )

◆ getEnableGuaranteedTailCallOpt()

bool llvm::codegen::getEnableGuaranteedTailCallOpt ( )

◆ getEnableHonorSignDependentRoundingFPMath()

bool llvm::codegen::getEnableHonorSignDependentRoundingFPMath ( )

◆ getEnableMachineFunctionSplitter()

bool llvm::codegen::getEnableMachineFunctionSplitter ( )

◆ getEnableNoInfsFPMath()

bool llvm::codegen::getEnableNoInfsFPMath ( )

◆ getEnableNoNaNsFPMath()

bool llvm::codegen::getEnableNoNaNsFPMath ( )

◆ getEnableNoSignedZerosFPMath()

bool llvm::codegen::getEnableNoSignedZerosFPMath ( )

◆ getEnableNoTrappingFPMath()

bool llvm::codegen::getEnableNoTrappingFPMath ( )

◆ getEnableStackSizeSection()

bool llvm::codegen::getEnableStackSizeSection ( )

◆ getEnableUnsafeFPMath()

bool llvm::codegen::getEnableUnsafeFPMath ( )

◆ getExceptionModel()

llvm::ExceptionHandling llvm::codegen::getExceptionModel ( )

◆ getExplicitCodeModel()

std::optional< CodeModel::Model > llvm::codegen::getExplicitCodeModel ( )

◆ getExplicitDataSections()

std::optional< bool > llvm::codegen::getExplicitDataSections ( )

◆ getExplicitEmulatedTLS()

std::optional< bool > llvm::codegen::getExplicitEmulatedTLS ( )

◆ getExplicitFileType()

std::optional< CodeGenFileType > llvm::codegen::getExplicitFileType ( )

◆ getExplicitFunctionSections()

std::optional< bool > llvm::codegen::getExplicitFunctionSections ( )

◆ getExplicitRelocModel()

std::optional< Reloc::Model > llvm::codegen::getExplicitRelocModel ( )

◆ getExplicitValueTrackingVariableLocations()

std::optional< bool > llvm::codegen::getExplicitValueTrackingVariableLocations ( )

◆ getFeatureList()

std::vector< std::string > llvm::codegen::getFeatureList ( )

◆ getFeaturesStr()

std::string llvm::codegen::getFeaturesStr ( )

◆ getFileType()

CodeGenFileType llvm::codegen::getFileType ( )

◆ getFloatABIForCalls()

llvm::FloatABI::ABIType llvm::codegen::getFloatABIForCalls ( )

◆ getForceDwarfFrameSection()

bool llvm::codegen::getForceDwarfFrameSection ( )

◆ getFramePointerUsage()

FramePointerKind llvm::codegen::getFramePointerUsage ( )

Referenced by setFunctionAttributes().

◆ getFunctionSections()

bool llvm::codegen::getFunctionSections ( )

◆ getFuseFPOps()

llvm::FPOpFusion::FPOpFusionMode llvm::codegen::getFuseFPOps ( )

◆ getIgnoreXCOFFVisibility()

bool llvm::codegen::getIgnoreXCOFFVisibility ( )

◆ getJMCInstrument()

bool llvm::codegen::getJMCInstrument ( )

◆ getMArch()

std::string llvm::codegen::getMArch ( )

◆ getMAttrs()

std::vector< std::string > llvm::codegen::getMAttrs ( )

Referenced by getFeatureList(), and getFeaturesStr().

◆ getMCPU()

std::string llvm::codegen::getMCPU ( )

◆ getOverrideStackAlignment()

unsigned llvm::codegen::getOverrideStackAlignment ( )

◆ getRelaxELFRelocations()

bool llvm::codegen::getRelaxELFRelocations ( )

◆ getRelocModel()

Reloc::Model llvm::codegen::getRelocModel ( )

◆ getStackRealign()

bool llvm::codegen::getStackRealign ( )

Referenced by setFunctionAttributes().

◆ getStackSymbolOrdering()

bool llvm::codegen::getStackSymbolOrdering ( )

◆ getSwiftAsyncFramePointer()

SwiftAsyncFramePointerMode llvm::codegen::getSwiftAsyncFramePointer ( )

◆ getThreadModel()

ThreadModel::Model llvm::codegen::getThreadModel ( )

◆ getTLSSize()

unsigned llvm::codegen::getTLSSize ( )

◆ getTrapFuncName()

std::string llvm::codegen::getTrapFuncName ( )

Referenced by setFunctionAttributes().

◆ getUniqueBasicBlockSectionNames()

bool llvm::codegen::getUniqueBasicBlockSectionNames ( )

◆ getUniqueSectionNames()

bool llvm::codegen::getUniqueSectionNames ( )

◆ getUseCtors()

bool llvm::codegen::getUseCtors ( )

◆ getValueTrackingVariableLocations()

bool llvm::codegen::getValueTrackingVariableLocations ( )

◆ getXCOFFReadOnlyPointers()

bool llvm::codegen::getXCOFFReadOnlyPointers ( )

◆ getXCOFFTracebackTable()

bool llvm::codegen::getXCOFFTracebackTable ( )

◆ getXRayOmitFunctionIndex()

bool llvm::codegen::getXRayOmitFunctionIndex ( )

◆ InitTargetOptionsFromCodeGenFlags()

TargetOptions llvm::codegen::InitTargetOptionsFromCodeGenFlags ( const llvm::Triple TheTriple)

Common utility function tightly tied to the options listed here.

Initializes a TargetOptions object with CodeGen flags and returns it. TheTriple is used to determine the default value for options if options are not explicitly specified. If those triple dependant options value do not have effect for your component, a default Triple() could be passed in.

Definition at line 519 of file CommandFlags.cpp.

References llvm::FloatABI::Default, getAlignLoops(), getBBSectionsMode(), getDebuggerTuningOpt(), getDebugStrictDwarf(), getDenormalFPMath(), getDontPlaceZerosInBSS(), getEABIVersion(), getEmitCallSiteInfo(), getEnableAddrsig(), getEnableAIXExtendedAltivecABI(), getEnableApproxFuncFPMath(), getEnableDebugEntryValues(), getEnableGuaranteedTailCallOpt(), getEnableHonorSignDependentRoundingFPMath(), getEnableMachineFunctionSplitter(), getEnableNoInfsFPMath(), getEnableNoNaNsFPMath(), getEnableNoSignedZerosFPMath(), getEnableNoTrappingFPMath(), getEnableStackSizeSection(), getEnableUnsafeFPMath(), getExceptionModel(), getExplicitDataSections(), getExplicitEmulatedTLS(), getFloatABIForCalls(), getForceDwarfFrameSection(), getFunctionSections(), getFuseFPOps(), getIgnoreXCOFFVisibility(), getJMCInstrument(), getRelaxELFRelocations(), getStackSymbolOrdering(), getSwiftAsyncFramePointer(), getThreadModel(), getTLSSize(), getUniqueBasicBlockSectionNames(), getUniqueSectionNames(), getUseCtors(), getXCOFFReadOnlyPointers(), getXCOFFTracebackTable(), getXRayOmitFunctionIndex(), llvm::Triple::hasDefaultDataSections(), llvm::Triple::hasDefaultEmulatedTLS(), llvm::mc::InitMCTargetOptionsFromFlags(), and Options.

◆ renderBoolStringAttr()

void llvm::codegen::renderBoolStringAttr ( AttrBuilder B,
StringRef  Name,
bool  Val 
)

Definition at line 627 of file CommandFlags.cpp.

References B, and Name.

◆ setFunctionAttributes() [1/2]

void llvm::codegen::setFunctionAttributes ( StringRef  CPU,
StringRef  Features,
Function F 
)

◆ setFunctionAttributes() [2/2]

void llvm::codegen::setFunctionAttributes ( StringRef  CPU,
StringRef  Features,
Module M 
)

Set function attributes of functions in Module M based on CPU, Features, and command line flags.

Definition at line 716 of file CommandFlags.cpp.

References F, and setFunctionAttributes().