TargetOptions.h revision bc65ca8de591e278fc613b5dc0e178b2ddcd215e
1//===-- llvm/Target/TargetOptions.h - Target Options ------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file defines command line option flags that are shared across various 11// targets. 12// 13//===----------------------------------------------------------------------===// 14 15#ifndef LLVM_TARGET_TARGETOPTIONS_H 16#define LLVM_TARGET_TARGETOPTIONS_H 17 18namespace llvm { 19 /// PrintMachineCode - This flag is enabled when the -print-machineinstrs 20 /// option is specified on the command line, and should enable debugging 21 /// output from the code generator. 22 extern bool PrintMachineCode; 23 24 /// NoFramePointerElim - This flag is enabled when the -disable-fp-elim is 25 /// specified on the command line. If the target supports the frame pointer 26 /// elimination optimization, this option should disable it. 27 extern bool NoFramePointerElim; 28 29 /// LessPreciseFPMAD - This flag is enabled when the 30 /// -enable-fp-mad is specified on the command line. When this flag is off 31 /// (the default), the code generator is not allowed to generate mad 32 /// (multiply add) if the result is "less precise" than doing those operations 33 /// individually. 34 extern bool LessPreciseFPMADOption; 35 extern bool LessPreciseFPMAD(); 36 37 /// NoExcessFPPrecision - This flag is enabled when the 38 /// -disable-excess-fp-precision flag is specified on the command line. When 39 /// this flag is off (the default), the code generator is allowed to produce 40 /// results that are "more precise" than IEEE allows. This includes use of 41 /// FMA-like operations and use of the X86 FP registers without rounding all 42 /// over the place. 43 extern bool NoExcessFPPrecision; 44 45 /// UnsafeFPMath - This flag is enabled when the 46 /// -enable-unsafe-fp-math flag is specified on the command line. When 47 /// this flag is off (the default), the code generator is not allowed to 48 /// produce results that are "less precise" than IEEE allows. This includes 49 /// use of X86 instructions like FSIN and FCOS instead of libcalls. 50 /// UnsafeFPMath implies FiniteOnlyFPMath and LessPreciseFPMAD. 51 extern bool UnsafeFPMath; 52 53 /// FiniteOnlyFPMath - This returns true when the -enable-finite-only-fp-math 54 /// option is specified on the command line. If this returns false (default), 55 /// the code generator is not allowed to assume that FP arithmetic arguments 56 /// and results are never NaNs or +-Infs. 57 extern bool FiniteOnlyFPMathOption; 58 extern bool FiniteOnlyFPMath(); 59 60 /// HonorSignDependentRoundingFPMath - This returns true when the 61 /// -enable-sign-dependent-rounding-fp-math is specified. If this returns 62 /// false (the default), the code generator is allowed to assume that the 63 /// rounding behavior is the default (round-to-zero for all floating point to 64 /// integer conversions, and round-to-nearest for all other arithmetic 65 /// truncations). If this is enabled (set to true), the code generator must 66 /// assume that the rounding mode may dynamically change. 67 extern bool HonorSignDependentRoundingFPMathOption; 68 extern bool HonorSignDependentRoundingFPMath(); 69 70 /// UseSoftFloat - This flag is enabled when the -soft-float flag is specified 71 /// on the command line. When this flag is on, the code generator will 72 /// generate libcalls to the software floating point library instead of 73 /// target FP instructions. 74 extern bool UseSoftFloat; 75 76 /// NoImplicitFloat - This flag is enabled when the -no-implicit-float flag is 77 /// specified on the command line. When this flag is on, the code generator 78 /// won't generate any implicit floating point instructions. I.e., no XMM or 79 /// x87 or vectorized memcpy/memmove instructions. This is for X86 only. 80 extern bool NoImplicitFloat; 81 82 /// NoZerosInBSS - By default some codegens place zero-initialized data to 83 /// .bss section. This flag disables such behaviour (necessary, e.g. for 84 /// crt*.o compiling). 85 extern bool NoZerosInBSS; 86 87 /// ExceptionHandling - This flag indicates that exception information should 88 /// be emitted. 89 extern bool ExceptionHandling; 90 91 /// UnwindTablesMandatory - This flag indicates that unwind tables should 92 /// be emitted for all functions. 93 extern bool UnwindTablesMandatory; 94 95 /// PerformTailCallOpt - This flag is enabled when -tailcallopt is specified 96 /// on the commandline. When the flag is on, the target will perform tail call 97 /// optimization (pop the caller's stack) providing it supports it. 98 extern bool PerformTailCallOpt; 99 100 /// StackAlignment - Override default stack alignment for target. 101 extern unsigned StackAlignment; 102 103 /// RealignStack - This flag indicates, whether stack should be automatically 104 /// realigned, if needed. 105 extern bool RealignStack; 106 107 /// VerboseAsm - When this flag is set, the asm printer prints additional 108 /// comments to asm directives. 109 extern bool VerboseAsm; 110 111 /// DisableJumpTables - This flag indicates jump tables should not be 112 /// generated. 113 extern bool DisableJumpTables; 114 115 /// FastISel - This flag enables fast-path instruction selection 116 /// which trades away generated code quality in favor of reducing 117 /// compile time. 118 extern bool EnableFastISel; 119 120 /// StrongPHIElim - This flag enables more aggressive PHI elimination 121 /// wth earlier copy coalescing. 122 extern bool StrongPHIElim; 123 124 /// DisableRedZone - This flag disables use of the "Red Zone" on 125 /// targets which would otherwise have one. 126 extern bool DisableRedZone; 127 128} // End llvm namespace 129 130#endif 131