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]

Flow auto-inc calculations after reload



When we run the flow analysis pass after reload, we are doing it primarily 
to get the flow graph information correct prior to running if_convert.  
Creating new auto-inc instructions is dangerous, since we may be dealing 
with a register spilled onto stack.  The stack slots for these are shared, 
so we would have to unshare such slots before doing this.  Since creating 
new auto-incs after reload is unlikely to be useful (we've already done 
register allocation, so there is unlikely to be anything to be gained from 
being able to tie the new insns generated) I think it is better to just 
suppress this aspect of the auto-inc code.

This fixes a regression when compiling unsorted/structret.c on a 
big-endian arm.

(also bootstrapped on arm-unknown-linux-gnuoldld).

2000-06-11  Richard Earnshaw <rearnsha@arm.com>

	* flow.c (mark_used_regs): Don't call find_auto_inc after reload
	has run.


Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.298
diff -p -r1.298 flow.c
*** flow.c	2000/05/31 23:57:00	1.298
--- flow.c	2000/06/11 14:01:08
*************** mark_used_regs (pbi, x, cond, insn)
*** 5254,5260 ****
  	}
  
  #ifdef AUTO_INC_DEC
!       if (flags & PROP_AUTOINC)
          find_auto_inc (pbi, x, insn);
  #endif
        break;
--- 5254,5260 ----
  	}
  
  #ifdef AUTO_INC_DEC
!       if (! reload_completed && (flags & PROP_AUTOINC))
          find_auto_inc (pbi, x, insn);
  #endif
        break;
*************** mark_used_regs (pbi, x, cond, insn)
*** 5287,5293 ****
  	if (GET_CODE (testreg) == MEM)
  	  {
  #ifdef AUTO_INC_DEC
! 	    if (flags & PROP_AUTOINC)
  	      find_auto_inc (pbi, testreg, insn);
  #endif
  	    mark_used_regs (pbi, XEXP (testreg, 0), cond, insn);
--- 5287,5293 ----
  	if (GET_CODE (testreg) == MEM)
  	  {
  #ifdef AUTO_INC_DEC
! 	    if (! reload_completed && (flags & PROP_AUTOINC))
  	      find_auto_inc (pbi, testreg, insn);
  #endif
  	    mark_used_regs (pbi, XEXP (testreg, 0), cond, insn);

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