LLVM API Documentation
#include <TargetOptions.h>
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. More... | |
unsigned | EnableFastISel: 1 |
unsigned | PositionIndependentExecutable: 1 |
unsigned | EnableSegmentedStacks: 1 |
unsigned | UseInitArray: 1 |
std::string | TrapFuncName |
FloatABI::ABIType | FloatABIType |
FPOpFusion::FPOpFusionMode | AllowFPOpFusion |
Definition at line 41 of file TargetOptions.h.
|
inline |
Definition at line 43 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 22 of file TargetOptionsImpl.cpp.
References llvm::MachineFunction::getFrameInfo(), llvm::MachineFunction::getFunction(), llvm::MachineFrameInfo::hasCalls(), llvm::Function::hasFnAttribute(), and NoFramePointerElim.
Referenced by llvm::ARMBaseRegisterInfo::cannotEliminateFrame(), llvm::DwarfDebug::endFunction(), llvm::MipsFrameLowering::hasFP(), llvm::SparcFrameLowering::hasFP(), llvm::XCoreFrameLowering::hasFP(), llvm::ARMFrameLowering::hasFP(), llvm::MSP430FrameLowering::hasFP(), llvm::SystemZFrameLowering::hasFP(), llvm::X86FrameLowering::hasFP(), llvm::AArch64FrameLowering::hasFP(), and llvm::PPCFrameLowering::needsFP().
StringRef TargetOptions::getTrapFunctionName | ( | ) | const |
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.
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 44 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 38 of file TargetOptionsImpl.cpp.
References LessPreciseFPMADOption, and UnsafeFPMath.
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 191 of file TargetOptions.h.
Referenced by LTOCodeGenerator::setTargetOptions().
unsigned llvm::TargetOptions::DisableTailCalls |
DisableTailCalls - This flag controls whether we will use tail calls. Disabling them may be useful to maintain a correct call stack.
Definition at line 139 of file TargetOptions.h.
Referenced by LTOCodeGenerator::setTargetOptions().
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 147 of file TargetOptions.h.
Referenced by LLVMCreateMCJITCompilerForModule(), llvm::OptLevelChanger::OptLevelChanger(), llvm::SelectionDAGISel::runOnMachineFunction(), and llvm::TargetMachine::setFastISel().
unsigned llvm::TargetOptions::EnableSegmentedStacks |
Definition at line 155 of file TargetOptions.h.
Referenced by llvm::X86FrameLowering::emitPrologue(), llvm::X86TargetLowering::resetOperationActions(), and LTOCodeGenerator::setTargetOptions().
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 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 173 of file TargetOptions.h.
Referenced by llvm::ARMBaseTargetMachine::ARMBaseTargetMachine(), LTOCodeGenerator::setTargetOptions(), and llvm::X86TargetMachine::X86TargetMachine().
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 135 of file TargetOptions.h.
Referenced by CalculateParameterAndLinkageAreaSize(), llvm::PPCFrameLowering::eliminateCallFramePseudoInstr(), llvm::PPCFrameLowering::emitEpilogue(), llvm::AArch64TargetLowering::IsEligibleForTailCallOptimization(), llvm::isInTailCallPosition(), llvm::AArch64TargetLowering::LowerCall(), llvm::AArch64TargetLowering::LowerFormalArguments(), llvm::PPCFrameLowering::needsFP(), llvm::PPCFrameLowering::processFunctionBeforeCalleeSavedScan(), llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized(), and LTOCodeGenerator::setTargetOptions().
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 106 of file TargetOptions.h.
Referenced by HonorSignDependentRoundingFPMath(), and LTOCodeGenerator::setTargetOptions().
unsigned llvm::TargetOptions::JITEmitDebugInfo |
JITEmitDebugInfo - This flag indicates that the JIT should try to emit debug information and notify a debugger about it.
Definition at line 122 of file TargetOptions.h.
unsigned llvm::TargetOptions::JITEmitDebugInfoToDisk |
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 127 of file TargetOptions.h.
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 76 of file TargetOptions.h.
Referenced by LessPreciseFPMAD(), and LTOCodeGenerator::setTargetOptions().
unsigned llvm::TargetOptions::NoFramePointerElim |
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 65 of file TargetOptions.h.
Referenced by llvm::ARM::createFastISel(), DisableFramePointerElim(), LLVMCreateMCJITCompilerForModule(), and LTOCodeGenerator::setTargetOptions().
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 91 of file TargetOptions.h.
Referenced by LTOCodeGenerator::setTargetOptions().
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 97 of file TargetOptions.h.
Referenced by llvm::SelectionDAGBuilder::EmitBranchForMergedCondition(), llvm::MipsTargetLowering::MipsTargetLowering(), and LTOCodeGenerator::setTargetOptions().
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 118 of file TargetOptions.h.
Referenced by llvm::TargetLoweringObjectFile::getKindForGlobal(), and LTOCodeGenerator::setTargetOptions().
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 153 of file TargetOptions.h.
Referenced by llvm::TargetMachine::getTLSModel(), and LTOCodeGenerator::setTargetOptions().
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 60 of file TargetOptions.h.
Referenced by llvm::TargetPassConfig::addMachinePasses(), and llvm::TargetMachine::shouldPrintMachineCode().
unsigned llvm::TargetOptions::StackAlignmentOverride |
StackAlignmentOverride - Override default stack alignment for target.
Definition at line 142 of file TargetOptions.h.
Referenced by LTOCodeGenerator::setTargetOptions().
std::string llvm::TargetOptions::TrapFuncName |
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 164 of file TargetOptions.h.
Referenced by getTrapFunctionName(), and LTOCodeGenerator::setTargetOptions().
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 85 of file TargetOptions.h.
Referenced by canCombineSinCosLibcall(), GetNegatedExpression(), llvm::SelectionDAG::getNode(), HonorSignDependentRoundingFPMath(), isNegatibleForFree(), LessPreciseFPMAD(), llvm::PPCTargetLowering::PerformDAGCombine(), PerformFMinFMaxCombine(), PerformSELECT_CCCombine(), PerformSELECTCombine(), llvm::PPCTargetLowering::PPCTargetLowering(), llvm::X86TargetLowering::resetOperationActions(), and LTOCodeGenerator::setTargetOptions().
unsigned llvm::TargetOptions::UseInitArray |
UseInitArray - Use .init_array instead of .ctors for static constructors.
Definition at line 159 of file TargetOptions.h.
Referenced by llvm::MipsTargetObjectFile::Initialize(), and LTOCodeGenerator::setTargetOptions().
unsigned llvm::TargetOptions::UseSoftFloat |
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 113 of file TargetOptions.h.
Referenced by llvm::ARMTargetLowering::ARMTargetLowering(), llvm::X86TargetLowering::getSetCCResultType(), llvm::MipsSubtarget::mipsSEUsesSoftFloat(), PerformSTORECombine(), llvm::X86TargetLowering::resetOperationActions(), and LTOCodeGenerator::setTargetOptions().