public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Question about constraints and reload
@ 2004-09-25 15:51 Steven Bosscher
  2004-09-27  3:15 ` Geoffrey Keating
  0 siblings, 1 reply; 15+ messages in thread
From: Steven Bosscher @ 2004-09-25 15:51 UTC (permalink / raw)
  To: gcc

Hi,

In recog.c there are a few places in constrain_operands() where we have
code like this,

            /* Before reload, accept what reload can turn into mem.  */
            else if (strict < 0 && CONSTANT_P (op))
              win = 1;

See cases 'm', 'o', and the default case.

What is this necessary for, is there any reason to rely on reload to
turn a constant into a MEM?

Gr.
Steven


^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: Question about constraints and reload
@ 2004-09-25 16:39 Ulrich Weigand
  2004-09-25 17:50 ` Steven Bosscher
  0 siblings, 1 reply; 15+ messages in thread
From: Ulrich Weigand @ 2004-09-25 16:39 UTC (permalink / raw)
  To: stevenb; +Cc: gcc

Steven Bosscher wrote:

>What is this necessary for, is there any reason to rely on reload to
>turn a constant into a MEM?

Certainly!  Reload will, as one of its options, force a constant to
the literal pool, thereby turning the operand into a MEM.  The s390
port relies extensively on that feature, because we can only use a
limited set of immediate operands, and these differ widely between
different instructions.  Thus the best way to handle constants is
to allow them more or less freely before reload, and have reload
choose to use either an actual immediate operand where available,
reload the constant into a register, or else push it into the
literal pool.

Bye,
Ulrich

-- 
  Dr. Ulrich Weigand
  weigand@informatik.uni-erlangen.de

^ permalink raw reply	[flat|nested] 15+ messages in thread
* Re: Question about constraints and reload
@ 2004-09-25 22:21 Richard Kenner
  0 siblings, 0 replies; 15+ messages in thread
From: Richard Kenner @ 2004-09-25 22:21 UTC (permalink / raw)
  To: weigand; +Cc: gcc

    I don't see reload as redoing register allocation.  

Nor do I, but I see where the sentiment is coming from.  If you have a machine
with a very small number of registers, what reload will essentially do is
evict almost everything from hard regs and load everything itself.  But I'm
not sure I'd call that "allocation".

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2004-09-28  0:18 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-25 15:51 Question about constraints and reload Steven Bosscher
2004-09-27  3:15 ` Geoffrey Keating
2004-09-27  5:05   ` Andrew Pinski
2004-09-27 11:56     ` Geoff Keating
2004-09-27 12:04     ` Geoff Keating
2004-09-25 16:39 Ulrich Weigand
2004-09-25 17:50 ` Steven Bosscher
2004-09-25 18:52   ` Ulrich Weigand
2004-09-25 18:55     ` Steven Bosscher
2004-09-25 21:05       ` Ulrich Weigand
2004-09-27 15:12   ` tm_gccmail
2004-09-27 18:19   ` tm_gccmail
2004-09-28 11:07     ` Peter Barada
2004-09-28 11:40       ` Ulrich Weigand
2004-09-25 22:21 Richard Kenner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).