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: [IRA] Fix PR rtl-optimization/45912


> > Bootstrapped/regtested on SPARC/Solaris 8, OK for mainline?
>
> Yes.  Thanks for working on the PR, Eric.

Thanks.  I was wondering if ira_non_ordered_class_hard_regs isn't superfluous 
now that we iterate over the whole class.  Can't we just do:

 	    for (j = n - 1; j >= 0; j--)
 	      {
		regno = ira_class_hard_regs[cover_class][j];
		if ((regno % nregs) != 0)
 		   reg_costs[j] += ALLOCNO_FREQ (a);
	      }

and get rid of ira_non_ordered_class_hard_regs entirely?  FWIW here are their 
contents for GENERAL_REGS on the SPARC:

(gdb) p default_target_ira->x_ira_class_hard_regs[GENERAL_REGS]
$5 = {1, 2, 3, 4, 29, 28, 27, 26, 25, 24, 15, 13, 12, 11, 10, 9, 8, 16, 17,
  18, 19, 20, 21, 22, 23, 0 <repeats 77 times>}

(gdb) p 
default_target_ira_int->x_ira_non_ordered_class_hard_regs[GENERAL_REGS]
$6 = {1, 2, 3, 4, 8, 9, 10, 11, 12, 13, 15, 16, 17, 18, 19, 20, 21, 22, 23,
  24, 25, 26, 27, 28, 29, 0 <repeats 77 times>}

-- 
Eric Botcazou


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