[PATCH] D64902: [InstSimplify] Rename SimplifyFPUnOp and SimplifyFPBinOp

Sanjay Patel via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 24 05:13:28 PDT 2019


spatel accepted this revision.
spatel added a comment.
This revision is now accepted and ready to land.

LGTM. This organization doesn't seem ideal to me,  but I don't think it's worth holding up the functional change in D64713 <https://reviews.llvm.org/D64713>. If someone has a better idea, we can improve this with an NFC patch.

We're free to change LLVM internal APIs as needed, so I don't think we have to warn anyone in advance. You can send a note to llvm-dev as a courtesy if you'd like (and that would likely generate more opinions about how to better arrange the parameters/names).



================
Comment at: llvm/include/llvm/Analysis/InstructionSimplify.h:238
+/// Given operand for a UnaryOperator, fold the result or return null.
+/// Try to use FastMathFlag when folding the result.
+Value *SimplifyUnOp(unsigned Opcode, Value *Op, FastMathFlags FMF,
----------------
FastMathFlag ->FastMathFlags


================
Comment at: llvm/include/llvm/Analysis/InstructionSimplify.h:247
+/// Given operands for a BinaryOperator, fold the result or return null.
+/// Try to use FastMathFlag when folding the result.
+Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
----------------
FastMathFlag ->FastMathFlags


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4567
 /// If not, this returns null.
-/// In contrast to SimplifyUnOp, try to use FastMathFlag when folding the
-/// result. In case we don't need FastMathFlags, simply fall to SimplifyUnOp.
+/// Try to use FastMathFlag when folding the result.
 static Value *simplifyFPUnOp(unsigned Opcode, Value *Op,
----------------
FastMathFlag ->FastMathFlags


================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:4636
 /// If not, this returns null.
-/// In contrast to SimplifyBinOp, try to use FastMathFlag when folding the
-/// result. In case we don't need FastMathFlags, simply fall to SimplifyBinOp.
-static Value *SimplifyFPBinOp(unsigned Opcode, Value *LHS, Value *RHS,
-                              const FastMathFlags &FMF, const SimplifyQuery &Q,
-                              unsigned MaxRecurse) {
+/// Try to use FastMathFlag when folding the result.
+static Value *SimplifyBinOp(unsigned Opcode, Value *LHS, Value *RHS,
----------------
FastMathFlag ->FastMathFlags


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64902/new/

https://reviews.llvm.org/D64902





More information about the llvm-commits mailing list