[llvm] r293406 - [Target] Add NoSignedZerosFPMath to the TargetOptions constructor

David Majnemer via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 28 17:27:08 PST 2017


Author: majnemer
Date: Sat Jan 28 19:27:08 2017
New Revision: 293406

URL: http://llvm.org/viewvc/llvm-project?rev=293406&view=rev
Log:
[Target] Add NoSignedZerosFPMath to the TargetOptions constructor

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.

Modified:
    llvm/trunk/include/llvm/Target/TargetOptions.h

Modified: llvm/trunk/include/llvm/Target/TargetOptions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=293406&r1=293405&r2=293406&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetOptions.h (original)
+++ llvm/trunk/include/llvm/Target/TargetOptions.h Sat Jan 28 19:27:08 2017
@@ -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;




More information about the llvm-commits mailing list