[llvm-commits] [Review request] Have Correlated Value Propagation handle instruction operands.
Chris Lattner
clattner at apple.com
Thu Feb 17 15:10:18 PST 2011
On Feb 8, 2011, at 8:46 AM, Duncan Sands wrote:
> Hi Frits,
>
>>> Do you done any measurements of the compile-time impact of this?
>>
>> No, sorry. Duncan Sands was worried about this too...
>
> it is very expensive. I ran some comparisons and it is very visible that with
> your patch compilation is much slower. The obvious thing to do is to keep your
> logic but only analyse a small set of instructions, for example the ones it used
> to analyse (Select, PHI, I/FCmp, Load, Store) plus branch instructions. Sadly
> the result is disappointing: it catches way less stuff than my pass. I then
> tried with your original patch, i.e. analysing all instructions. It still
> catches way less stuff than my pass if I judge by the number of lines of bitcode
> removed. I don't understand this since indeed LVI knows lots of tricks, so it
> is probably worth trying to understand why correlated value propagation/LVI is
> not doing a better job.
One way to speed this up is to only look at values that have multiple uses. If X only has a single use (which is a very common case for instructions) it is unlikely to be simplifyable.
-Chris
More information about the llvm-commits
mailing list