[llvm] r215343 - In LVI(Lazy Value Info), originally value on a BB can only be caculated once,

Hans Wennborg hans at chromium.org
Thu Nov 20 16:41:18 PST 2014


On Thu, Nov 20, 2014 at 4:39 PM, Pete Cooper <peter_cooper at apple.com> wrote:
>> On Nov 20, 2014, at 4:27 PM, Hans Wennborg <hans at chromium.org> wrote:
>> On Thu, Nov 20, 2014 at 11:27 AM, Pete Cooper <peter_cooper at apple.com> wrote:
>>> I came across this independently a few days ago.  My example was similar.  I
>>> had
>>>
>>> if (x == 0) {
>>>  if (…) {  … } else { … }
>>>  ++x
>>> }
>>
>> I'm still not very familiar with this analysis and its interaction
>> with jump threading. Could you turn your example into a compilable
>> function that I can experiment with?
> I was looking at correlated-value-propagation actually, but I guess this would apply to jump threading too.
>
> I’ll get you a testcase shortly, and a real patch.

Thanks!

>> I applied your patch, but it seems to be causing miscompiles, as one
>> of the programs got into an infinite loop and consumed all my memory.
> Damn.  When I thought about the algorithm I convinced myself that it would terminate as you’ll always eventually chase the BBs up to a loop preheader or the function entry BB.  Perhaps I got that wrong.

It wasn't clang that inflooped, it was a program compiled by clang.

 - Hans




More information about the llvm-commits mailing list