This is the mail archive of the gcc@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]
Other format: [Raw text]

Re: GCC trunk SPEC2000 performance


In message <20020620151815.GN17171@atrey.karlin.mff.cuni.cz>, Jan Hubicka write
s:
 > > Yes, that seems to be the same failure:
 > > /usr/src/SpecTests/d-permanent/i686/install-200206200731/bin/g77 -c -o aps
 > i.o -O3 -fomit-frame-pointer -march=athlon -funroll-all-loops -fstrict-alias
 > ing -malign-double -fprefetch-loop-arrays  apsi.f
 > > apsi.f: In subroutine `uvset':
 > > apsi.f:4327: internal compiler error: RTL flag check: REG_POINTER used wit
 > h unexpected rtx code `mem' in copy_rtx_and_substitute, at integrate.c:2065
 > > Please submit a full bug report,
 > > with preprocessed source if appropriate.
 > > See <URL:http://www.gnu.org/software/gcc/bugs.html> for instructions.
 > > specmake: *** [apsi.o] Error 1
 > Hmm, obvious fix appears to be the patch attached.  I am not at all sure
 > whether it is the sane fix, as I don't understand the difference between
 > first and second operand of addressof (need for the second operand).
 > I also can't test whether it works, as I don't have SPEC sources here.
Here's the actual patch I checked in for this problem.  I tried clearing 
these entries, but that created numerous problems elsewhere in the compiler
and I gave up...

	* function.h (struct emit_status): Clarify potential contents
	of regno_reg_rtx array.
	* integrate.c (copy_rtx_and_substitute): Update comments.  Make
	sure entry in regno_reg_rtx is a REG before checking REG_POINTER.

Index: function.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.h,v
retrieving revision 1.83
diff -c -3 -p -r1.83 function.h
*** function.h	17 Jun 2002 17:47:22 -0000	1.83
--- function.h	23 Jun 2002 15:53:28 -0000
*************** struct emit_status GTY(())
*** 105,111 ****
    tree * GTY ((length ("%h.regno_pointer_align_length"))) regno_decl;
  
    /* Indexed by pseudo register number, gives the rtx for that pseudo.
!      Allocated in parallel with regno_pointer_align.  */
    rtx * GTY ((length ("%h.regno_pointer_align_length"))) x_regno_reg_rtx;
  };
  
--- 105,114 ----
    tree * GTY ((length ("%h.regno_pointer_align_length"))) regno_decl;
  
    /* Indexed by pseudo register number, gives the rtx for that pseudo.
!      Allocated in parallel with regno_pointer_align. 
! 
!      Note MEM expressions can appear in this array due to the actions
!      of put_var_into_stack.  */
    rtx * GTY ((length ("%h.regno_pointer_align_length"))) x_regno_reg_rtx;
  };
  
Index: integrate.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/integrate.c,v
retrieving revision 1.197
diff -c -3 -p -r1.197 integrate.c
*** integrate.c	11 Jun 2002 12:21:46 -0000	1.197
--- integrate.c	23 Jun 2002 15:53:31 -0000
*************** copy_rtx_and_substitute (orig, map, for_
*** 2062,2068 ****
  	  RTX_UNCHANGING_P (map->reg_map[regno]) = RTX_UNCHANGING_P (temp);
  	  /* A reg with REG_FUNCTION_VALUE_P true will never reach here.  */
  
! 	  if (REG_POINTER (map->x_regno_reg_rtx[regno]))
  	    mark_reg_pointer (map->reg_map[regno],
  			      map->regno_pointer_align[regno]);
  	  regno = REGNO (map->reg_map[regno]);
--- 2062,2078 ----
  	  RTX_UNCHANGING_P (map->reg_map[regno]) = RTX_UNCHANGING_P (temp);
  	  /* A reg with REG_FUNCTION_VALUE_P true will never reach here.  */
  
! 	  /* Objects may initially be represented as registers, but
! 	     but turned into a MEM if their address is taken by
! 	     put_var_into_stack.  Therefore, the register table may have
! 	     entries which are MEMs.
! 
! 	     We briefly tried to clear such entries, but that ended up
! 	     cascading into many changes due to the optimizers not being
! 	     prepared for empty entries in the register table.  So we've
! 	     decided to allow the MEMs in the register table for now.  */
! 	  if (REG_P (map->x_regno_reg_rtx[regno])
! 	      && REG_POINTER (map->x_regno_reg_rtx[regno]))
  	    mark_reg_pointer (map->reg_map[regno],
  			      map->regno_pointer_align[regno]);
  	  regno = REGNO (map->reg_map[regno]);



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