llvm::TargetOptions

Shared command-line option flags used across LLVM code generation targets.

Synopsis

Declared in <llvm/Target/TargetOptions.h>

class TargetOptions;

Member Functions

NameDescription
TargetOptions [constructor]Initialize target-lowering options to their conservative defaults.
DisableFramePointerElim Return true if frame pointer elimination should be disabled for MF.
FramePointerIsReserved Return true if the frame pointer is reserved in MF.
HonorSignDependentRoundingFPMath Return true if sign-dependent rounding for FP math must be honored.
ShouldEmitDebugEntryValues NOTE: There are targets that still do not support the debug entry values production.

Data Members

NameDescription
AllowFPOpFusion Controls formation of fused FP ops that keep excess intermediate precision.
BBAddrMap Emit the SHT_LLVM_BB_ADDR_MAP section for basic block addresses.
BBSections Emit basic blocks into separate sections.
BBSectionsFuncListBuf Memory Buffer that contains information on sampled basic blocks and used to selectively generate basic block sections.
BinutilsVersion If greater than 0, override the default value of MCAsmInfo::BinutilsVersion.
DataSections Emit data into separate sections.
DebugStrictDwarf When set to true, don't use DWARF extensions in later DWARF versions. By default, it is set to false.
DebuggerTuning Which debugger to tune for.
DisableIntegratedAS Disable the integrated assembler.
EABIVersion EABIVersion - This flag specifies the EABI version
EmitAddrsig Emit address-significance table.
EmitCallGraphSection Emit section containing call graph metadata.
EmitCallSiteInfo Enable production of call site info for debug info in optimized code.
EmitStackSizeSection Emit section containing metadata on function stack sizes.
EmulatedTLS EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library..
EnableAIXExtendedAltivecABI Enable the AIX extended Altivec ABI for volatile and nonvolatile vectors.
EnableCFIFixup Enable the CFIFixup pass.
EnableDebugEntryValues Force production of debug entry values even if the target lacks support.
EnableDefaultMachineVerifier Enable Machine verifier at the end of default codegen pipelines. (Only used with NPM)
EnableFastISel EnableFastISel - This flag enables fast-path instruction selection which trades away generated code quality in favor of reducing compile time.
EnableGlobalISel EnableGlobalISel - This flag enables global instruction selection.
EnableIPRA This flag enables InterProcedural Register Allocation (IPRA).
EnableMachineFunctionSplitter Enables the MachineFunctionSplitter pass.
EnableMachineOutliner Enables the MachineOutliner pass.
EnableStaticDataPartitioning Enables the StaticDataSplitter pass.
EnableTLSDESC EnableTLSDESC - This flag enables TLS Descriptors.
ExceptionModel What exception model to use
ForceDwarfFrameSection Emit DWARF debug frame section.
FunctionSections Emit functions into separate sections.
GlobalISelAbort EnableGlobalISelAbort - Control abort behaviour when global instruction selection fails to lower/select an instruction.
GuaranteedTailCallOpt Perform guaranteed tail call optimization for eligible fastcc calls.
HonorSignDependentRoundingFPMathOption Assume floating-point rounding mode may change dynamically when set.
Hotpatch Emit the hotpatch flag in CodeView debug.
IgnoreXCOFFVisibility Do not emit visibility attribute for xcoff.
JMCInstrument Enable JustMyCode instrumentation.
LoopAlignment If greater than 0, override TargetLoweringBase::PrefLoopAlignment.
MCOptions Machine level options.
MisExpect When set to true, enable MisExpect Diagnostics By default, it is set to false
NoTrapAfterNoreturn Do not emit a trap instruction for 'unreachable' IR instructions behind noreturn calls, even if TrapUnreachable is true.
NoTrappingFPMath Assume there are no FP exception trap handlers when set.
NoZerosInBSS NoZerosInBSS - By default some codegens place zero-initialized data to .bss section. This flag disables such behaviour (necessary, e.g. for crt*.o compiling).
ObjectFilenameForDebug Stores the filename/path of the final .o/.obj file, to be written in the debug information. This is used for emitting the CodeView S_OBJNAME record.
PPCGenScalarMASSEntries Enables scalar MASS conversions
SeparateNamedSections Emit named sections with the same name into different sections.
StackSymbolOrdering Allow CodeGen to reorder local stack symbols for size or locality.
StackUsageFile Name of the stack usage file (i.e., .su file) if user passes -fstack-usage. If empty, it can be implied that -fstack-usage is not passed on the command line.
SupportsDebugEntryValues Set if the target supports the debug entry values by default.
SupportsDefaultOutlining Set if the target supports default outlining behaviour.
SwiftAsyncFramePointer Control when and how the Swift async frame pointer bit should be set.
TLSSize Bit size of immediate TLS offsets (0 == use the default).
ThreadModel ThreadModel - This flag specifies the type of threading model to assume for things like atomics
TrapUnreachable Emit target-specific trap instruction for 'unreachable' IR instructions.
UniqueBasicBlockSectionNames Use unique names for basic block sections.
UniqueSectionNames Use unique names for object file sections.
UseInitArray UseInitArray - Use .init_array instead of .ctors for static constructors.
ValueTrackingVariableLocations Use experimental value-tracking debug variable location information.
VecLib Vector math library to use.
VerifyArgABICompliance Verify call/return extensions of narrow integers in the target backend.
XCOFFReadOnlyPointers When set to true, const objects with relocatable address values are put into the RO data section.
XCOFFTracebackTable Emit XCOFF traceback table.
XRayFunctionIndex Emit XRay Function Index section

Non-Member Functions

NameDescription
codegen::InitTargetOptionsFromCodeGenFlagsInitialize a TargetOptions object from the registered CodeGen flags.
codegen::getBBSectionsModeTranslate the -basic-block-sections flag into a BasicBlockSection mode.
orc::irManglingOptionsFromTargetOptionsBuild IR mangling options from the given target options.