15#ifndef LLVM_CODEGEN_COMMANDFLAGS_H
16#define LLVM_CODEGEN_COMMANDFLAGS_H
51LLVM_ABI std::optional<CodeModel::Model>
57LLVM_ABI std::optional<CodeGenFileType>
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static cl::opt< std::string > OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename"), cl::init("-"))
Represent a constant reference to an array (0 or more elements consecutively in memory),...
Tagged union holding either a T or a Error.
A Module instance is used to store all the information related to an LLVM module.
Represent a constant reference to a string, i.e.
Primary interface to the complete machine description for the target machine.
Triple - Helper class for working with autoconf configuration names.
The options of a library that declares them in TableGen rather than as cl::opt (see llvm/Option/Libra...
This namespace contains all of the command line option processing machinery.
LLVM_ABI std::string getMArch(const cl::LibraryOptionsContext &C)
LLVM_ABI SaveStatsMode getSaveStats(const cl::LibraryOptionsContext &C)
LLVM_ABI std::string getMTune(const cl::LibraryOptionsContext &C)
LLVM_ABI void renderBoolStringAttr(AttrBuilder &B, StringRef Name, bool Val)
LLVM_ABI std::vector< std::string > getMAttrs(const cl::LibraryOptionsContext &C)
LLVM_ABI Expected< std::unique_ptr< TargetMachine > > createTargetMachineForTriple(const cl::LibraryOptionsContext &LibraryOptions, const Triple &TargetTriple, CodeGenOptLevel OptLevel=CodeGenOptLevel::Default)
Creates a TargetMachine instance with the options defined on the command line.
LLVM_ABI std::optional< Reloc::Model > getExplicitRelocModel(const cl::LibraryOptionsContext &C)
LLVM_ABI void setFunctionAttributes(Function &F, StringRef CPU, StringRef Features, StringRef TuneCPU="")
Set function attributes of function F based on CPU, TuneCPU, Features, and command line flags.
LLVM_ABI ArrayRef< const cl::LibraryOptions * > getToolOptions()
The options that a tool reading getTargetOptions passes to cl::parseCommandLineOptions.
LLVM_ABI TargetOptions getTargetOptions(const cl::LibraryOptionsContext &LibraryOptions, const llvm::Triple &TheTriple)
Common utility function tightly tied to the options listed here.
LLVM_ABI std::string getFeaturesStr(const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< bool > getExplicitFunctionSections(const cl::LibraryOptionsContext &C)
LLVM_ABI std::vector< std::string > getFeatureList(const cl::LibraryOptionsContext &C)
LLVM_ABI CodeGenFileType getFileType(const cl::LibraryOptionsContext &C)
LLVM_ABI std::string getCPUStr(const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< CodeModel::Model > getExplicitCodeModel(const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< bool > getExplicitDataSections(const cl::LibraryOptionsContext &C)
LLVM_ABI int maybeSaveStatistics(const cl::LibraryOptionsContext &C, StringRef OutputFilename, StringRef ToolName)
Conditionally saves the collected LLVM statistics to the received output file, based on the value of ...
LLVM_ABI std::optional< CodeGenFileType > getExplicitFileType(const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< uint64_t > getExplicitLargeDataThreshold(const cl::LibraryOptionsContext &C)
LLVM_ABI std::string getTuneCPUStr(const cl::LibraryOptionsContext &C)
LLVM_ABI std::optional< bool > getExplicitEmulatedTLS(const cl::LibraryOptionsContext &C)
LLVM_ABI llvm::FloatABI::ABIType getFloatABIForCalls(const cl::LibraryOptionsContext &C)
LLVM_ABI void maybeEnableStatistics(const cl::LibraryOptionsContext &C)
Conditionally enables the collection of LLVM statistics during the tool run, based on the value of th...
LLVM_ABI std::string getMCPU(const cl::LibraryOptionsContext &C)
This is an optimization pass for GlobalISel generic memory operations.
CodeGenFileType
These enums are meant to be passed into addPassesToEmitFile to indicate what type of file to emit,...
CodeGenOptLevel
Code generation optimization level.