TargetOptions.h revision 4ae641f4d12c60ee1aaca5e42b6de231c6a02c40
187b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney//===-- llvm/Target/TargetOptions.h - Target Options ------------*- C++ -*-===// 287b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// 387b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// The LLVM Compiler Infrastructure 487b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// 587b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// This file is distributed under the University of Illinois Open Source 687b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// License. See LICENSE.TXT for details. 787b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// 887b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney//===----------------------------------------------------------------------===// 987b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// 1087b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// This file defines command line option flags that are shared across various 1187b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// targets. 1287b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney// 1387b1aac0f0c9c753ea6de3cbc6447fa832d171fbBryan Mawhinney//===----------------------------------------------------------------------===// 145021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 155021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov#ifndef LLVM_TARGET_TARGETOPTIONS_H 165021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov#define LLVM_TARGET_TARGETOPTIONS_H 175021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 185021918605020c44c7ee66fbc896955abdd1517fArtem Iglikovnamespace llvm { 195021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// PrintMachineCode - This flag is enabled when the -print-machineinstrs 20bcc0c1d1139872b64b0466d03761bc37eb05720bTim Zheng /// option is specified on the command line, and should enable debugging 21c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// output from the code generator. 22c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov extern bool PrintMachineCode; 23c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov 24c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// NoFramePointerElim - This flag is enabled when the -disable-fp-elim is 25c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// specified on the command line. If the target supports the frame pointer 26c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// elimination optimization, this option should disable it. 27c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov extern bool NoFramePointerElim; 28c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov 29c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// NoExcessFPPrecision - This flag is enabled when the 30c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// -disable-excess-fp-precision flag is specified on the command line. When 31c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// this flag is off (the default), the code generator is allowed to produce 32c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// results that are "more precise" than IEEE allows. This includes use of 33c2a3d0fb3a25dd3f8171d24e1815da1f7f749e13Artem Iglikov /// FMA-like operations and use of the X86 FP registers without rounding all 34c31a839fd3ecc91807d735884d09fcbaf62e9244Robert Berry /// over the place. 355021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool NoExcessFPPrecision; 365021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 375021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// UnsafeFPMath - This flag is enabled when the 385021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// -enable-unsafe-fp-math flag is specified on the command line. When 395021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// this flag is off (the default), the code generator is not allowed to 405021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// produce results that are "less precise" than IEEE allows. This includes 415021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// use of X86 instructions like FSIN and FCOS instead of libcalls. 425021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// UnsafeFPMath implies FiniteOnlyFPMath. 435021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool UnsafeFPMath; 445021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 455021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// FiniteOnlyFPMath - This returns true when the -enable-finite-only-fp-math 465021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// option is specified on the command line. If this returns false (default), 475021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// the code generator is not allowed to assume that FP arithmetic arguments 485021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// and results are never NaNs or +-Infs. 495021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool FiniteOnlyFPMathOption; 505021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool FiniteOnlyFPMath(); 515021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 525021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// HonorSignDependentRoundingFPMath - This returns true when the 535021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// -enable-sign-dependent-rounding-fp-math is specified. If this returns 545021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// false (the default), the code generator is allowed to assume that the 555021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// rounding behavior is the default (round-to-zero for all floating point to 565021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// integer conversions, and round-to-nearest for all other arithmetic 575021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// truncations). If this is enabled (set to true), the code generator must 585021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// assume that the rounding mode may dynamically change. 595021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool HonorSignDependentRoundingFPMathOption; 605021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool HonorSignDependentRoundingFPMath(); 615021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 625021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// UseSoftFloat - This flag is enabled when the -soft-float flag is specified 635021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// on the command line. When this flag is on, the code generator will 645021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// generate libcalls to the software floating point library instead of 655021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// target FP instructions. 665021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool UseSoftFloat; 6739194c0582463be17513b9ba82802a703b10c934Robert Berry 685021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// NoZerosInBSS - By default some codegens place zero-initialized data to 695021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// .bss section. This flag disables such behaviour (necessary, e.g. for 705021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// crt*.o compiling). 715021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool NoZerosInBSS; 725021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 732eccd0262827259d15ceaa0fca975d3243c3a699Makoto Onuki /// ExceptionHandling - This flag indicates that exception information should 745021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// be emitted. 755021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool ExceptionHandling; 765021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 775021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// UnwindTablesMandatory - This flag indicates that unwind tables should 785021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// be emitted for all functions. 795021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool UnwindTablesMandatory; 803d87a5bfaf70ba994d7b82b50fbe79d36cb2d5eaMichal Karpinski 815021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// PerformTailCallOpt - This flag is enabled when -tailcallopt is specified 825021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// on the commandline. When the flag is on, the target will perform tail call 835021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// optimization (pop the caller's stack) providing it supports it. 845021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool PerformTailCallOpt; 855021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 86924afe2b0f721afa857a55c33da559f6efc41d32Christopher Tate /// StackAlignment - Override default stack alignment for target. 875021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern unsigned StackAlignment; 885021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 895021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// RealignStack - This flag indicates, whether stack should be automatically 905021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// realigned, if needed. 915021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool RealignStack; 9221510f0b7571f0689dc48c4f8fdbafea883cbdd0Artem Iglikov 935021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// VerboseAsm - When this flag is set, the asm printer prints additional 94ab953332bca70799b908ae0bfffb10c5d7a7a7f7Bernardo Rufino /// comments to asm directives. 955021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool VerboseAsm; 965021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 97ab953332bca70799b908ae0bfffb10c5d7a7a7f7Bernardo Rufino /// DisableJumpTables - This flag indicates jump tables should not be 985021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// generated. 995021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov extern bool DisableJumpTables; 1005021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov 1015021918605020c44c7ee66fbc896955abdd1517fArtem Iglikov /// FastISel - This flag enables fast-path instruction selection 102f251e3509838e3fbc62ccdba9d4cfd0527f67acdArtem Iglikov /// which trades away generated code quality in favor of reducing 103f251e3509838e3fbc62ccdba9d4cfd0527f67acdArtem Iglikov /// compile time. 104f251e3509838e3fbc62ccdba9d4cfd0527f67acdArtem Iglikov extern bool EnableFastISel; 105f251e3509838e3fbc62ccdba9d4cfd0527f67acdArtem Iglikov 106f251e3509838e3fbc62ccdba9d4cfd0527f67acdArtem Iglikov} // End llvm namespace 107af547f4a15a7d6121306a5e973ae7f3709e5df3aBernardo Rufino 108f251e3509838e3fbc62ccdba9d4cfd0527f67acdArtem Iglikov#endif 109924afe2b0f721afa857a55c33da559f6efc41d32Christopher Tate