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]

Patch to fix record_insns/--enable checking failure


Hi
This patch fixes record_insns call to get always an insn or seqence
and fixes the --enable-checking failures.
When the expander don't return seqence, insn needs to be emited first
in order to get (INSN around and INSN_UID to work.

Honza

Wed Apr 26 15:57:35 MET DST 2000  Jan Hubicka  <jh@suse.cz>
	* function.c (epilogue_done): Pass whole insn to record_insns.

Index: egcs/gcc//function.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/function.c,v
retrieving revision 1.192
diff -c -3 -p -r1.192 function.c
*************** epilogue_done:
*** 7025,7030 ****
--- 7027,7033 ----
        basic_block bb = e->src;
        rtx insn = bb->end;
        rtx i;
+       rtx newinsn;
  
        if (GET_CODE (insn) != CALL_INSN
  	  || ! SIBLING_CALL_P (insn))
*************** epilogue_done:
*** 7035,7041 ****
        end_sequence ();
  
        i = PREV_INSN (insn);
!       emit_insn_before (seq, insn);
  
        /* Update the UID to basic block map.  */
        for (i = NEXT_INSN (i); i != insn; i = NEXT_INSN (i))
--- 7038,7044 ----
        end_sequence ();
  
        i = PREV_INSN (insn);
!       newinsn = emit_insn_before (seq, insn);
  
        /* Update the UID to basic block map.  */
        for (i = NEXT_INSN (i); i != insn; i = NEXT_INSN (i))
*************** epilogue_done:
*** 7043,7049 ****
  
        /* Retain a map of the epilogue insns.  Used in life analysis to
  	 avoid getting rid of sibcall epilogue insns.  */
!       record_insns (seq, &sibcall_epilogue);
      }
  #endif
  }
--- 7046,7053 ----
  
        /* Retain a map of the epilogue insns.  Used in life analysis to
  	 avoid getting rid of sibcall epilogue insns.  */
!       record_insns (GET_CODE (seq) == SEQUENCE
! 		    ? seq : newinsn, &sibcall_epilogue);
      }
  #endif
  }

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