[llvm] r283192 - Consistent fp denormal mode names. NFC.

Sjoerd Meijer via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 4 01:03:36 PDT 2016


Author: sjoerdmeijer
Date: Tue Oct  4 03:03:36 2016
New Revision: 283192

URL: http://llvm.org/viewvc/llvm-project?rev=283192&view=rev
Log:
Consistent fp denormal mode names. NFC.

This fixes the inconsistency of the fp denormal option names: in LLVM this was
DenormalType, but in Clang this is DenormalMode which seems better.

Differential Revision: https://reviews.llvm.org/D24906

Modified:
    llvm/trunk/include/llvm/CodeGen/CommandFlags.h
    llvm/trunk/include/llvm/Target/TargetOptions.h
    llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
    llvm/trunk/lib/Target/TargetMachine.cpp

Modified: llvm/trunk/include/llvm/CodeGen/CommandFlags.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/CommandFlags.h?rev=283192&r1=283191&r2=283192&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/CommandFlags.h (original)
+++ llvm/trunk/include/llvm/CodeGen/CommandFlags.h Tue Oct  4 03:03:36 2016
@@ -155,8 +155,8 @@ EnableNoTrappingFPMath("enable-no-trappi
                                 "attribute not to use exceptions"),
                        cl::init(false));
 
-cl::opt<llvm::FPDenormal::DenormalType>
-DenormalType("denormal-fp-math",
+cl::opt<llvm::FPDenormal::DenormalMode>
+DenormalMode("denormal-fp-math",
           cl::desc("Select which denormal numbers the code is permitted to require"),
           cl::init(FPDenormal::IEEE),
           cl::values(
@@ -310,7 +310,7 @@ static inline TargetOptions InitTargetOp
   Options.NoInfsFPMath = EnableNoInfsFPMath;
   Options.NoNaNsFPMath = EnableNoNaNsFPMath;
   Options.NoTrappingFPMath = EnableNoTrappingFPMath;
-  Options.FPDenormalType = DenormalType;
+  Options.FPDenormalMode = DenormalMode;
   Options.HonorSignDependentRoundingFPMathOption =
       EnableHonorSignDependentRoundingFPMath;
   if (FloatABIForCalls != FloatABI::Default)

Modified: llvm/trunk/include/llvm/Target/TargetOptions.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetOptions.h?rev=283192&r1=283191&r2=283192&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetOptions.h (original)
+++ llvm/trunk/include/llvm/Target/TargetOptions.h Tue Oct  4 03:03:36 2016
@@ -57,7 +57,7 @@ namespace llvm {
   }
 
   namespace FPDenormal {
-    enum DenormalType {
+    enum DenormalMode {
       IEEE,           // IEEE 754 denormal numbers
       PreserveSign,   // the sign of a flushed-to-zero number is preserved in
                       // the sign of 0
@@ -114,7 +114,7 @@ namespace llvm {
           AllowFPOpFusion(FPOpFusion::Standard), Reciprocals(TargetRecip()),
           JTType(JumpTable::Single), ThreadModel(ThreadModel::POSIX),
           EABIVersion(EABI::Default), DebuggerTuning(DebuggerKind::Default),
-          FPDenormalType(FPDenormal::IEEE),
+          FPDenormalMode(FPDenormal::IEEE),
           ExceptionModel(ExceptionHandling::None) {}
 
     /// PrintMachineCode - This flag is enabled when the -print-machineinstrs
@@ -269,9 +269,9 @@ namespace llvm {
     /// Which debugger to tune for.
     DebuggerKind DebuggerTuning;
 
-    /// FPDenormalType - This flags specificies which denormal numbers the code
+    /// FPDenormalMode - This flags specificies which denormal numbers the code
     /// is permitted to require.
-    FPDenormal::DenormalType FPDenormalType;
+    FPDenormal::DenormalMode FPDenormalMode;
 
     /// What exception model to use
     ExceptionHandling ExceptionModel;
@@ -306,7 +306,7 @@ inline bool operator==(const TargetOptio
     ARE_EQUAL(ThreadModel) &&
     ARE_EQUAL(EABIVersion) &&
     ARE_EQUAL(DebuggerTuning) &&
-    ARE_EQUAL(FPDenormalType) &&
+    ARE_EQUAL(FPDenormalMode) &&
     ARE_EQUAL(ExceptionModel) &&
     ARE_EQUAL(MCOptions) &&
     ARE_EQUAL(EnableIPRA);

Modified: llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp?rev=283192&r1=283191&r2=283192&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMAsmPrinter.cpp Tue Oct  4 03:03:36 2016
@@ -781,12 +781,12 @@ void ARMAsmPrinter::emitAttributes() {
   // Set FP Denormals.
   if (haveAllFunctionsAttribute(*MMI->getModule(), "denormal-fp-math",
                                 "preserve-sign") ||
-      TM.Options.FPDenormalType == FPDenormal::PreserveSign)
+      TM.Options.FPDenormalMode == FPDenormal::PreserveSign)
     ATS.emitAttribute(ARMBuildAttrs::ABI_FP_denormal,
                       ARMBuildAttrs::PreserveFPSign);
   else if (haveAllFunctionsAttribute(*MMI->getModule(), "denormal-fp-math",
                                      "positive-zero") ||
-           TM.Options.FPDenormalType == FPDenormal::PositiveZero)
+           TM.Options.FPDenormalMode == FPDenormal::PositiveZero)
     ATS.emitAttribute(ARMBuildAttrs::ABI_FP_denormal,
                       ARMBuildAttrs::PositiveZero);
   else if (!TM.Options.UnsafeFPMath)

Modified: llvm/trunk/lib/Target/TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/TargetMachine.cpp?rev=283192&r1=283191&r2=283192&view=diff
==============================================================================
--- llvm/trunk/lib/Target/TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/TargetMachine.cpp Tue Oct  4 03:03:36 2016
@@ -82,11 +82,11 @@ void TargetMachine::resetTargetOptions(c
   StringRef Denormal =
     F.getFnAttribute("denormal-fp-math").getValueAsString();
   if (Denormal == "ieee")
-    Options.FPDenormalType = FPDenormal::IEEE;
+    Options.FPDenormalMode = FPDenormal::IEEE;
   else if (Denormal == "preserve-sign")
-    Options.FPDenormalType = FPDenormal::PreserveSign;
+    Options.FPDenormalMode = FPDenormal::PreserveSign;
   else if (Denormal == "positive-zero")
-    Options.FPDenormalType = FPDenormal::PositiveZero;
+    Options.FPDenormalMode = FPDenormal::PositiveZero;
 }
 
 /// Returns the code generation relocation model. The choices are static, PIC,




More information about the llvm-commits mailing list