This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: init_reg_autoinc bug and how to describe regs that can't autoincdec
- From: Hans-Peter Nilsson <hans-peter dot nilsson at axis dot com>
- To: kenner at vlsi1 dot ultra dot nyu dot edu
- Cc: hans-peter dot nilsson at axis dot com, gcc-patches at gcc dot gnu dot org
- Date: Fri, 23 Nov 2007 01:17:31 +0100
- Subject: Re: init_reg_autoinc bug and how to describe regs that can't autoincdec
> From: kenner@vlsi1.ultra.nyu.edu (Richard Kenner)
> Date: Thu, 22 Nov 2007 09:09:38 EST
hp wrote:
> > I mean, by naming, by the head comment and at a glance it seems
> > it's generally intended to guide register allocation regarding
> > autoincdec, but can currently only help in an obscure case which
> > you say probably even isn't useful anymore. Why not improve it?
>
> Because that's not what it means. The most relevant comment is in regclass.c:
>
> /* If we have auto-increment or auto-decrement and we can have secondary
> reloads, we are not allowed to use classes requiring secondary
> reloads for pseudos auto-incremented since reload can't handle it. */
>
> "not allowed" means literally that: we can't *allow* the pseudo to end up
> in such a reg class. Here, we can allow it, but we prefer that we not
> do that. That needs another mechanism since regclass.c currently doesn't
> distinguish between those cases.
I see. Some comments are slightly misleading then. I guess I
should send a patch to make it clear that this is not about
what's possible for the target to handle but what's possible for
gcc to handle.
> Here's a completely untested (not even compiled) patch that suggests a
> mechanism that I'd recommend:
> ...
Thank you!
I'll rework this as a target hook function (target hooks are in,
pure target macros are out) and post for stage 1.
(Now back to that reload problem...)
brgds, H-P