LLVM API Documentation

Public Member Functions | Public Attributes
llvm::TargetOptions Class Reference

#include <TargetOptions.h>

Collaboration diagram for llvm::TargetOptions:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TargetOptions ()
bool DisableFramePointerElim (const MachineFunction &MF) const
bool LessPreciseFPMAD () const
bool HonorSignDependentRoundingFPMath () const
StringRef getTrapFunctionName () const

Public Attributes

unsigned PrintMachineCode: 1
unsigned NoFramePointerElim: 1
unsigned LessPreciseFPMADOption: 1
unsigned UnsafeFPMath: 1
unsigned NoInfsFPMath: 1
unsigned NoNaNsFPMath: 1
unsigned HonorSignDependentRoundingFPMathOption: 1
unsigned UseSoftFloat: 1
unsigned NoZerosInBSS: 1
unsigned JITEmitDebugInfo: 1
unsigned JITEmitDebugInfoToDisk: 1
unsigned GuaranteedTailCallOpt: 1
unsigned DisableTailCalls: 1
unsigned StackAlignmentOverride
 StackAlignmentOverride - Override default stack alignment for target.
unsigned EnableFastISel: 1
unsigned PositionIndependentExecutable: 1
unsigned UseInitArray: 1
unsigned DisableIntegratedAS: 1
 Disable the integrated assembler.
unsigned CompressDebugSections: 1
 Compress DWARF debug sections.
unsigned FunctionSections: 1
 Emit functions into separate sections.
unsigned DataSections: 1
 Emit data into separate sections.
unsigned TrapUnreachable: 1
 Emit target-specific trap instruction for 'unreachable' IR instructions.
std::string TrapFuncName
FloatABI::ABIType FloatABIType
FPOpFusion::FPOpFusionMode AllowFPOpFusion
JumpTable::JumpTableType JTType
ThreadModel::Model ThreadModel
MCTargetOptions MCOptions
 Machine level options.

Detailed Description

Definition at line 60 of file TargetOptions.h.


Constructor & Destructor Documentation

Definition at line 62 of file TargetOptions.h.


Member Function Documentation

getTrapFunctionName - If this returns a non-empty string, this means isel should lower Intrinsic::trap to a call to the specified function name instead of an ISD::TRAP node.

Definition at line 51 of file TargetOptionsImpl.cpp.

References TrapFuncName.

Referenced by llvm::FastISel::selectInstruction().

HonorSignDependentRoundingFPMath - Return true if the codegen must assume that the rounding mode of the FPU can change from its default.

Definition at line 44 of file TargetOptionsImpl.cpp.

References HonorSignDependentRoundingFPMathOption, and UnsafeFPMath.

Referenced by GetNegatedExpression().

LessPreciseFPMAD - This flag return true when -enable-fp-mad option is specified on the command line. When this flag is off(default), the code generator is not allowed to generate mad (multiply add) if the result is "less precise" than doing those operations individually.

Definition at line 38 of file TargetOptionsImpl.cpp.

References LessPreciseFPMADOption, and UnsafeFPMath.


Member Data Documentation

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 225 of file TargetOptions.h.

Referenced by llvm::NVPTXTargetLowering::allowFMA(), and InitTargetOptionsFromCodeGenFlags().

Compress DWARF debug sections.

Definition at line 184 of file TargetOptions.h.

Referenced by llvm::LLVMTargetMachine::initAsmInfo().

Emit data into separate sections.

Definition at line 190 of file TargetOptions.h.

Referenced by llvm::TargetMachine::getDataSections(), InitTargetOptionsFromCodeGenFlags(), and llvm::TargetMachine::setDataSections().

Disable the integrated assembler.

Definition at line 181 of file TargetOptions.h.

Referenced by llvm::LLVMTargetMachine::initAsmInfo().

DisableTailCalls - This flag controls whether we will use tail calls. Disabling them may be useful to maintain a correct call stack.

Definition at line 160 of file TargetOptions.h.

Referenced by InitTargetOptionsFromCodeGenFlags().

EnableFastISel - This flag enables fast-path instruction selection which trades away generated code quality in favor of reducing compile time.

Definition at line 168 of file TargetOptions.h.

Referenced by LLVMCreateMCJITCompilerForModule(), llvm::SelectionDAGISel::runOnMachineFunction(), and llvm::TargetMachine::setFastISel().

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 UseSoftFloat, 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 207 of file TargetOptions.h.

Referenced by llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), and InitTargetOptionsFromCodeGenFlags().

Emit functions into separate sections.

Definition at line 187 of file TargetOptions.h.

Referenced by llvm::TargetMachine::getFunctionSections(), InitTargetOptionsFromCodeGenFlags(), and llvm::TargetMachine::setFunctionSections().

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 156 of file TargetOptions.h.

Referenced by llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::emitEpilogue(), InitTargetOptionsFromCodeGenFlags(), llvm::isInTailCallPosition(), llvm::PPCFrameLowering::needsFP(), llvm::PPCFrameLowering::processFunctionBeforeCalleeSavedScan(), and llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized().

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 127 of file TargetOptions.h.

