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]

ifcvt tweekage


The second fragment I forgot to commit last week; it fixes the
aborts seen on ia64 and arm (with earnshaw's patches).

The first fragment comes from looking at TImode libgcc2 functions,
wherein pairs of DImode moves would not be converted because there
was a remenant TImode clobber in the block as well.

ia64 bootstrap not yet complete, but seems safe enough.


r~

        * ifcvt.c (cond_exec_process_insns): Drop USE and CLOBBER insns
        that get in the way after reload.
        (cond_exec_process_if_block): Skip a label heading THEN block.

Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/ifcvt.c,v
retrieving revision 1.15
diff -c -p -d -r1.15 ifcvt.c
*** ifcvt.c	2000/05/13 17:08:28	1.15
--- ifcvt.c	2000/05/16 06:19:23
*************** cond_exec_process_insns (start, end, tes
*** 197,202 ****
--- 197,215 ----
        if (GET_CODE (insn) != INSN && GET_CODE (insn) != CALL_INSN)
  	abort ();
  
+       /* Remove USE and CLOBBER insns that get in the way.  */
+       if (reload_completed
+ 	  && (GET_CODE (PATTERN (insn)) == USE
+ 	      || GET_CODE (PATTERN (insn)) == CLOBBER))
+ 	{
+ 	  /* ??? Ug.  Actually unlinking the thing is problematic, 
+ 	     given what we'd have to coordinate with our callers.  */
+ 	  PUT_CODE (insn, NOTE);
+ 	  NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
+ 	  NOTE_SOURCE_FILE (insn) = 0;
+ 	  goto insn_done;
+ 	}
+ 
        /* Last insn wasn't last?  */
        if (must_be_last)
  	return FALSE;
*************** cond_exec_process_if_block (test_bb, the
*** 287,292 ****
--- 300,309 ----
  
    then_start = then_bb->head;
    then_end = then_bb->end;
+ 
+   /* Skip a label heading THEN block.  */
+   if (GET_CODE (then_start) == CODE_LABEL)
+     then_start = NEXT_INSN (then_start);
  
    /* Skip a (use (const_int 0)) or branch as the final insn.  */
    if (GET_CODE (then_end) == INSN

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