This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Is eliminate_regs_in_insn allowed to generate invalid instruction?
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: iant at google dot com (Ian Lance Taylor)
- Cc: bmei at broadcom dot com (Bingfeng Mei), gcc at gcc dot gnu dot org (gcc at gcc dot gnu dot org), gcc-patches at gcc dot gnu dot org (gcc-patches at gcc dot gnu dot org)
- Date: Fri, 17 Dec 2010 20:08:22 +0100 (CET)
- Subject: Re: Is eliminate_regs_in_insn allowed to generate invalid instruction?
Ian Lance Taylor wrote:
> "Ulrich Weigand" <uweigand@de.ibm.com> writes:
> > The way some ports take around this issue is to recognize, in your
> > EXTRA_CONSTRAINT_STR implementation, certain forms of complex
> > addresses as those which you *know* reload will already have marked
> > for reloading, and therefore *accept* them (if they'd otherwise
> > match the constraint).
>
> Seems like you could also just use find_replacement if
> reload_in_progress is true.
Unfortunately that doesn't work, because find_replacement can only
be used during the later phases of reload, where find_reloads was
called with a nonzero REPLACE parameter. During the early phases,
where find_reloads is called with zero as REPLACE parameter, the
replacements structure is not filled in, and find_replacement does
not work. A back-end memory constraint callback also needs to work
during those early phases, however ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com