This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Reduce startup cost of compiler (patch 2)


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]