]> granicus.if.org Git - llvm/commitdiff
[Target] Add NoSignedZerosFPMath to the TargetOptions constructor
authorDavid Majnemer <david.majnemer@gmail.com>
Sun, 29 Jan 2017 01:27:08 +0000 (01:27 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Sun, 29 Jan 2017 01:27:08 +0000 (01:27 +0000)
Most flags were already initialized by the TargetOptions constructor but
we missed out on one.  Also, simplify the constructor by using field
initializers when possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@293406 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetOptions.h

index ee73dcf9e6f9dfa8a50ff23d2e1f9d7a7fdc0d76..ebb01dcb18036a5d8cc252362dd1242aadecf086 100644 (file)
@@ -101,20 +101,14 @@ namespace llvm {
     TargetOptions()
         : PrintMachineCode(false), LessPreciseFPMADOption(false),
           UnsafeFPMath(false), NoInfsFPMath(false), NoNaNsFPMath(false),
-          NoTrappingFPMath(false),
+          NoTrappingFPMath(false), NoSignedZerosFPMath(false),
           HonorSignDependentRoundingFPMathOption(false), NoZerosInBSS(false),
-          GuaranteedTailCallOpt(false), StackAlignmentOverride(0),
-          StackSymbolOrdering(true), EnableFastISel(false), UseInitArray(false),
+          GuaranteedTailCallOpt(false), StackSymbolOrdering(true),
+          EnableFastISel(false), UseInitArray(false),
           DisableIntegratedAS(false), CompressDebugSections(false),
           RelaxELFRelocations(false), FunctionSections(false),
           DataSections(false), UniqueSectionNames(true), TrapUnreachable(false),
-          EmulatedTLS(false), EnableIPRA(false), DebugInfoForProfiling(false),
-          FloatABIType(FloatABI::Default),
-          AllowFPOpFusion(FPOpFusion::Standard),
-          ThreadModel(ThreadModel::POSIX),
-          EABIVersion(EABI::Default), DebuggerTuning(DebuggerKind::Default),
-          FPDenormalMode(FPDenormal::IEEE),
-          ExceptionModel(ExceptionHandling::None) {}
+          EmulatedTLS(false), EnableIPRA(false), DebugInfoForProfiling(false) {}
 
     /// PrintMachineCode - This flag is enabled when the -print-machineinstrs
     /// option is specified on the command line, and should enable debugging
@@ -188,7 +182,7 @@ namespace llvm {
     unsigned GuaranteedTailCallOpt : 1;
 
     /// StackAlignmentOverride - Override default stack alignment for target.
-    unsigned StackAlignmentOverride;
+    unsigned StackAlignmentOverride = 0;
 
     /// StackSymbolOrdering - When true, this will allow CodeGen to order
     /// the local stack symbols (for code size, code locality, or any other
@@ -240,7 +234,7 @@ namespace llvm {
     /// software floating point, 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.
-    FloatABI::ABIType FloatABIType;
+    FloatABI::ABIType FloatABIType = FloatABI::Default;
 
     /// AllowFPOpFusion - This flag is set by the -fuse-fp-ops=xxx option.
     /// This controls the creation of fused FP ops that store intermediate
@@ -258,24 +252,24 @@ namespace llvm {
     /// 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.
-    FPOpFusion::FPOpFusionMode AllowFPOpFusion;
+    FPOpFusion::FPOpFusionMode AllowFPOpFusion = FPOpFusion::Standard;
 
     /// ThreadModel - This flag specifies the type of threading model to assume
     /// for things like atomics
-    ThreadModel::Model ThreadModel;
+    ThreadModel::Model ThreadModel = ThreadModel::POSIX;
 
     /// EABIVersion - This flag specifies the EABI version
-    EABI EABIVersion;
+    EABI EABIVersion = EABI::Default;
 
     /// Which debugger to tune for.
-    DebuggerKind DebuggerTuning;
+    DebuggerKind DebuggerTuning = DebuggerKind::Default;
 
     /// FPDenormalMode - This flags specificies which denormal numbers the code
     /// is permitted to require.
-    FPDenormal::DenormalMode FPDenormalMode;
+    FPDenormal::DenormalMode FPDenormalMode = FPDenormal::IEEE;
 
     /// What exception model to use
-    ExceptionHandling ExceptionModel;
+    ExceptionHandling ExceptionModel = ExceptionHandling::None;
 
     /// Machine level options.
     MCTargetOptions MCOptions;