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

Jiangning Liu liujiangning1 at gmail.com
Sun Sep 21 18:57:10 PDT 2014


HI Dan,

To be a little more forceful here:
>
> The base invariant of all of these kinds of algorithms (value range
> analysis, constant propagation, etc) is that values only go in one
> direction on the lattice.
>

I don't really see the wrong lowering direction.


> If you have found a case where this is not true, either
> 1. The implementation is buggy/broken
> 2. The algorithm isn't powerful enough to handle what you really want to
> happen, and you should change algorithms :)
>

I personally think this algorithm itself is powerful. But I'm not sure what
would happen if we don't bail out of the lowering early before we could
lower the value completely as possible as we could at compile time. I was
told the algorithm was initially designed to save compile time. I
personally think it might true in terms of the number of values to be
checked, but I don't really have data to justify it. At least for the case
I'm fixing with the new patch, the large number of basic block is really a
problem.

Thanks,
-Jiangning


> One of these is the real problem.
>
> There is no case where the right solution should involved reevaluating
> values and moving them in the wrong direction on the lattice.
> Besides hiding whatever the real problem is, it also changes the time
> bounds of the algorithm.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140922/06c95987/attachment.html>


More information about the llvm-commits mailing list