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]

revert the reg-stack fix


Hi
This patch is no longer necesary now when stupid is dead, since the USEs
are no longer emited.
I've verified that my original testcase and it now compiles even w/o
the patch.

Mon Jan 24 17:41:58 MET 2000  Jan Hubicka  <jh@suse.cz>

	* reg-stack.c (subst_stack_regs_pat): Revert the change from
	Jan 6.

Index: egcs/gcc/reg-stack.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/reg-stack.c,v
retrieving revision 1.52
diff -c -3 -p -r1.52 reg-stack.c
*** reg-stack.c	2000/01/17 16:01:04	1.52
--- reg-stack.c	2000/01/24 16:41:03
*************** subst_stack_regs_pat (insn, regstack, pa
*** 1383,1406 ****
        if (STACK_REG_P (*src) 
            && find_regno_note (insn, REG_DEAD, REGNO (*src)))
          {
! 	   /* In stupid allocation the USE might be used to extend lifetime
! 	      of variable to given scope.  This may end up as USE of dead
! 	      register.  */
! 	   if (optimize || get_hard_regnum (regstack, *src) != -1)
! 	     emit_pop_insn (insn, regstack, *src, EMIT_AFTER);
  	   return;
          }
        else if (get_hard_regnum (regstack, *src) == -1)
! 	{
! 	   if (optimize)
! 	     abort();
! 	   if (GET_CODE (PATTERN (insn)) != USE)
! 	     abort();
! 	   PATTERN (insn) = gen_rtx_SET (GET_MODE (*src), *src,
! 					 CONST0_RTX (GET_MODE (*src)));
! 	   subst_stack_regs_pat (insn, regstack, PATTERN (insn));
! 	   return;
! 	}
        break;
  
      case CLOBBER:
--- 1383,1394 ----
        if (STACK_REG_P (*src) 
            && find_regno_note (insn, REG_DEAD, REGNO (*src)))
          {
! 	   emit_pop_insn (insn, regstack, *src, EMIT_AFTER);
  	   return;
          }
+       /* ??? Uninitialized USE should not happen.  */
        else if (get_hard_regnum (regstack, *src) == -1)
! 	abort();
        break;
  
      case CLOBBER:

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