This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC] Run copyrename one extra time before out-of-ssa


On Fri, 2005-01-21 at 07:23, Steven Bosscher wrote:

> The problem is that we cannot coalesce the D.* and the lsm_tmp*
> temporaries because they don't have the same root variable.  This is
> a problem of the out-of-ssa pass which also caused PR19038 and maybe
> some other performance bugs.  But in this case the fix is quite easy.
> We can just rerun the copyrename pass, which results in the following
> code:

IMHO Copyrename is most useful immediately after SSA is created, after
other passes which create a LOT of new SSA, and just before going out of
SSA.

> I am not sure why copyrename can coalesce what out-of-ssa apparently
> can't, but copyrename pass is really cheap anyway, and it seems too

you answered the question above :-)  Out of SSA only looks at coalescing
SSA_NAMES with the same root variable. This allows us to build a much
more compact interference graph since we only have to add interferences
between SSA_NAMEs with the same root variable rather that everything
which is live at any given point.

out of ssa cuold be changed fairly easily to look at non-root coalesces,
but it would consume more memory and run slower. On large test cases, it
would consume a LOT more memory. So I am not in favour of that kind of
change.

> late to do anything about out-of-ssa at this stage.  On the other
> hand, adding more passes is maybe something we don't want to do.  Any
> thoughts?

Im suprised we haven't already tried putting one there. Im not sure if
Diego did that with TCB or not. I would think it would be goodness to
have it just before out of ssa.

Andrew



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]