public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jan Hubicka <jh@suse.cz>
To: Rask Ingemann Lambertsen <rask@sygehus.dk>
Cc: Jan Hubicka <jh@suse.cz>, gcc-patches@gcc.gnu.org
Subject: Re: Reduce startup cost of compiler (patch 2)
Date: Tue, 31 Jul 2007 06:44:00 -0000	[thread overview]
Message-ID: <20070731035216.GD20007@kam.mff.cuni.cz> (raw)
In-Reply-To: <20070729203752.GH25795@sygehus.dk>

> On Tue, Jul 24, 2007 at 07:02:10AM +0200, Jan Hubicka wrote:
> 
> > Index: regclass.c
> [snip init_move_cost()]
> > + 	      cost = REGISTER_MOVE_COST (m, i, j);
> > + 	      gcc_assert (cost < 65535);
> 
>    Would you mind documenting this new upper limit? It happened to break my
> 16-bit x86 target where I try to discurage the register allocator from using
> unusable classes such as ALL_REGS.

Hi,
the limitation was alwas there - regclass used value of 65535 as an
infinity for impossible combinations.  This also means that you should
not need to discougrate ALL_REGS and similar classes since regstack is
supposed to work this out.  Documenting the maximum is however not bad
idea.

Honza

	* doc/tm.texi (REGISTER_MOVE_COST, MEMORY_MOVE_COST): Document maximal
	values.

Index: doc/tm.texi
===================================================================
*** doc/tm.texi	(revision 127065)
--- doc/tm.texi	(working copy)
*************** classes returns a value of 2, reload doe
*** 5737,5742 ****
--- 5737,5743 ----
  constraints of the insn are met.  Setting a cost of other than 2 will
  allow reload to verify that the constraints are met.  You should do this
  if the @samp{mov@var{m}} pattern's constraints do not allow such copying.
+ The maximal allowed value is 65535.
  @end defmac
  
  @defmac MEMORY_MOVE_COST (@var{mode}, @var{class}, @var{in})
*************** is to be written to memory, nonzero if i
*** 5746,5751 ****
--- 5747,5753 ----
  is relative to those in @code{REGISTER_MOVE_COST}.  If moving between
  registers and memory is more expensive than between two registers, you
  should define this macro to express the relative cost.
+ The maximal allowed value is 65535.
  
  If you do not define this macro, GCC uses a default cost of 4 plus
  the cost of copying via a secondary reload register, if one is

  reply	other threads:[~2007-07-31  3:52 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-24  5:54 Jan Hubicka
2007-07-24  7:29 ` Richard Guenther
2007-07-24  7:52   ` Paolo Bonzini
2007-07-24 15:14     ` Jan Hubicka
2007-07-29 21:32 ` Rask Ingemann Lambertsen
2007-07-31  6:44   ` Jan Hubicka [this message]
2007-07-31 12:49     ` Rask Ingemann Lambertsen
2007-07-31 16:26       ` Jan Hubicka
2007-08-03  9:16         ` Rask Ingemann Lambertsen
2007-08-03 12:13           ` Michael Matz
2007-08-03 12:43             ` Rask Ingemann Lambertsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070731035216.GD20007@kam.mff.cuni.cz \
    --to=jh@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rask@sygehus.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).