]> granicus.if.org Git - llvm/commitdiff
InstructionSimplify: Have SimplifyFPBinOp pass FastMathFlags by value, like we do...
authorDaniel Berlin <dberlin@dberlin.org>
Wed, 26 Apr 2017 04:10:00 +0000 (04:10 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Wed, 26 Apr 2017 04:10:00 +0000 (04:10 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301380 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/InstructionSimplify.h
lib/Analysis/InstructionSimplify.cpp

index e937d09199933bd1ffd62252edfc953509655d25..82364eb45a2271f5a7daccdefed393140a75899e 100644 (file)
@@ -347,9 +347,9 @@ namespace llvm {
   /// In contrast to SimplifyBinOp, try to use FastMathFlag when folding the
   /// result. In case we don't need FastMathFlags, simply fall to SimplifyBinOp.
   Value *SimplifyFPBinOp(unsigned Opcode, Value *LHS, Value *RHS,
-                         const FastMathFlags &FMF, const SimplifyQuery &Q);
+                         FastMathFlags FMF, const SimplifyQuery &Q);
   Value *SimplifyFPBinOp(unsigned Opcode, Value *LHS, Value *RHS,
-                         const FastMathFlags &FMF, const DataLayout &DL,
+                         FastMathFlags FMF, const DataLayout &DL,
                          const TargetLibraryInfo *TLI = nullptr,
                          const DominatorTree *DT = nullptr,
                          AssumptionCache *AC = nullptr,
index 34c6e4842147c65f14c099b389d5675d37906dfe..c476ec53501d123acfbaf17f58c63ef57ec0f946 100644 (file)
@@ -4433,7 +4433,7 @@ Value *llvm::SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 }
 
 Value *llvm::SimplifyFPBinOp(unsigned Opcode, Value *LHS, Value *RHS,
-                             const FastMathFlags &FMF, const DataLayout &DL,
+                             FastMathFlags FMF, const DataLayout &DL,
                              const TargetLibraryInfo *TLI,
                              const DominatorTree *DT, AssumptionCache *AC,
                              const Instruction *CxtI) {
@@ -4442,7 +4442,7 @@ Value *llvm::SimplifyFPBinOp(unsigned Opcode, Value *LHS, Value *RHS,
 }
 
 Value *llvm::SimplifyFPBinOp(unsigned Opcode, Value *LHS, Value *RHS,
-                             const FastMathFlags &FMF, const SimplifyQuery &Q) {
+                             FastMathFlags FMF, const SimplifyQuery &Q) {
   return ::SimplifyFPBinOp(Opcode, LHS, RHS, FMF, Q, RecursionLimit);
 }