https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90037

--- Comment #12 from Jeffrey A. Law <law at redhat dot com> ---
So another update and a rather surprising one at that.

One of the things that is clear is that we need to do some kind of cleanup
between DOM and erroneous path isolation.  Furthermore, the existing cleanup
done by phi-only-cprop is insufficient.

So I finished cobbling together the necessary extensions to phi-only cprop. 
Essentially if we have one or more degenerate PHIs in a block, we also scan the
block for const/copy propagation opportunities.

I then compared that to just using the lattice cprop.

It turns out that the lattice based cprop is consistently better.  Using
valgrind/cachegrind across a collection of .i files the lattice cprop version
executes about .5% fewer instructions.  It was better on each and every input
source file.

Of course to fix the BZ we're going to have to add an instance of the pass.  So
I compared a pristine compiler to one with an extra pass of the lattice copy
propagator inserted between DOM and erroneous path isolation.  The total
slowdown is in the .4% range.

>From a codegen standpoint, it looks like a wash, which was largely expected. 
We tend to clean things up earlier in the pipeline, but the net result is
almost always the same.

I still need to look at the VN on the SEME approach.  That's today's task.

Reply via email to