Referenced by HonorSignDependentRoundingFPMath(), and InitTargetOptionsFromCodeGenFlags().

JITEmitDebugInfo - This flag indicates that the JIT should try to emit debug information and notify a debugger about it.

Definition at line 143 of file TargetOptions.h.

JITEmitDebugInfoToDisk - This flag indicates that the JIT should write the object files generated by the JITEmitDebugInfo flag to disk. This flag is hidden and is only for debugging the debug info.

Definition at line 148 of file TargetOptions.h.

JTType - This flag specifies the type of jump-instruction table to create for functions that have the jumptable attribute.

Definition at line 229 of file TargetOptions.h.

Referenced by llvm::LLVMTargetMachine::addPassesToEmitFile(), and InitTargetOptionsFromCodeGenFlags().

LessPreciseFPMAD - This flag is enabled when the -enable-fp-mad is specified on the command line. When this flag is off (the default), the code generator is not allowed to generate mad (multiply add) if the result is "less precise" than doing those operations individually.

Definition at line 97 of file TargetOptions.h.

Referenced by InitTargetOptionsFromCodeGenFlags(), and LessPreciseFPMAD().

NoFramePointerElim - This flag is enabled when the -disable-fp-elim is specified on the command line. If the target supports the frame pointer elimination optimization, this option should disable it.

Definition at line 86 of file TargetOptions.h.

Referenced by llvm::ARM::createFastISel(), DisableFramePointerElim(), InitTargetOptionsFromCodeGenFlags(), and LLVMCreateMCJITCompilerForModule().

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 112 of file TargetOptions.h.

Referenced by InitTargetOptionsFromCodeGenFlags().

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 118 of file TargetOptions.h.

Referenced by llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(), and InitTargetOptionsFromCodeGenFlags().

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 139 of file TargetOptions.h.

Referenced by llvm::TargetLoweringObjectFile::getKindForGlobal(), and InitTargetOptionsFromCodeGenFlags().

PositionIndependentExecutable - This flag indicates whether the code will eventually be linked into a single executable, despite the PIC relocation model being in use. It's value is undefined (and irrelevant) if the relocation model is anything other than PIC.

Definition at line 174 of file TargetOptions.h.

Referenced by llvm::TargetMachine::getTLSModel(), and InitTargetOptionsFromCodeGenFlags().

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 81 of file TargetOptions.h.

Referenced by llvm::TargetPassConfig::addMachinePasses(), and llvm::TargetMachine::shouldPrintMachineCode().

StackAlignmentOverride - Override default stack alignment for target.

Definition at line 163 of file TargetOptions.h.

Referenced by InitTargetOptionsFromCodeGenFlags().

ThreadModel - This flag specifies the type of threading model to assume for things like atomics

Definition at line 233 of file TargetOptions.h.

Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), and InitTargetOptionsFromCodeGenFlags().

getTrapFunctionName - If this returns a non-empty string, this means isel should lower Intrinsic::trap to a call to the specified function name instead of an ISD::TRAP node.

Definition at line 198 of file TargetOptions.h.

Referenced by getTrapFunctionName(), and InitTargetOptionsFromCodeGenFlags().

Emit target-specific trap instruction for 'unreachable' IR instructions.

Definition at line 193 of file TargetOptions.h.

Referenced by llvm::FastISel::selectOperator().

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. UnsafeFPMath implies LessPreciseFPMAD.

Definition at line 106 of file TargetOptions.h.

Referenced by llvm::NVPTXTargetLowering::allowFMA(), canCombineSinCosLibcall(), GetNegatedExpression(), llvm::SelectionDAG::getNode(), HonorSignDependentRoundingFPMath(), InitTargetOptionsFromCodeGenFlags(), isNegatibleForFree(), LessPreciseFPMAD(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformFMinFMaxCombine(), PerformSELECT_CCCombine(), PerformSELECTCombine(), and llvm::PPCTargetLowering::PPCTargetLowering().

UseInitArray - Use .init_array instead of .ctors for static constructors.

Definition at line 178 of file TargetOptions.h.

Referenced by llvm::MipsTargetObjectFile::Initialize(), and InitTargetOptionsFromCodeGenFlags().

UseSoftFloat - This flag is enabled when the -soft-float flag is specified on the command line. When this flag is on, the code generator will generate libcalls to the software floating point library instead of target FP instructions.

Definition at line 134 of file TargetOptions.h.

Referenced by llvm::MipsSubtarget::abiUsesSoftFloat(), llvm::ARMTargetLowering::ARMTargetLowering(), get64BitArgumentXMMs(), llvm::MipsSubtarget::initializeSubtargetDependencies(), InitTargetOptionsFromCodeGenFlags(), llvm::Mips16TargetLowering::Mips16TargetLowering(), and PerformSTORECombine().


The documentation for this class was generated from the following files: