Implement the JIT side of the GDB JIT debugging interface. To enable this
[oota-llvm.git] / include / llvm / Target / TargetOptions.h
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
18 namespace llvm {
19   // Possible float ABI settings. Used with FloatABIType in TargetOptions.h.
20   namespace FloatABI {
21     enum ABIType {
22       Default, // Target-specific (either soft of hard depending on triple, etc).
23       Soft, // Soft float.
24       Hard  // Hard float.
25     };
26   }
27   
28   /// PrintMachineCode - This flag is enabled when the -print-machineinstrs
29   /// option is specified on the command line, and should enable debugging
30   /// output from the code generator.
31   extern bool PrintMachineCode;
32
33   /// NoFramePointerElim - This flag is enabled when the -disable-fp-elim is
34   /// specified on the command line.  If the target supports the frame pointer
35   /// elimination optimization, this option should disable it.
36   extern bool NoFramePointerElim;
37
38   /// LessPreciseFPMAD - This flag is enabled when the
39   /// -enable-fp-mad is specified on the command line.  When this flag is off
40   /// (the default), the code generator is not allowed to generate mad
41   /// (multiply add) if the result is "less precise" than doing those operations
42   /// individually.
43   extern bool LessPreciseFPMADOption;
44   extern bool LessPreciseFPMAD();
45
46   /// NoExcessFPPrecision - This flag is enabled when the
47   /// -disable-excess-fp-precision flag is specified on the command line.  When
48   /// this flag is off (the default), the code generator is allowed to produce
49   /// results that are "more precise" than IEEE allows.  This includes use of
50   /// FMA-like operations and use of the X86 FP registers without rounding all
51   /// over the place.
52   extern bool NoExcessFPPrecision;
53
54   /// UnsafeFPMath - This flag is enabled when the
55   /// -enable-unsafe-fp-math flag is specified on the command line.  When
56   /// this flag is off (the default), the code generator is not allowed to
57   /// produce results that are "less precise" than IEEE allows.  This includes
58   /// use of X86 instructions like FSIN and FCOS instead of libcalls.
59   /// UnsafeFPMath implies FiniteOnlyFPMath and LessPreciseFPMAD.
60   extern bool UnsafeFPMath;
61
62   /// FiniteOnlyFPMath - This returns true when the -enable-finite-only-fp-math
63   /// option is specified on the command line. If this returns false (default),
64   /// the code generator is not allowed to assume that FP arithmetic arguments
65   /// and results are never NaNs or +-Infs.
66   extern bool FiniteOnlyFPMathOption;
67   extern bool FiniteOnlyFPMath();
68   
69   /// HonorSignDependentRoundingFPMath - This returns true when the
70   /// -enable-sign-dependent-rounding-fp-math is specified.  If this returns
71   /// false (the default), the code generator is allowed to assume that the
72   /// rounding behavior is the default (round-to-zero for all floating point to
73   /// integer conversions, and round-to-nearest for all other arithmetic
74   /// truncations).  If this is enabled (set to true), the code generator must
75   /// assume that the rounding mode may dynamically change.
76   extern bool HonorSignDependentRoundingFPMathOption;
77   extern bool HonorSignDependentRoundingFPMath();
78   
79   /// UseSoftFloat - This flag is enabled when the -soft-float flag is specified
80   /// on the command line.  When this flag is on, the code generator will
81   /// generate libcalls to the software floating point library instead of
82   /// target FP instructions.
83   extern bool UseSoftFloat;
84
85   /// FloatABIType - This setting is set by -float-abi=xxx option is specfied
86   /// on the command line. This setting may either be Default, Soft, or Hard.
87   /// Default selects the target's default behavior. Soft selects the ABI for
88   /// UseSoftFloat, but does not inidcate that FP hardware may not be used.
89   /// Such a combination is unfortunately popular (e.g. arm-apple-darwin).
90   /// Hard presumes that the normal FP ABI is used.
91   extern FloatABI::ABIType FloatABIType;
92
93   /// NoZerosInBSS - By default some codegens place zero-initialized data to
94   /// .bss section. This flag disables such behaviour (necessary, e.g. for
95   /// crt*.o compiling).
96   extern bool NoZerosInBSS;
97
98   /// DwarfExceptionHandling - This flag indicates that Dwarf exception
99   /// information should be emitted.
100   extern bool DwarfExceptionHandling;
101
102   /// SjLjExceptionHandling - This flag indicates that SJLJ exception
103   /// information should be emitted.
104   extern bool SjLjExceptionHandling;
105
106   /// JITEmitDebugInfo - This flag indicates that the JIT should try to emit
107   /// debug information and notify a debugger about it.
108   extern bool JITEmitDebugInfo;
109
110   /// JITEmitDebugInfoToDisk - This flag indicates that the JIT should write
111   /// the object files generated by the JITEmitDebugInfo flag to disk.  This
112   /// flag is hidden and is only for debugging the debug info.
113   extern bool JITEmitDebugInfoToDisk;
114
115   /// UnwindTablesMandatory - This flag indicates that unwind tables should
116   /// be emitted for all functions.
117   extern bool UnwindTablesMandatory;
118
119   /// PerformTailCallOpt - This flag is enabled when -tailcallopt is specified
120   /// on the commandline. When the flag is on, the target will perform tail call
121   /// optimization (pop the caller's stack) providing it supports it.
122   extern bool PerformTailCallOpt;
123
124   /// StackAlignment - Override default stack alignment for target.
125   extern unsigned StackAlignment;
126
127   /// RealignStack - This flag indicates, whether stack should be automatically
128   /// realigned, if needed.
129   extern bool RealignStack;
130
131   /// DisableJumpTables - This flag indicates jump tables should not be 
132   /// generated.
133   extern bool DisableJumpTables;
134
135   /// EnableFastISel - This flag enables fast-path instruction selection
136   /// which trades away generated code quality in favor of reducing
137   /// compile time.
138   extern bool EnableFastISel;
139   
140   /// StrongPHIElim - This flag enables more aggressive PHI elimination
141   /// wth earlier copy coalescing.
142   extern bool StrongPHIElim;
143
144 } // End llvm namespace
145
146 #endif