This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug
- From: Peter Bergner <bergner at vnet dot ibm dot com>
- To: Ulrich Weigand <uweigand at de dot ibm dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 05 Dec 2006 11:31:48 -0600
- Subject: Re: [PATCH] Fix PR middle-end/28690, indexed load/store performance + reload bug
- References: <200612051304.kB5D4YRQ013112@d12av02.megacenter.de.ibm.com>
On Tue, 2006-12-05 at 14:04 +0100, Ulrich Weigand wrote:
> Peter Bergner wrote:
> > + /* Guard against a PARALLEL with a REG_UNUSED note. */
> > + if (GET_CODE (PATTERN (insn)) != PARALLEL)
> > + old_set = single_set (insn);
> > + else
> > + old_set = 0;
> > +
> > if (old_set != 0 && REG_P (SET_DEST (old_set))
> > && REGNO (SET_DEST (old_set)) < FIRST_PSEUDO_REGISTER)
> > {
>
> I'm not sure about this change. I'm afraid on platforms where
> add instructions are usually a PARALLEL (with a clobber of the
> condition code register), the change may cause eliminate_regs_in_insn
> to miss instructions that *set* an eliminable register (what the
> loop immediately following the above lines tries to find).
> I'd expect this to cause problems e.g. on s390 ..
Then how about a scheme where we continue to call single_set() as
we do now. However, if single_set() returns non null and the insn
is a PARALLEL, then we recursively call eliminate_regs_in_insn() for
the portion(s) of the PARALLEL not returned by single_set()? That would
allow this portion of the code to behave as before, while allowing
the unused portion of the PARALLEL to have it's regs eliminated.
Peter