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: [new-regalloc-branch] bugfix for get_free_reg


Hi,

On Fri, 21 Dec 2001, Denis Chertykov wrote:

>
> Thu Dec 20 23:57:05 2001  Denis Chertykov  <denisc@overta.ru>
>
> 	* ra.c (get_free_reg): Check hardregs for dont_begin_colors.

No.  dont_begin_colors is named correctly.  It contains the hardreg
numbers on which the pseudo in question should not begin.  I.e. testing
the following regs in a multi-reg mode is wrong.  There only free_colors
matters.  If there is some bug when selecting a color it is in the
calculation of dont_begin in colorize_one_web().
(The difference becomes important with partial conflicts between
multi-word webs)

> ! 	for (i = 1; i < size && TEST_HARD_REG_BIT (free_colors, c + i); i++);
> --- 3279,3288 ----
> ! 	for (i = 1; (i < size
> ! 		     && TEST_HARD_REG_BIT (free_colors, c + i)
> ! 		     && !TEST_HARD_REG_BIT (dont_begin_colors, c + i))
> ! 		     ; i++);


Ciao,
Michael.


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