[PATCH] Move Value.isDereferenceablePointer to ValueTracking

Philip Reames listmail at philipreames.com
Mon Apr 20 17:26:36 PDT 2015


Artur,

Would you like me to commit on your behalf?

Philip

On 04/17/2015 05:13 AM, hfinkel at anl.gov wrote:
> 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