aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetOptions.h
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2012-06-19 22:51:23 +0000
committerLang Hames <lhames@gmail.com>2012-06-19 22:51:23 +0000
commitd693cafcfb9e67ba7040cb810e4409a166421482 (patch)
tree86a20682e48b7aaf402fc95f6497eae48e8fa89a /include/llvm/Target/TargetOptions.h
parentfa8becb6f9e8aa2cbe3bab79e1fc4cdf2ffbb8e5 (diff)
downloadexternal_llvm-d693cafcfb9e67ba7040cb810e4409a166421482.zip
external_llvm-d693cafcfb9e67ba7040cb810e4409a166421482.tar.gz
external_llvm-d693cafcfb9e67ba7040cb810e4409a166421482.tar.bz2
Add DAG-combines for aggressive FMA formation.
This patch adds DAG combines to form FMAs from pairs of FADD + FMUL or FSUB + FMUL. The combines are performed when: (a) Either AllowExcessFPPrecision option (-enable-excess-fp-precision for llc) OR UnsafeFPMath option (-enable-unsafe-fp-math) are set, and (b) TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) is true for the type of the FADD/FSUB, and (c) The FMUL only has one user (the FADD/FSUB). If your target has fast FMA instructions you can make use of these combines by overriding TargetLoweringInfo::isFMAFasterThanMulAndAdd(VT) to return true for types supported by your FMA instruction, and adding patterns to match ISD::FMA to your FMA instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158757 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetOptions.h')
-rw-r--r--include/llvm/Target/TargetOptions.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/llvm/Target/TargetOptions.h b/include/llvm/Target/TargetOptions.h
index bc60673..84287fb 100644
--- a/include/llvm/Target/TargetOptions.h
+++ b/include/llvm/Target/TargetOptions.h
@@ -35,7 +35,7 @@ namespace llvm {
TargetOptions()
: PrintMachineCode(false), NoFramePointerElim(false),
NoFramePointerElimNonLeaf(false), LessPreciseFPMADOption(false),
- NoExcessFPPrecision(false), UnsafeFPMath(false), NoInfsFPMath(false),
+ AllowExcessFPPrecision(false), UnsafeFPMath(false), NoInfsFPMath(false),
NoNaNsFPMath(false), HonorSignDependentRoundingFPMathOption(false),
UseSoftFloat(false), NoZerosInBSS(false), JITExceptionHandling(false),
JITEmitDebugInfo(false), JITEmitDebugInfoToDisk(false),
@@ -74,13 +74,13 @@ namespace llvm {
unsigned LessPreciseFPMADOption : 1;
bool LessPreciseFPMAD() const;
- /// NoExcessFPPrecision - This flag is enabled when the
- /// -disable-excess-fp-precision flag is specified on the command line.
- /// When this flag is off (the default), the code generator is allowed to
- /// produce results that are "more precise" than IEEE allows. This includes
- /// use of FMA-like operations and use of the X86 FP registers without
- /// rounding all over the place.
- unsigned NoExcessFPPrecision : 1;
+ /// AllowExcessFPPrecision - This flag is enabled when the
+ /// -enable-excess-fp-precision flag is specified on the command line. This
+ /// flag is OFF by default. When it is turned on, the code generator is
+ /// allowed to produce results that are "more precise" than IEEE allows.
+ /// This includes use of FMA-like operations and use of the X86 FP registers
+ /// without rounding all over the place.
+ unsigned AllowExcessFPPrecision : 1;
/// UnsafeFPMath - This flag is enabled when the
/// -enable-unsafe-fp-math flag is specified on the command line. When