LLVM
8.0.1
|
#include "llvm/Target/TargetOptions.h"
Public Member Functions | |
TargetOptions () | |
bool | DisableFramePointerElim (const MachineFunction &MF) const |
DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disabled for the given machine function. More... | |
bool | HonorSignDependentRoundingFPMath () const |
HonorSignDependentRoundingFPMath - Return true if the codegen must assume that the rounding mode of the FPU can change from its default. More... | |
Public Attributes | |
unsigned | PrintMachineCode: 1 |
PrintMachineCode - This flag is enabled when the -print-machineinstrs option is specified on the command line, and should enable debugging output from the code generator. More... | |
unsigned | UnsafeFPMath: 1 |
UnsafeFPMath - This flag is enabled when the -enable-unsafe-fp-math flag is specified on the command line. More... | |
unsigned | NoInfsFPMath: 1 |
NoInfsFPMath - This flag is enabled when the -enable-no-infs-fp-math flag is specified on the command line. More... | |
unsigned | NoNaNsFPMath: 1 |
NoNaNsFPMath - This flag is enabled when the -enable-no-nans-fp-math flag is specified on the command line. More... | |
unsigned | NoTrappingFPMath: 1 |
NoTrappingFPMath - This flag is enabled when the -enable-no-trapping-fp-math is specified on the command line. More... | |
unsigned | NoSignedZerosFPMath: 1 |
NoSignedZerosFPMath - This flag is enabled when the -enable-no-signed-zeros-fp-math is specified on the command line. More... | |
unsigned | HonorSignDependentRoundingFPMathOption: 1 |
HonorSignDependentRoundingFPMath - This returns true when the -enable-sign-dependent-rounding-fp-math is specified. More... | |
unsigned | NoZerosInBSS: 1 |
NoZerosInBSS - By default some codegens place zero-initialized data to .bss section. More... | |
unsigned | GuaranteedTailCallOpt: 1 |
GuaranteedTailCallOpt - This flag is enabled when -tailcallopt is specified on the commandline. More... | |
unsigned | StackAlignmentOverride = 0 |
StackAlignmentOverride - Override default stack alignment for target. More... | |
unsigned | StackSymbolOrdering: 1 |
StackSymbolOrdering - When true, this will allow CodeGen to order the local stack symbols (for code size, code locality, or any other heuristics). More... | |
unsigned | EnableFastISel: 1 |
EnableFastISel - This flag enables fast-path instruction selection which trades away generated code quality in favor of reducing compile time. More... | |
unsigned | EnableGlobalISel: 1 |
EnableGlobalISel - This flag enables global instruction selection. More... | |
GlobalISelAbortMode | GlobalISelAbort = GlobalISelAbortMode::Enable |
EnableGlobalISelAbort - Control abort behaviour when global instruction selection fails to lower/select an instruction. More... | |
unsigned | UseInitArray: 1 |
UseInitArray - Use .init_array instead of .ctors for static constructors. More... | |
unsigned | DisableIntegratedAS: 1 |
Disable the integrated assembler. More... | |
DebugCompressionType | CompressDebugSections = DebugCompressionType::None |
Compress DWARF debug sections. More... | |
unsigned | RelaxELFRelocations: 1 |
unsigned | FunctionSections: 1 |
Emit functions into separate sections. More... | |
unsigned | DataSections: 1 |
Emit data into separate sections. More... | |
unsigned | UniqueSectionNames: 1 |
unsigned | TrapUnreachable: 1 |
Emit target-specific trap instruction for 'unreachable' IR instructions. More... | |
unsigned | NoTrapAfterNoreturn: 1 |
Do not emit a trap instruction for 'unreachable' IR instructions behind noreturn calls, even if TrapUnreachable is true. More... | |
unsigned | EmulatedTLS: 1 |
EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library. More... | |
unsigned | ExplicitEmulatedTLS: 1 |
Whether -emulated-tls or -no-emulated-tls is set. More... | |
unsigned | EnableIPRA: 1 |
This flag enables InterProcedural Register Allocation (IPRA). More... | |
unsigned | EmitStackSizeSection: 1 |
Emit section containing metadata on function stack sizes. More... | |
unsigned | EnableMachineOutliner: 1 |
Enables the MachineOutliner pass. More... | |
unsigned | SupportsDefaultOutlining: 1 |
Set if the target supports default outlining behaviour. More... | |
unsigned | EmitAddrsig: 1 |
Emit address-significance table. More... | |
FloatABI::ABIType | FloatABIType = FloatABI::Default |
FloatABIType - This setting is set by -float-abi=xxx option is specfied on the command line. More... | |
FPOpFusion::FPOpFusionMode | AllowFPOpFusion = FPOpFusion::Standard |
AllowFPOpFusion - This flag is set by the -fuse-fp-ops=xxx option. More... | |
ThreadModel::Model | ThreadModel = ThreadModel::POSIX |
ThreadModel - This flag specifies the type of threading model to assume for things like atomics. More... | |
EABI | EABIVersion = EABI::Default |
EABIVersion - This flag specifies the EABI version. More... | |
DebuggerKind | DebuggerTuning = DebuggerKind::Default |
Which debugger to tune for. More... | |
FPDenormal::DenormalMode | FPDenormalMode = FPDenormal::IEEE |
FPDenormalMode - This flags specificies which denormal numbers the code is permitted to require. More... | |
ExceptionHandling | ExceptionModel = ExceptionHandling::None |
What exception model to use. More... | |
MCTargetOptions | MCOptions |
Machine level options. More... | |
Definition at line 107 of file TargetOptions.h.
|
inline |
Definition at line 109 of file TargetOptions.h.
bool TargetOptions::DisableFramePointerElim | ( | const MachineFunction & | MF | ) | const |
DisableFramePointerElim - This returns true if frame pointer elimination optimization should be disabled for the given machine function.
Definition at line 25 of file TargetOptionsImpl.cpp.
References F(), llvm::Function::getFnAttribute(), llvm::MachineFunction::getFrameInfo(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::MachineFunction::getSubtarget(), llvm::Attribute::getValueAsString(), llvm::MachineFrameInfo::hasCalls(), llvm::Function::hasFnAttribute(), llvm::TargetFrameLowering::keepFramePointer(), and llvm_unreachable.
Referenced by llvm::AArch64RegisterInfo::cannotEliminateFrame(), llvm::ARMBaseRegisterInfo::cannotEliminateFrame(), llvm::ARMFrameLowering::determineCalleeSaves(), llvm::MipsFrameLowering::hasFP(), llvm::SparcFrameLowering::hasFP(), llvm::RISCVFrameLowering::hasFP(), llvm::SystemZFrameLowering::hasFP(), llvm::MSP430FrameLowering::hasFP(), llvm::XCoreFrameLowering::hasFP(), llvm::ARMFrameLowering::hasFP(), llvm::ARCFrameLowering::hasFP(), llvm::AArch64FrameLowering::hasFP(), llvm::HexagonFrameLowering::hasFP(), llvm::X86FrameLowering::hasFP(), llvm::PPCFrameLowering::needsFP(), llvm::ARMSubtarget::splitFramePushPop(), and llvm::DwarfCompileUnit::updateSubprogramScopeDIE().
bool TargetOptions::HonorSignDependentRoundingFPMath | ( | ) | const |
HonorSignDependentRoundingFPMath - Return true if the codegen must assume that the rounding mode of the FPU can change from its default.
Definition at line 58 of file TargetOptionsImpl.cpp.
References HonorSignDependentRoundingFPMathOption, and UnsafeFPMath.
FPOpFusion::FPOpFusionMode llvm::TargetOptions::AllowFPOpFusion = FPOpFusion::Standard |
AllowFPOpFusion - This flag is set by the -fuse-fp-ops=xxx option.
This controls the creation of fused FP ops that store intermediate results in higher precision than IEEE allows (E.g. FMAs).
Fast mode - allows formation of fused FP ops whenever they're profitable. Standard mode - allow fusion only for 'blessed' FP ops. At present the only blessed op is the fmuladd intrinsic. In the future more blessed ops may be added. Strict mode - allow fusion only if/when it can be proven that the excess precision won't effect the result.
Note: This option only controls formation of fused ops by the optimizers. Fused operations that are explicitly specified (e.g. FMA via the llvm.fma.* intrinsic) will always be honored, regardless of the value of this option.
Definition at line 280 of file TargetOptions.h.
Referenced by llvm::NVPTXTargetLowering::allowFMA(), getMad64_32(), getOffsetFromIndices(), isClampZeroToOne(), isCombineInstrCandidateFP(), isContractable(), isFMAddSubOrFMSubAdd(), and llvm::AArch64TargetLowering::isProfitableToHoist().
DebugCompressionType llvm::TargetOptions::CompressDebugSections = DebugCompressionType::None |
Compress DWARF debug sections.
Definition at line 215 of file TargetOptions.h.
Referenced by llvm::LLVMTargetMachine::initAsmInfo().
unsigned llvm::TargetOptions::DataSections |
Emit data into separate sections.
Definition at line 223 of file TargetOptions.h.
Referenced by llvm::computeLTOCacheKey(), llvm::TargetMachine::getDataSections(), and llvm::WebAssemblyTargetMachine::WebAssemblyTargetMachine().
DebuggerKind llvm::TargetOptions::DebuggerTuning = DebuggerKind::Default |
Which debugger to tune for.
Definition at line 290 of file TargetOptions.h.
Referenced by llvm::computeLTOCacheKey(), and llvm::DwarfDebug::DwarfDebug().
unsigned llvm::TargetOptions::DisableIntegratedAS |
Disable the integrated assembler.
Definition at line 212 of file TargetOptions.h.
Referenced by llvm::LLVMTargetMachine::initAsmInfo().
EABI llvm::TargetOptions::EABIVersion = EABI::Default |
EABIVersion - This flag specifies the EABI version.
Definition at line 287 of file TargetOptions.h.
Referenced by llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), and llvm::ARMTargetLowering::ARMTargetLowering().
unsigned llvm::TargetOptions::EmitAddrsig |
Emit address-significance table.
Definition at line 254 of file TargetOptions.h.
Referenced by llvm::AsmPrinter::doFinalization().
unsigned llvm::TargetOptions::EmitStackSizeSection |
Emit section containing metadata on function stack sizes.
Definition at line 245 of file TargetOptions.h.
Referenced by llvm::AsmPrinter::emitStackSizeSection(), and llvm::AsmPrinter::SetupMachineFunction().
unsigned llvm::TargetOptions::EmulatedTLS |
EmulatedTLS - This flag enables emulated TLS model, using emutls function in the runtime library.
Definition at line 236 of file TargetOptions.h.
Referenced by llvm::orc::JITTargetMachineBuilder::JITTargetMachineBuilder(), llvm::EngineBuilder::selectTarget(), and llvm::TargetMachine::useEmulatedTLS().
unsigned llvm::TargetOptions::EnableFastISel |
EnableFastISel - This flag enables fast-path instruction selection which trades away generated code quality in favor of reducing compile time.
Definition at line 198 of file TargetOptions.h.
Referenced by llvm::MipsTargetLowering::createFastISel(), CreatePrologue(), LLVMCreateMCJITCompilerForModule(), llvm::OptLevelChanger::OptLevelChanger(), promoteToConstantPool(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::TargetMachine::setFastISel(), and llvm::ARMSubtarget::useFastISel().
unsigned llvm::TargetOptions::EnableGlobalISel |
EnableGlobalISel - This flag enables global instruction selection.
Definition at line 201 of file TargetOptions.h.
Referenced by llvm::TargetPassConfig::addCoreISelPasses(), CreatePrologue(), and llvm::TargetMachine::setGlobalISel().
unsigned llvm::TargetOptions::EnableIPRA |
This flag enables InterProcedural Register Allocation (IPRA).
Definition at line 242 of file TargetOptions.h.
Referenced by llvm::TargetPassConfig::addMachinePasses(), llvm::TargetFrameLowering::determineCalleeSaves(), and llvm::TargetPassConfig::TargetPassConfig().
unsigned llvm::TargetOptions::EnableMachineOutliner |
Enables the MachineOutliner pass.
Definition at line 248 of file TargetOptions.h.
Referenced by llvm::TargetPassConfig::addMachinePasses(), and llvm::TargetMachine::setMachineOutliner().
ExceptionHandling llvm::TargetOptions::ExceptionModel = ExceptionHandling::None |
What exception model to use.
Definition at line 297 of file TargetOptions.h.
Referenced by llvm::LLVMTargetMachine::initAsmInfo(), llvm::ARMSubtarget::isXRaySupported(), and llvm::X86TargetLowering::X86TargetLowering().
unsigned llvm::TargetOptions::ExplicitEmulatedTLS |
Whether -emulated-tls or -no-emulated-tls is set.
Definition at line 239 of file TargetOptions.h.
Referenced by llvm::orc::JITTargetMachineBuilder::JITTargetMachineBuilder(), llvm::EngineBuilder::selectTarget(), and llvm::TargetMachine::useEmulatedTLS().
FloatABI::ABIType llvm::TargetOptions::FloatABIType = FloatABI::Default |
FloatABIType - This setting is set by -float-abi=xxx option is specfied on the command line.
This setting may either be Default, Soft, or Hard. Default selects the target's default behavior. Soft selects the ABI for software floating point, but does not indicate that FP hardware may not be used. Such a combination is unfortunately popular (e.g. arm-apple-darwin). Hard presumes that the normal FP ABI is used.
Definition at line 262 of file TargetOptions.h.
Referenced by llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), llvm::ARMTargetLowering::ARMTargetLowering(), checkFunctionsAttributeConsistency(), FPCCToARMCC(), and getComparePred().
FPDenormal::DenormalMode llvm::TargetOptions::FPDenormalMode = FPDenormal::IEEE |
FPDenormalMode - This flags specificies which denormal numbers the code is permitted to require.
Definition at line 294 of file TargetOptions.h.
Referenced by checkFunctionsAttributeConsistency(), and llvm::TargetMachine::resetTargetOptions().
unsigned llvm::TargetOptions::FunctionSections |
Emit functions into separate sections.
Definition at line 220 of file TargetOptions.h.
Referenced by llvm::computeLTOCacheKey(), llvm::TargetMachine::getFunctionSections(), and llvm::WebAssemblyTargetMachine::WebAssemblyTargetMachine().
GlobalISelAbortMode llvm::TargetOptions::GlobalISelAbort = GlobalISelAbortMode::Enable |
EnableGlobalISelAbort - Control abort behaviour when global instruction selection fails to lower/select an instruction.
Definition at line 205 of file TargetOptions.h.
Referenced by llvm::TargetPassConfig::isGlobalISelAbortEnabled(), llvm::TargetPassConfig::reportDiagnosticWhenGlobalISelFallback(), llvm::TargetMachine::setGlobalISelAbort(), and llvm::TargetPassConfig::TargetPassConfig().
unsigned llvm::TargetOptions::GuaranteedTailCallOpt |
GuaranteedTailCallOpt - This flag is enabled when -tailcallopt is specified on the commandline.
When the flag is on, participating targets will perform tail call optimization on all calls which use the fastcc calling convention and which satisfy certain target-independent criteria (being at the end of a function, having the same return type as their parent function, etc.), using an alternate ABI if necessary.
Definition at line 184 of file TargetOptions.h.
Referenced by areCallingConvEligibleForTCO_64SVR4(), CallingConvSupported(), llvm::AArch64TargetLowering::CCAssignFnForReturn(), llvm::PPCFrameLowering::determineCalleeSaves(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::emitEpilogue(), EnsureStackAlignment(), getMOVL(), llvm::SITargetLowering::isEligibleForTailCallOptimization(), llvm::isInTailCallPosition(), isSortedByValueNo(), llvm::SITargetLowering::LowerCall(), MatchingStackOffset(), mayTailCallThisCC(), llvm::PPCFrameLowering::needsFP(), PrepareCall(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), and shouldGuaranteeTCO().
unsigned llvm::TargetOptions::HonorSignDependentRoundingFPMathOption |
HonorSignDependentRoundingFPMath - This returns true when the -enable-sign-dependent-rounding-fp-math is specified.
If this returns false (the default), the code generator is allowed to assume that the rounding behavior is the default (round-to-zero for all floating point to integer conversions, and round-to-nearest for all other arithmetic truncations). If this is enabled (set to true), the code generator must assume that the rounding mode may dynamically change.
Definition at line 170 of file TargetOptions.h.
Referenced by checkFunctionsAttributeConsistency(), and HonorSignDependentRoundingFPMath().
MCTargetOptions llvm::TargetOptions::MCOptions |
Machine level options.
Definition at line 300 of file TargetOptions.h.
Referenced by llvm::LLVMTargetMachine::addAsmPrinter(), llvm::LLVMTargetMachine::addPassesToEmitMC(), llvm::DwarfDebug::beginModule(), computeDataLayout(), computeTargetABI(), llvm::AsmPrinter::doInitialization(), llvm::DwarfDebug::DwarfDebug(), EmitGCCInlineAsmStr(), llvm::X86AsmPrinter::EmitInstruction(), llvm::LLVMTargetMachine::initAsmInfo(), and llvm::TargetMachine::shouldAssumeDSOLocal().
unsigned llvm::TargetOptions::NoInfsFPMath |
NoInfsFPMath - This flag is enabled when the -enable-no-infs-fp-math flag is specified on the command line.
When this flag is off (the default), the code generator is not allowed to assume the FP arithmetic arguments and results are never +-Infs.
Definition at line 144 of file TargetOptions.h.
Referenced by checkFunctionsAttributeConsistency(), PrepareCall(), and setFastFlags().
unsigned llvm::TargetOptions::NoNaNsFPMath |
NoNaNsFPMath - This flag is enabled when the -enable-no-nans-fp-math flag is specified on the command line.
When this flag is off (the default), the code generator is not allowed to assume the FP arithmetic arguments and results are never NaNs.
Definition at line 150 of file TargetOptions.h.
Referenced by checkFunctionsAttributeConsistency(), combineFMinNumFMaxNum(), EmitVectorComparison(), PrepareCall(), and setFastFlags().
unsigned llvm::TargetOptions::NoSignedZerosFPMath |
NoSignedZerosFPMath - This flag is enabled when the -enable-no-signed-zeros-fp-math is specified on the command line.
This specifies that optimizations are allowed to treat the sign of a zero argument or result as insignificant.
Definition at line 161 of file TargetOptions.h.
Referenced by foldFPToIntToFP(), isContractable(), and isLegalToCombineMinNumMaxNum().
unsigned llvm::TargetOptions::NoTrapAfterNoreturn |
Do not emit a trap instruction for 'unreachable' IR instructions behind noreturn calls, even if TrapUnreachable is true.
Definition at line 232 of file TargetOptions.h.
Referenced by llvm::AArch64TargetMachine::AArch64TargetMachine(), llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), llvm::SelectionDAGBuilder::UpdateSplitBlock(), and llvm::X86TargetMachine::X86TargetMachine().
unsigned llvm::TargetOptions::NoTrappingFPMath |
NoTrappingFPMath - This flag is enabled when the -enable-no-trapping-fp-math is specified on the command line.
This specifies that there are no trap handlers to handle exceptions.
Definition at line 155 of file TargetOptions.h.
Referenced by checkFunctionsAttributeConsistency().
unsigned llvm::TargetOptions::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).
Definition at line 176 of file TargetOptions.h.
Referenced by llvm::TargetLoweringObjectFile::getKindForGlobal().
unsigned llvm::TargetOptions::PrintMachineCode |
PrintMachineCode - This flag is enabled when the -print-machineinstrs option is specified on the command line, and should enable debugging output from the code generator.
Definition at line 127 of file TargetOptions.h.
Referenced by llvm::TargetMachine::shouldPrintMachineCode(), and llvm::TargetPassConfig::TargetPassConfig().
unsigned llvm::TargetOptions::RelaxELFRelocations |
Definition at line 217 of file TargetOptions.h.
Referenced by llvm::computeLTOCacheKey(), and llvm::LLVMTargetMachine::initAsmInfo().
unsigned llvm::TargetOptions::StackAlignmentOverride = 0 |
StackAlignmentOverride - Override default stack alignment for target.
Definition at line 187 of file TargetOptions.h.
Referenced by llvm::X86TargetMachine::getSubtargetImpl(), and llvm::MipsTargetMachine::getSubtargetImpl().
unsigned llvm::TargetOptions::StackSymbolOrdering |
StackSymbolOrdering - When true, this will allow CodeGen to order the local stack symbols (for code size, code locality, or any other heuristics).
When false, the local symbols are left in whatever order they were generated. Default is true.
Definition at line 193 of file TargetOptions.h.
Referenced by AssignProtectedObjSet().
unsigned llvm::TargetOptions::SupportsDefaultOutlining |
Set if the target supports default outlining behaviour.
Definition at line 251 of file TargetOptions.h.
Referenced by llvm::TargetPassConfig::addMachinePasses(), and llvm::TargetMachine::setSupportsDefaultOutlining().
ThreadModel::Model llvm::TargetOptions::ThreadModel = ThreadModel::POSIX |
ThreadModel - This flag specifies the type of threading model to assume for things like atomics.
Definition at line 284 of file TargetOptions.h.
unsigned llvm::TargetOptions::TrapUnreachable |
Emit target-specific trap instruction for 'unreachable' IR instructions.
Definition at line 228 of file TargetOptions.h.
Referenced by llvm::AArch64TargetMachine::AArch64TargetMachine(), llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), getMOVL(), llvm::LLVMTargetMachine::LLVMTargetMachine(), llvm::SelectionDAGBuilder::UpdateSplitBlock(), llvm::WebAssemblyTargetMachine::WebAssemblyTargetMachine(), and llvm::X86TargetMachine::X86TargetMachine().
unsigned llvm::TargetOptions::UniqueSectionNames |
Definition at line 225 of file TargetOptions.h.
Referenced by llvm::TargetMachine::getUniqueSectionNames(), and llvm::WebAssemblyTargetMachine::WebAssemblyTargetMachine().
unsigned llvm::TargetOptions::UnsafeFPMath |
UnsafeFPMath - This flag is enabled when the -enable-unsafe-fp-math flag is specified on the command line.
When this flag is off (the default), the code generator is not allowed to produce results that are "less precise" than IEEE allows. This includes use of X86 instructions like FSIN and FCOS instead of libcalls.
Definition at line 138 of file TargetOptions.h.
Referenced by llvm::NVPTXTargetLowering::allowUnsafeFPMath(), checkFunctionsAttributeConsistency(), combineFMinFMax(), combineSelect(), FoldIntToFPToInt(), llvm::NVPTXTargetLowering::getDivF32Level(), getFPTernOp(), getLoadExtOrTrunc(), llvm::PPCInstrInfo::getMachineCombinerPatterns(), getMad64_32(), GetNegatedExpression(), HonorSignDependentRoundingFPMath(), llvm::AArch64InstrInfo::isAssociativeAndCommutative(), llvm::X86InstrInfo::isAssociativeAndCommutative(), isClampZeroToOne(), isCombineInstrCandidateFP(), isContractable(), isFMAddSubOrFMSubAdd(), isNegatibleForFree(), llvm::AArch64TargetLowering::isProfitableToHoist(), llvm::ARMSubtarget::isXRaySupported(), llvm::AMDGPUTargetLowering::LowerFP_TO_FP16(), lowerUINT_TO_FP_vXi32(), mayTailCallThisCC(), llvm::PPCTargetLowering::PPCTargetLowering(), setFastFlags(), llvm::NVPTXTargetLowering::usePrecSqrtF32(), and widenVec().
unsigned llvm::TargetOptions::UseInitArray |
UseInitArray - Use .init_array instead of .ctors for static constructors.
Definition at line 209 of file TargetOptions.h.
Referenced by llvm::X86ELFTargetObjectFile::getDebugThreadLocalSymbol(), llvm::HexagonTargetObjectFile::Initialize(), llvm::SparcELFTargetObjectFile::Initialize(), llvm::LanaiTargetObjectFile::Initialize(), and llvm::MipsTargetObjectFile::Initialize().