This is the mail archive of the 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]

Re: Reload inheritance and auto inc/dec

On 14 Sep 2000, Alexandre Oliva wrote:

> On Sep 14, 2000, Jeffrey A Law <> wrote:
> > The scope of a REG_EQUIV note is the entire function.
> Ok, but since the pseudo only exists during a short interval, and
> reg:SI doesn't change in that interval, any occurrence of the pseudo
> can be safely replaced by the REG_EQUIV rtx.  Wouldn't this be a valid
> use of REG_EQUIV?

I think so.

> Anyway, this is totally unrelated with the problem at hand.  The
> actual problem shows up before that insn is considered.
> Unfortunately, I can't create a testcase that fails reliably; minor
> perturbations in other optimization passes can change the RTL at the
> beginning of reload in such a way that the bug hides away :-(
> But I've got a patch that addresses the actual problem: we failed to
> update reg_last_reload_reg when generating the reloads for the pseudo
> referenced by the auto_inc mem.  That was the reason why the wrong
> register was chosen for inheritance afterwards.  And here's a patch
> that fixes this problem.  Unlike the previous patch, this one doesn't
> introduce regressions in a sh-elf testsuite run.  Ok to install?

I believe this is almost right.  However, you want this instead:

-		    = push_reload (x, x, loc, loc,
+		    = push_reload (x, x, &XEXP (x_orig, 0), &XEXP (x_orig, 0),

and the comment is maybe a bit misleading.


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