[PATCH] Move Value.isDereferenceablePointer to ValueTracking

hfinkel at anl.gov hfinkel at anl.gov
Fri Apr 17 05:13:36 PDT 2015


LGTM.


================
Comment at: lib/Transforms/Scalar/SROA.cpp:1410
@@ -1410,2 +1409,3 @@
+    if (isDereferenceablePointer(InVal, DL) ||
         isSafeToLoadUnconditionally(InVal, TI, MaxAlign))
       continue;
----------------
Taking this opportunity to point out an existing issue:

The fact that we need to call both isDereferenceablePointer and isSafeToLoadUnconditionally here is silly (and implies extra expense, because isSafeToLoadUnconditionally starts by calling GetPointerBaseWithConstantOffset). It would be nice to unify these two pieces of functionality (which are both essentially doing the same thing).

http://reviews.llvm.org/D9075

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






More information about the llvm-commits mailing list