[PATCH] [InstCombine] Refactor out OptimizeOverflowCheck. NFCI.

Andrew Trick atrick at apple.com
Tue Apr 7 20:55:36 PDT 2015


Neat. LGTM.

I didn't carefully parse all of the logic, but I accept that it is no functional change intended.


================
Comment at: lib/Transforms/InstCombine/InstCombineInternal.h:123
@@ +122,3 @@
+
+  OVERFLOW_CHECK_MAX
+};
----------------
Maybe just OCF_INVALID.
Stick with the "OCF" prefix, and "MAX" can be confused with an operation.

================
Comment at: lib/Transforms/InstCombine/InstCombineInternal.h:440-441
@@ -393,4 +439,4 @@
   /// Creates a result tuple for an overflow intrinsic \p II with a given
   /// \p Result and a constant \p Overflow value. If \p ReUseName is true the
   /// \p Result's name is taken from \p II.
   Instruction *CreateOverflowTuple(IntrinsicInst *II, Value *Result,
----------------
Stale comment

http://reviews.llvm.org/D8888

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list