LLVM 22.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 756 of file CommandFlags.cpp.
References llvm::createStringError(), llvm::Target::createTargetMachine(), getCPUStr(), getExplicitCodeModel(), getExplicitRelocModel(), getFeaturesStr(), getMArch(), llvm::inconvertibleErrorCode(), InitTargetOptionsFromCodeGenFlags(), and llvm::TargetRegistry::lookupTarget().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI std::string llvm::codegen::getBBSections | ( | ) |
Referenced by getBBSectionsMode().
llvm::BasicBlockSection llvm::codegen::getBBSectionsMode | ( | llvm::TargetOptions & | Options | ) |
Definition at line 531 of file CommandFlags.cpp.
References llvm::errs(), getBBSections(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), and Options.
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI CodeModel::Model llvm::codegen::getCodeModel | ( | ) |
std::string llvm::codegen::getCPUStr | ( | ) |
Definition at line 615 of file CommandFlags.cpp.
References llvm::sys::getHostCPUName(), and getMCPU().
Referenced by createTargetMachineForTriple().
LLVM_ABI llvm::DebuggerKind llvm::codegen::getDebuggerTuningOpt | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI bool llvm::codegen::getDefaultValueTrackingVariableLocations | ( | const llvm::Triple & | T | ) |
Should value-tracking variable locations / instruction referencing be enabled by default for this triple?
LLVM_ABI DenormalMode::DenormalModeKind llvm::codegen::getDenormalFP32Math | ( | ) |
Referenced by setFunctionAttributes().
LLVM_ABI DenormalMode::DenormalModeKind llvm::codegen::getDenormalFPMath | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags(), and setFunctionAttributes().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by setFunctionAttributes().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI llvm::EABI llvm::codegen::getEABIVersion | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI llvm::ExceptionHandling llvm::codegen::getExceptionModel | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI std::optional< CodeModel::Model > llvm::codegen::getExplicitCodeModel | ( | ) |
Referenced by createTargetMachineForTriple().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI std::optional< CodeGenFileType > llvm::codegen::getExplicitFileType | ( | ) |
LLVM_ABI std::optional< Reloc::Model > llvm::codegen::getExplicitRelocModel | ( | ) |
Referenced by createTargetMachineForTriple().
std::vector< std::string > llvm::codegen::getFeatureList | ( | ) |
Definition at line 642 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 625 of file CommandFlags.cpp.
References llvm::SubtargetFeatures::AddFeature(), llvm::sys::getHostCPUFeatures(), getMAttrs(), getMCPU(), and llvm::SubtargetFeatures::getString().
Referenced by createTargetMachineForTriple().
LLVM_ABI CodeGenFileType llvm::codegen::getFileType | ( | ) |
LLVM_ABI llvm::FloatABI::ABIType llvm::codegen::getFloatABIForCalls | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI FramePointerKind llvm::codegen::getFramePointerUsage | ( | ) |
Referenced by setFunctionAttributes().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI llvm::FPOpFusion::FPOpFusionMode llvm::codegen::getFuseFPOps | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI std::string llvm::codegen::getMArch | ( | ) |
Referenced by createTargetMachineForTriple().
LLVM_ABI std::vector< std::string > llvm::codegen::getMAttrs | ( | ) |
Referenced by getFeatureList(), and getFeaturesStr().
LLVM_ABI std::string llvm::codegen::getMCPU | ( | ) |
Referenced by getCPUStr(), getFeatureList(), and getFeaturesStr().
LLVM_ABI Reloc::Model llvm::codegen::getRelocModel | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by setFunctionAttributes().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI SwiftAsyncFramePointerMode llvm::codegen::getSwiftAsyncFramePointer | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI ThreadModel::Model llvm::codegen::getThreadModel | ( | ) |
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
LLVM_ABI std::string llvm::codegen::getTrapFuncName | ( | ) |
Referenced by setFunctionAttributes().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
Referenced by InitTargetOptionsFromCodeGenFlags().
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 552 of file CommandFlags.cpp.
References llvm::FloatABI::Default, getAlignLoops(), getBBSectionsMode(), getDebuggerTuningOpt(), getDebugStrictDwarf(), getDenormalFPMath(), getDisableIntegratedAS(), getDontPlaceZerosInBSS(), getEABIVersion(), getEmitCallSiteInfo(), getEnableAddrsig(), getEnableAIXExtendedAltivecABI(), getEnableBBAddrMap(), getEnableCallGraphSection(), getEnableDebugEntryValues(), getEnableGuaranteedTailCallOpt(), getEnableHonorSignDependentRoundingFPMath(), getEnableMachineFunctionSplitter(), getEnableNoInfsFPMath(), getEnableNoNaNsFPMath(), getEnableNoSignedZerosFPMath(), getEnableNoTrappingFPMath(), getEnableStackSizeSection(), getEnableStaticDataPartitioning(), 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 659 of file CommandFlags.cpp.
Set function attributes of function F
based on CPU, Features, and command line flags.
Definition at line 671 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 749 of file CommandFlags.cpp.
References F, and setFunctionAttributes().