[PATCH] Move Value.isDereferenceablePointer to ValueTracking

Artur Pilipenko apilipenko at azulsystems.com
Tue Apr 21 03:33:32 PDT 2015


Yes, please. I was going to ask you.

Artur

> On 21 Apr 2015, at 03:26, Philip Reames <listmail at philipreames.com> wrote:
> 
> 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