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 Friday 21 January 2005 15:02, Andrew MacLeod wrote:
> 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.

Just before going out of ssa, that's what i thought too.  But we were
not doing that.  I figured there had to be a reason for that, but that
is not the case apparently.  Good. :-)

> > 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.

Ah, I didn't realize you used the root var to keep the igraph small.
That makes sense.

> > 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.

Diego does have a copyrename pass after loop, which may help him a bit.
But there are still only two copyrename passes on the TCB: just after
into-ssa and just after loop.

May I interpret your comments as "OK" after bootstrapping/testing? ;-)

Gr.
Steven


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