LLVM  3.7.0
Public Member Functions | Public Attributes | List of all members
llvm::TargetOptions Class Reference

#include <TargetOptions.h>

Collaboration diagram for llvm::TargetOptions:
[legend]

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 LessPreciseFPMAD () const
 LessPreciseFPMAD - This flag return true when -enable-fp-mad option is specified on the command line. 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 LessPreciseFPMADOption: 1
 LessPreciseFPMAD - This flag is enabled when the -enable-fp-mad is specified on the command line. 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 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
 StackAlignmentOverride - Override default stack alignment for target. 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 PositionIndependentExecutable: 1
 PositionIndependentExecutable - This flag indicates whether the code will eventually be linked into a single executable, despite the PIC relocation model being in use. More...
 
unsigned UseInitArray: 1
 UseInitArray - Use .init_array instead of .ctors for static constructors. More...
 
unsigned DisableIntegratedAS: 1
 Disable the integrated assembler. More...
 
unsigned CompressDebugSections: 1
 Compress DWARF debug sections. More...
 
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...
 
FloatABI::ABIType FloatABIType
 FloatABIType - This setting is set by -float-abi=xxx option is specfied on the command line. More...
 
FPOpFusion::FPOpFusionMode AllowFPOpFusion
 AllowFPOpFusion - This flag is set by the -fuse-fp-ops=xxx option. More...
 
TargetRecip Reciprocals
 This class encapsulates options for reciprocal-estimate code generation. More...
 
JumpTable::JumpTableType JTType
 JTType - This flag specifies the type of jump-instruction table to create for functions that have the jumptable attribute. More...
 
ThreadModel::Model ThreadModel
 ThreadModel - This flag specifies the type of threading model to assume for things like atomics. More...
 
MCTargetOptions MCOptions
 Machine level options. More...
 

Detailed Description

Definition at line 61 of file TargetOptions.h.

Constructor & Destructor Documentation

llvm::TargetOptions::TargetOptions ( )
inline

Definition at line 63 of file TargetOptions.h.

Member Function Documentation

bool TargetOptions::DisableFramePointerElim ( const MachineFunction MF) const
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 47 of file TargetOptionsImpl.cpp.

References HonorSignDependentRoundingFPMathOption, and UnsafeFPMath.

Referenced by GetNegatedExpression().

bool TargetOptions::LessPreciseFPMAD ( ) const

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 41 of file TargetOptionsImpl.cpp.

References LessPreciseFPMADOption, and UnsafeFPMath.

Member Data Documentation

FPOpFusion::FPOpFusionMode llvm::TargetOptions::AllowFPOpFusion

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

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

unsigned llvm::TargetOptions::CompressDebugSections

Compress DWARF debug sections.

Definition at line 162 of file TargetOptions.h.

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

unsigned llvm::TargetOptions::DataSections

Emit data into separate sections.

Definition at line 168 of file TargetOptions.h.

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

unsigned llvm::TargetOptions::DisableIntegratedAS

Disable the integrated assembler.

Definition at line 159 of file TargetOptions.h.

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

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

Referenced by llvm::MipsTargetLowering::createFastISel(), LLVMCreateMCJITCompilerForModule(), llvm::OptLevelChanger::OptLevelChanger(), llvm::SelectionDAGISel::runOnMachineFunction(), llvm::TargetMachine::setFastISel(), and llvm::ARMSubtarget::useFastISel().

FloatABI::ABIType llvm::TargetOptions::FloatABIType

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

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

unsigned llvm::TargetOptions::FunctionSections

Emit functions into separate sections.

Definition at line 165 of file TargetOptions.h.

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

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

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

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

Referenced by HonorSignDependentRoundingFPMath(), and InitTargetOptionsFromCodeGenFlags().

JumpTable::JumpTableType llvm::TargetOptions::JTType

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

Definition at line 206 of file TargetOptions.h.

Referenced by InitTargetOptionsFromCodeGenFlags().

unsigned llvm::TargetOptions::LessPreciseFPMADOption

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

Referenced by InitTargetOptionsFromCodeGenFlags(), and LessPreciseFPMAD().

MCTargetOptions llvm::TargetOptions::MCOptions
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 109 of file TargetOptions.h.

Referenced by InitTargetOptionsFromCodeGenFlags().

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

Referenced by InitTargetOptionsFromCodeGenFlags().

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

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

unsigned llvm::TargetOptions::PositionIndependentExecutable

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

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

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

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

TargetRecip llvm::TargetOptions::Reciprocals

This class encapsulates options for reciprocal-estimate code generation.

Definition at line 202 of file TargetOptions.h.

Referenced by InitTargetOptionsFromCodeGenFlags(), llvm::PPCTargetMachine::PPCTargetMachine(), and llvm::X86TargetMachine::X86TargetMachine().

unsigned llvm::TargetOptions::StackAlignmentOverride

StackAlignmentOverride - Override default stack alignment for target.

Definition at line 141 of file TargetOptions.h.

Referenced by llvm::X86TargetMachine::getSubtargetImpl(), and InitTargetOptionsFromCodeGenFlags().

ThreadModel::Model llvm::TargetOptions::ThreadModel

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

Definition at line 210 of file TargetOptions.h.

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

unsigned llvm::TargetOptions::TrapUnreachable

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

Definition at line 173 of file TargetOptions.h.

Referenced by llvm::FastISel::selectOperator(), and llvm::X86TargetMachine::X86TargetMachine().

unsigned llvm::TargetOptions::UniqueSectionNames
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. UnsafeFPMath implies LessPreciseFPMAD.

Definition at line 103 of file TargetOptions.h.

Referenced by llvm::NVPTXTargetLowering::allowFMA(), canCombineSinCosLibcall(), llvm::X86InstrInfo::getMachineCombinerPatterns(), GetNegatedExpression(), llvm::SelectionDAG::getNode(), HonorSignDependentRoundingFPMath(), InitTargetOptionsFromCodeGenFlags(), isNegatibleForFree(), llvm::AArch64TargetLowering::isProfitableToHoist(), LessPreciseFPMAD(), PerformFMinFMaxCombine(), PerformSELECT_CCCombine(), performSelectCCCombine(), PerformSELECTCombine(), llvm::PPCTargetLowering::PPCTargetLowering(), and llvm::X86TargetLowering::X86TargetLowering().

unsigned llvm::TargetOptions::UseInitArray

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

Definition at line 156 of file TargetOptions.h.

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


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