|
LLVM 22.0.0git
|
Classes | |
| struct | RegisterCodeGenFlags |
| Create this object with static storage to register codegen-related command line options. More... | |
| struct | RegisterSaveStatsFlag |
| Tools that support stats saving should create this object with static storage to register the –save-stats command line option. More... | |
Enumerations | |
| enum | SaveStatsMode { None , Cwd , Obj } |
| Enumerator | |
|---|---|
| None | |
| Cwd | |
| Obj | |
Definition at line 159 of file CommandFlags.h.
| 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 801 of file CommandFlags.cpp.
References llvm::createStringError(), llvm::Target::createTargetMachine(), createTargetMachineForTriple(), getCPUStr(), getExplicitCodeModel(), getExplicitRelocModel(), getFeaturesStr(), getMArch(), llvm::inconvertibleErrorCode(), InitTargetOptionsFromCodeGenFlags(), and llvm::TargetRegistry::lookupTarget().
Referenced by createTargetMachineForTriple().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI std::string llvm::codegen::getBBSections | ( | ) |
References LLVM_ABI.
Referenced by getBBSectionsMode().
| llvm::BasicBlockSection llvm::codegen::getBBSectionsMode | ( | llvm::TargetOptions & | Options | ) |
Definition at line 575 of file CommandFlags.cpp.
References llvm::All, llvm::errs(), getBBSections(), getBBSectionsMode(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), llvm::List, llvm::None, and Options.
Referenced by getBBSectionsMode(), and InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI CodeModel::Model llvm::codegen::getCodeModel | ( | ) |
References LLVM_ABI.
| std::string llvm::codegen::getCPUStr | ( | ) |
Definition at line 659 of file CommandFlags.cpp.
References getCPUStr(), llvm::sys::getHostCPUName(), and getMCPU().
Referenced by createTargetMachineForTriple(), and getCPUStr().
| LLVM_ABI llvm::DebuggerKind llvm::codegen::getDebuggerTuningOpt | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
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?
References llvm::Default, LLVM_ABI, OutputFilename, and T.
| LLVM_ABI DenormalMode::DenormalModeKind llvm::codegen::getDenormalFP32Math | ( | ) |
References LLVM_ABI.
Referenced by setFunctionAttributes().
| LLVM_ABI DenormalMode::DenormalModeKind llvm::codegen::getDenormalFPMath | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags(), and setFunctionAttributes().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by setFunctionAttributes().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI llvm::EABI llvm::codegen::getEABIVersion | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References B(), F, LLVM_ABI, and Options.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI llvm::ExceptionHandling llvm::codegen::getExceptionModel | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI std::optional< CodeModel::Model > llvm::codegen::getExplicitCodeModel | ( | ) |
References LLVM_ABI.
Referenced by createTargetMachineForTriple().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI std::optional< CodeGenFileType > llvm::codegen::getExplicitFileType | ( | ) |
References LLVM_ABI.
References LLVM_ABI.
| LLVM_ABI std::optional< Reloc::Model > llvm::codegen::getExplicitRelocModel | ( | ) |
References LLVM_ABI.
Referenced by createTargetMachineForTriple().
References LLVM_ABI.
| std::vector< std::string > llvm::codegen::getFeatureList | ( | ) |
Definition at line 686 of file CommandFlags.cpp.
References llvm::SubtargetFeatures::AddFeature(), getFeatureList(), llvm::SubtargetFeatures::getFeatures(), llvm::sys::getHostCPUFeatures(), getMAttrs(), and getMCPU().
Referenced by getFeatureList().
| std::string llvm::codegen::getFeaturesStr | ( | ) |
Definition at line 669 of file CommandFlags.cpp.
References llvm::SubtargetFeatures::AddFeature(), getFeaturesStr(), llvm::sys::getHostCPUFeatures(), getMAttrs(), getMCPU(), and llvm::SubtargetFeatures::getString().
Referenced by createTargetMachineForTriple(), and getFeaturesStr().
| LLVM_ABI CodeGenFileType llvm::codegen::getFileType | ( | ) |
References LLVM_ABI.
| LLVM_ABI llvm::FloatABI::ABIType llvm::codegen::getFloatABIForCalls | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI FramePointerKind llvm::codegen::getFramePointerUsage | ( | ) |
References LLVM_ABI.
Referenced by setFunctionAttributes().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI llvm::FPOpFusion::FPOpFusionMode llvm::codegen::getFuseFPOps | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI std::string llvm::codegen::getMArch | ( | ) |
References LLVM_ABI.
Referenced by createTargetMachineForTriple().
| LLVM_ABI std::vector< std::string > llvm::codegen::getMAttrs | ( | ) |
References LLVM_ABI.
Referenced by getFeatureList(), and getFeaturesStr().
| LLVM_ABI std::string llvm::codegen::getMCPU | ( | ) |
References LLVM_ABI.
Referenced by getCPUStr(), getFeatureList(), and getFeaturesStr().
| LLVM_ABI Reloc::Model llvm::codegen::getRelocModel | ( | ) |
References LLVM_ABI.
| LLVM_ABI SaveStatsMode llvm::codegen::getSaveStats | ( | ) |
References LLVM_ABI.
Referenced by MaybeEnableStatistics(), and MaybeSaveStatistics().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by setFunctionAttributes().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI SwiftAsyncFramePointerMode llvm::codegen::getSwiftAsyncFramePointer | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI ThreadModel::Model llvm::codegen::getThreadModel | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI std::string llvm::codegen::getTrapFuncName | ( | ) |
References LLVM_ABI.
Referenced by setFunctionAttributes().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
| LLVM_ABI llvm::VectorLibrary llvm::codegen::getVectorLibrary | ( | ) |
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
Referenced by InitTargetOptionsFromCodeGenFlags().
References LLVM_ABI.
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 596 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(), getExceptionModel(), getExplicitDataSections(), getExplicitEmulatedTLS(), getExplicitEnableTLSDESC(), getFloatABIForCalls(), getForceDwarfFrameSection(), getFunctionSections(), getFuseFPOps(), getIgnoreXCOFFVisibility(), getJMCInstrument(), getSeparateNamedSections(), getStackSymbolOrdering(), getSwiftAsyncFramePointer(), getThreadModel(), getTLSSize(), getUniqueBasicBlockSectionNames(), getUniqueSectionNames(), getUseCtors(), getVectorLibrary(), getXCOFFReadOnlyPointers(), getXCOFFTracebackTable(), getXRayFunctionIndex(), llvm::Triple::hasDefaultDataSections(), llvm::Triple::hasDefaultEmulatedTLS(), llvm::Triple::hasDefaultTLSDESC(), llvm::mc::InitMCTargetOptionsFromFlags(), InitTargetOptionsFromCodeGenFlags(), and Options.
Referenced by createTargetMachineForTriple(), and InitTargetOptionsFromCodeGenFlags().
| void llvm::codegen::MaybeEnableStatistics | ( | ) |
Conditionally enables the collection of LLVM statistics during the tool run, based on the value of the flag.
Must be called before the tool run to actually collect data.
Definition at line 821 of file CommandFlags.cpp.
References llvm::EnableStatistics(), getSaveStats(), MaybeEnableStatistics(), and None.
Referenced by MaybeEnableStatistics().
Conditionally saves the collected LLVM statistics to the received output file, based on the value of the flag.
Should be called after the tool run, and must follow a call to MaybeEnableStatistics() to actually have data to write.
Definition at line 828 of file CommandFlags.cpp.
References llvm::sys::path::append(), assert(), Cwd, llvm::WithColor::error(), llvm::errs(), llvm::sys::path::filename(), getSaveStats(), MaybeSaveStatistics(), None, Obj, llvm::sys::fs::OF_TextWithCRLF, OutputFilename, llvm::PrintStatisticsJSON(), llvm::sys::path::remove_filename(), and llvm::sys::path::replace_extension().
Referenced by MaybeSaveStatistics().
Definition at line 703 of file CommandFlags.cpp.
References B(), and renderBoolStringAttr().
Referenced by renderBoolStringAttr().
Set function attributes of function F based on CPU, Features, and command line flags.
Definition at line 715 of file CommandFlags.cpp.
References llvm::All, llvm::SmallString< InternalLen >::append(), B(), Call, llvm::dyn_cast(), llvm::StringRef::empty(), F, llvm::Attribute::get(), getDenormalFP32Math(), getDenormalFPMath(), getDisableTailCalls(), getFramePointerUsage(), getStackRealign(), getTrapFuncName(), HANDLE_BOOL_ATTR, I, llvm::None, llvm::NonLeaf, llvm::NonLeafNoReserve, llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::Reserved, setFunctionAttributes(), and llvm::toStringRef().
Referenced by setFunctionAttributes(), and setFunctionAttributes().
Set function attributes of functions in Module M based on CPU, Features, and command line flags.
Definition at line 794 of file CommandFlags.cpp.
References F, and setFunctionAttributes().