This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] [PATCH]: Loop invariant code motion for trees
On Oct 18, 2003, at 9:12 PM, Jason Merrill wrote:
On Sat, 18 Oct 2003 18:38:55 -0400, Daniel Berlin
<dberlin@dberlin.org> wrote:
I also couldn't make it do what Diego wanted, which is to be able to
lift
statements with unrenamed variables in it (which still makes no sense
to
me).
Sounds like store motion.
Yes, but we'd want to sink those, not lift them.
Sinking is also slightly different, since you have to make sure the
store is still executed in more cases (IE if any of the successors of
the block the store is in are outside the loop, you have to add the
store there too).
The fact that we want to perform sinking also is not a good reason not
to accept the code. It's not like it wasn't written in a way that
sinking isn't allowed, it's just not performed.
But, as i said, the LICM code is subsumed by load PRE too. and in load
PRE, i'll have code to do live range shrinking where necessary,
something LICM wasn't doing.
Of course, then i'll have to make PRE faster to compensate, which is
going to be tricky.