[llvm] r301380 - InstructionSimplify: Have SimplifyFPBinOp pass FastMathFlags by value, like we do everywhere else

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 21:10:00 PDT 2017


Author: dannyb
Date: Tue Apr 25 23:10:00 2017
New Revision: 301380

URL: http://llvm.org/viewvc/llvm-project?rev=301380&view=rev
Log:
InstructionSimplify: Have SimplifyFPBinOp pass FastMathFlags by value, like we do everywhere else

Modified:
    llvm/trunk/include/llvm/Analysis/InstructionSimplify.h
    llvm/trunk/lib/Analysis/InstructionSimplify.cpp

Modified: llvm/trunk/include/llvm/Analysis/InstructionSimplify.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/InstructionSimplify.h?rev=301380&r1=301379&r2=301380&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/InstructionSimplify.h (original)
+++ llvm/trunk/include/llvm/Analysis/InstructionSimplify.h Tue Apr 25 23:10:00 2017
@@ -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,

Modified: llvm/trunk/lib/Analysis/InstructionSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/InstructionSimplify.cpp?rev=301380&r1=301379&r2=301380&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/InstructionSimplify.cpp (original)
+++ llvm/trunk/lib/Analysis/InstructionSimplify.cpp Tue Apr 25 23:10:00 2017
@@ -4433,7 +4433,7 @@ Value *llvm::SimplifyBinOp(unsigned Opco
 }
 
 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 Op
 }
 
 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);
 }
 




More information about the llvm-commits mailing list