[PATCH] LazyValueInfo: Solve again when overdefined? - Expose ConstantRange

Ahmed Bougacha ahmed.bougacha at gmail.com
Thu Jul 4 18:25:10 PDT 2013


On Tue, Jul 2, 2013 at 4:10 AM, Duncan Sands <duncan.sands at gmail.com> wrote:

> Hi Ahmed,


Hi Duncan!

On 02/07/13 06:45, Ahmed Bougacha wrote:
>
>> Hi all,
>>
>> LazyValueInfo seems overly conservative by not even looking at a value it
>> set to
>> overdefined, solved its LHS, and then came back to.
>>
>
> please don't forget to include the testcases that show that, with your
> patch,
> LVI gets lots of things it didn't get before.


See attached testcase. Basically any case where there are binops in the
chain of computations will fail to be evaluated.
Here the testcase is somewhat convoluted because it has to go through CVP,
but it really shines when using getConstantRange of that other patch.


> Also, did you measure to see what
> the compile time impact is?
>

I’ll try to get some results later.

-- Ahmed

Ciao, Duncan.
>
>
>> The oneliner lvi-solve-overdef.diff makes it look at overdefined values
>> again.
>> It seems broken though, especially with the comment a few lines down
>> saying that
>> it sets it to overdefined "so that cycles will terminate and be
>> conservatively
>> correct.”
>>
>>  From what I read though, if a value is a binop, LVI will look at the LHS,
>> figure out its lattice value, and then tell you that the binop is
>> overdefined,
>> even though at this point all the needed information is there.
>>
>> In my (limited) testing, this helps, and doesn’t seem to break anything.
>> Insights welcome!
>>
>>
>> The other patch exposes the constant range when available, which, even
>> though
>> limited, can be very useful.
>>
>> Thanks,
>>
>> -- Ahmed Bougacha
>>
>>
>> ______________________________**_________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/**mailman/listinfo/llvm-commits<http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>>
>>
> ______________________________**_________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/**mailman/listinfo/llvm-commits<http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130704/8d2b1894/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lvi-solve-overdef-cvp-test.diff
Type: application/octet-stream
Size: 794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130704/8d2b1894/attachment.obj>


More information about the llvm-commits mailing list