[lno] Induction variable optimizations

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Sun Jan 25 23:03:00 GMT 2004


Hello,

> >>+ 	if (GENERAL_REGNO_P (i)
> >
> >This macro seems to be only defined for a few architectures, at least
> >it's not present on Alpha...
> 
> 
> In fact it is only defined for i386, s390, and ia64.
> 
> It is not defined for rs6000 (PPC) which I care about.

fixed, thanks for pointing this out.

Zdenek

Index: tree-ssa-loop-ivopts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-ssa-loop-ivopts.c,v
retrieving revision 1.1.2.1
diff -c -3 -p -r1.1.2.1 tree-ssa-loop-ivopts.c
*** tree-ssa-loop-ivopts.c	25 Jan 2004 20:20:16 -0000	1.1.2.1
--- tree-ssa-loop-ivopts.c	25 Jan 2004 22:35:54 -0000
*************** determine_set_costs (void)
*** 2557,2563 ****
        tree var3 = create_tmp_var_raw (integer_ptr_type_node, "ivtmp");
  
        for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
! 	if (GENERAL_REGNO_P (i)
  	    && !fixed_regs[i])
  	  avail_regs++;
  
--- 2557,2563 ----
        tree var3 = create_tmp_var_raw (integer_ptr_type_node, "ivtmp");
  
        for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
! 	if (TEST_HARD_REG_BIT (reg_class_contents[GENERAL_REGS], i)
  	    && !fixed_regs[i])
  	  avail_regs++;
  



More information about the Gcc-patches mailing list