condexec merge part 4

Richard Henderson rth@cygnus.com
Wed Apr 26 22:13:00 GMT 2000


life_analysis and its subroutines no longer rely on BLOCK_FOR_INSN. 

A Good Thing.



r~

        * flow.c (find_auto_inc): Use pbi->bb instead of BLOCK_FOR_INSN.
        * ssa.c (convert_from_ssa): Don't run compute_bb_for_insn.

Index: flow.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/flow.c,v
retrieving revision 1.259
diff -c -p -d -r1.259 flow.c
*** flow.c	2000/04/27 05:03:35	1.259
--- flow.c	2000/04/27 05:11:44
*************** verify_local_live_at_start (new_live_at_
*** 2662,2669 ****
     generates subregs of a multi-word pseudo, current life analysis will
     lose the kill.  So we _can_ have a pseudo go live.  How irritating.
  
-    BLOCK_FOR_INSN is assumed to be correct.
- 
     Including PROP_REG_INFO does not properly refresh regs_ever_live
     unless the caller resets it to zero.  */
  
--- 2662,2667 ----
*************** find_auto_inc (pbi, x, insn)
*** 4336,4351 ****
  		 Change it to q = p, ...*q..., q = q+size.
  		 Then fall into the usual case.  */
  	      rtx insns, temp;
- 	      basic_block bb;
  
  	      start_sequence ();
  	      emit_move_insn (q, addr);
  	      insns = get_insns ();
  	      end_sequence ();
  
! 	      bb = BLOCK_FOR_INSN (insn);
! 	      for (temp = insns; temp; temp = NEXT_INSN (temp))
! 		set_block_for_insn (temp, bb);
  
  	      /* If we can't make the auto-inc, or can't make the
  		 replacement into Y, exit.  There's no point in making
--- 4334,4348 ----
  		 Change it to q = p, ...*q..., q = q+size.
  		 Then fall into the usual case.  */
  	      rtx insns, temp;
  
  	      start_sequence ();
  	      emit_move_insn (q, addr);
  	      insns = get_insns ();
  	      end_sequence ();
  
! 	      if (basic_block_for_insn)
! 		for (temp = insns; temp; temp = NEXT_INSN (temp))
! 		  set_block_for_insn (temp, pbi->bb);
  
  	      /* If we can't make the auto-inc, or can't make the
  		 replacement into Y, exit.  There's no point in making
*************** find_auto_inc (pbi, x, insn)
*** 4363,4370 ****
  		 new insn(s) and do the updates.  */
  	      emit_insns_before (insns, insn);
  
! 	      if (BLOCK_FOR_INSN (insn)->head == insn)
! 		BLOCK_FOR_INSN (insn)->head = insns;
  
  	      /* INCR will become a NOTE and INSN won't contain a
  		 use of ADDR.  If a use of ADDR was just placed in
--- 4360,4367 ----
  		 new insn(s) and do the updates.  */
  	      emit_insns_before (insns, insn);
  
! 	      if (pbi->bb->head == insn)
! 		pbi->bb->head = insns;
  
  	      /* INCR will become a NOTE and INSN won't contain a
  		 use of ADDR.  If a use of ADDR was just placed in
Index: ssa.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ssa.c,v
retrieving revision 1.9
diff -c -p -d -r1.9 ssa.c
*** ssa.c	2000/04/27 04:42:09	1.9
--- ssa.c	2000/04/27 05:11:44
*************** convert_from_ssa()
*** 1811,1817 ****
    rtx insns = get_insns ();
      
    /* We need up-to-date life information.  */
-   compute_bb_for_insn (get_max_uid ());
    life_analysis (insns, NULL, PROP_KILL_DEAD_CODE | PROP_SCAN_DEAD_CODE);
  
    /* Figure out which regs in copies and phi nodes don't conflict and
--- 1811,1816 ----


More information about the Gcc-patches mailing list