LLVM 20.0.0git
|
Classes | |
struct | RegisterCodeGenFlags |
Create this object with static storage to register codegen-related command line options. More... | |
Expected< std::unique_ptr< TargetMachine > > llvm::codegen::createTargetMachineForTriple | ( | StringRef | TargetTriple, |
CodeGenOptLevel | OptLevel = CodeGenOptLevel::Default |
||
) |
Creates a TargetMachine instance with the options defined on the command line.
This can be used for tools that do not need further customization of the TargetOptions.
Definition at line 750 of file CommandFlags.cpp.
References llvm::createStringError(), llvm::Target::createTargetMachine(), getCPUStr(), getExplicitCodeModel(), getExplicitRelocModel(), getFeaturesStr(), getMArch(), llvm::Triple::getTriple(), llvm::inconvertibleErrorCode(), InitTargetOptionsFromCodeGenFlags(), and llvm::TargetRegistry::lookupTarget().
unsigned llvm::codegen::getAlignLoops | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
std::string llvm::codegen::getBBSections | ( | ) |
Referenced by getBBSectionsMode().
llvm::BasicBlockSection llvm::codegen::getBBSectionsMode | ( | llvm::TargetOptions & | Options | ) |
Definition at line 525 of file CommandFlags.cpp.
References llvm::errs(), getBBSections(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), and Options.
Referenced by InitTargetOptionsFromCodeGenFlags().
CodeModel::Model llvm::codegen::getCodeModel | ( | ) |
std::string llvm::codegen::getCPUStr | ( | ) |
Definition at line 608 of file CommandFlags.cpp.
References llvm::sys::getHostCPUName(), and getMCPU().
Referenced by createTargetMachineForTriple().
bool llvm::codegen::getDataSections | ( | ) |
llvm::DebuggerKind llvm::codegen::getDebuggerTuningOpt | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getDebugStrictDwarf | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getDefaultValueTrackingVariableLocations | ( | const llvm::Triple & | T | ) |
Should value-tracking variable locations / instruction referencing be enabled by default for this triple?
DenormalMode::DenormalModeKind llvm::codegen::getDenormalFP32Math | ( | ) |
Referenced by setFunctionAttributes().
DenormalMode::DenormalModeKind llvm::codegen::getDenormalFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags(), and setFunctionAttributes().
bool llvm::codegen::getDisableIntegratedAS | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getDisableTailCalls | ( | ) |
Referenced by setFunctionAttributes().
bool llvm::codegen::getDontPlaceZerosInBSS | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
llvm::EABI llvm::codegen::getEABIVersion | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEmitCallSiteInfo | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEmulatedTLS | ( | ) |
bool llvm::codegen::getEnableAddrsig | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableAIXExtendedAltivecABI | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableApproxFuncFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableBBAddrMap | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableDebugEntryValues | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableGuaranteedTailCallOpt | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableHonorSignDependentRoundingFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableMachineFunctionSplitter | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableNoInfsFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableNoNaNsFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableNoSignedZerosFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableNoTrappingFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableStackSizeSection | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getEnableTLSDESC | ( | ) |
bool llvm::codegen::getEnableUnsafeFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
llvm::ExceptionHandling llvm::codegen::getExceptionModel | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
std::optional< CodeModel::Model > llvm::codegen::getExplicitCodeModel | ( | ) |
Referenced by createTargetMachineForTriple().
std::optional< bool > llvm::codegen::getExplicitDataSections | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
std::optional< bool > llvm::codegen::getExplicitEmulatedTLS | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
std::optional< bool > llvm::codegen::getExplicitEnableTLSDESC | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
std::optional< CodeGenFileType > llvm::codegen::getExplicitFileType | ( | ) |
std::optional< bool > llvm::codegen::getExplicitFunctionSections | ( | ) |
std::optional< uint64_t > llvm::codegen::getExplicitLargeDataThreshold | ( | ) |
std::optional< Reloc::Model > llvm::codegen::getExplicitRelocModel | ( | ) |
Referenced by createTargetMachineForTriple().
std::optional< bool > llvm::codegen::getExplicitValueTrackingVariableLocations | ( | ) |
std::vector< std::string > llvm::codegen::getFeatureList | ( | ) |
Definition at line 635 of file CommandFlags.cpp.
References llvm::SubtargetFeatures::AddFeature(), llvm::SubtargetFeatures::getFeatures(), llvm::sys::getHostCPUFeatures(), getMAttrs(), and getMCPU().
std::string llvm::codegen::getFeaturesStr | ( | ) |
Definition at line 618 of file CommandFlags.cpp.
References llvm::SubtargetFeatures::AddFeature(), llvm::sys::getHostCPUFeatures(), getMAttrs(), getMCPU(), and llvm::SubtargetFeatures::getString().
Referenced by createTargetMachineForTriple().
CodeGenFileType llvm::codegen::getFileType | ( | ) |
llvm::FloatABI::ABIType llvm::codegen::getFloatABIForCalls | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getForceDwarfFrameSection | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
FramePointerKind llvm::codegen::getFramePointerUsage | ( | ) |
Referenced by setFunctionAttributes().
bool llvm::codegen::getFunctionSections | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
llvm::FPOpFusion::FPOpFusionMode llvm::codegen::getFuseFPOps | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getIgnoreXCOFFVisibility | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getJMCInstrument | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
uint64_t llvm::codegen::getLargeDataThreshold | ( | ) |
std::string llvm::codegen::getMArch | ( | ) |
Referenced by createTargetMachineForTriple().
std::vector< std::string > llvm::codegen::getMAttrs | ( | ) |
Referenced by getFeatureList(), and getFeaturesStr().
std::string llvm::codegen::getMCPU | ( | ) |
Referenced by getCPUStr(), getFeatureList(), and getFeaturesStr().
Reloc::Model llvm::codegen::getRelocModel | ( | ) |
bool llvm::codegen::getSeparateNamedSections | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getStackRealign | ( | ) |
Referenced by setFunctionAttributes().
bool llvm::codegen::getStackSymbolOrdering | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
SwiftAsyncFramePointerMode llvm::codegen::getSwiftAsyncFramePointer | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
ThreadModel::Model llvm::codegen::getThreadModel | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
unsigned llvm::codegen::getTLSSize | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
std::string llvm::codegen::getTrapFuncName | ( | ) |
Referenced by setFunctionAttributes().
bool llvm::codegen::getUniqueBasicBlockSectionNames | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getUniqueSectionNames | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getUseCtors | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getValueTrackingVariableLocations | ( | ) |
bool llvm::codegen::getXCOFFReadOnlyPointers | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getXCOFFTracebackTable | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
bool llvm::codegen::getXRayFunctionIndex | ( | ) |
Referenced by 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 546 of file CommandFlags.cpp.
References llvm::FloatABI::Default, getAlignLoops(), getBBSectionsMode(), getDebuggerTuningOpt(), getDebugStrictDwarf(), getDenormalFPMath(), getDisableIntegratedAS(), getDontPlaceZerosInBSS(), getEABIVersion(), getEmitCallSiteInfo(), getEnableAddrsig(), getEnableAIXExtendedAltivecABI(), getEnableApproxFuncFPMath(), getEnableBBAddrMap(), getEnableDebugEntryValues(), getEnableGuaranteedTailCallOpt(), getEnableHonorSignDependentRoundingFPMath(), getEnableMachineFunctionSplitter(), getEnableNoInfsFPMath(), getEnableNoNaNsFPMath(), getEnableNoSignedZerosFPMath(), getEnableNoTrappingFPMath(), getEnableStackSizeSection(), getEnableUnsafeFPMath(), getExceptionModel(), getExplicitDataSections(), getExplicitEmulatedTLS(), getExplicitEnableTLSDESC(), getFloatABIForCalls(), getForceDwarfFrameSection(), getFunctionSections(), getFuseFPOps(), getIgnoreXCOFFVisibility(), getJMCInstrument(), getSeparateNamedSections(), getStackSymbolOrdering(), getSwiftAsyncFramePointer(), getThreadModel(), getTLSSize(), getUniqueBasicBlockSectionNames(), getUniqueSectionNames(), getUseCtors(), getXCOFFReadOnlyPointers(), getXCOFFTracebackTable(), getXRayFunctionIndex(), llvm::Triple::hasDefaultDataSections(), llvm::Triple::hasDefaultEmulatedTLS(), llvm::Triple::hasDefaultTLSDESC(), llvm::mc::InitMCTargetOptionsFromFlags(), and Options.
Referenced by createTargetMachineForTriple().
void llvm::codegen::renderBoolStringAttr | ( | AttrBuilder & | B, |
StringRef | Name, | ||
bool | Val | ||
) |
Definition at line 652 of file CommandFlags.cpp.
Set function attributes of function F
based on CPU, Features, and command line flags.
Definition at line 664 of file CommandFlags.cpp.
References llvm::AttrBuilder::addAttribute(), llvm::SmallString< InternalLen >::append(), B, llvm::StringRef::empty(), F, llvm::Attribute::get(), getDenormalFP32Math(), getDenormalFPMath(), getDisableTailCalls(), getFramePointerUsage(), getStackRealign(), getTrapFuncName(), HANDLE_BOOL_ATTR, I, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by setFunctionAttributes().
Set function attributes of functions in Module M based on CPU, Features, and command line flags.
Definition at line 743 of file CommandFlags.cpp.
References F, and setFunctionAttributes().