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