SPECfp2000's APSI hits RTL flag checking.

Toon Moene toon@moene.indiv.nluug.nl
Mon May 20 04:01:00 GMT 2002


L.S.,

Some days ago I wrote to this forum that SPECfp2000's apsi.f program
didn't compile anymore (peak compilation).  It hit the following RTL
flag check:

apsi.f: In subroutine `costi':
apsi.f:4932: RTL flag check: REG_POINTER used with unexpected rtx code
`mem' in copy_rtx_and_substitute, at integrate.c:2063

And indeed - a debugging session shows:

(gdb) list 
2055            {
2056              temp = XEXP (orig, 0);
2057              map->reg_map[regno] = gen_reg_rtx (GET_MODE (temp));
2058              REG_USERVAR_P (map->reg_map[regno]) = REG_USERVAR_P
(temp);
2059              REG_LOOP_TEST_P (map->reg_map[regno]) =
REG_LOOP_TEST_P (temp);
2060              RTX_UNCHANGING_P (map->reg_map[regno]) =
RTX_UNCHANGING_P (temp);
2061              /* A reg with REG_FUNCTION_VALUE_P true will never
reach here.  */
2062    
2063              if (REG_POINTER (map->x_regno_reg_rtx[regno]))
2064                mark_reg_pointer (map->reg_map[regno],
(gdb) p map->x_regno_reg_rtx[regno]
$3 = (struct rtx_def *) 0x40371b40
(gdb) p *(map->x_regno_reg_rtx[regno])
$4 = {code = MEM, mode = SImode, jump = 0, call = 0, unchanging = 1,
volatil = 0, in_struct = 0, used = 0, integrated = 0, 
  frame_related = 1, fld = {{rtwint = 1077353600, rtint = 1077353600,
rtuint = 1077353600, rtstr = 0x40371c80 "P", 
      rtx = 0x40371c80, rtvec = 0x40371c80, rttype = 1077353600,
rt_addr_diff_vec_flags = {min_align = 128, base_after_vec = 0, 
        min_after_vec = 0, max_after_vec = 1, min_after_base = 1,
max_after_base = 1, offset_unsigned = 0, scale = 55}, 
      rt_cselib = 0x40371c80, rtbit = 0x40371c80, rttree = 0x40371c80,
bb = 0x40371c80, rtmem = 0x40371c80}}}

So somewhere this array must have been filled incorrectly - but where ?

toon@laptop:~/compilers/snapshots/gcc/gcc$ grep x_regno_reg_rtx *.c
emit-rtl.c:      new1 = (rtx *) xrealloc (f->emit->x_regno_reg_rtx,
emit-rtl.c:  free (f->emit->x_regno_reg_rtx);
emit-rtl.c:  rtx *ptr = es->x_regno_reg_rtx;
emit-rtl.c:  for (i = es->regno_pointer_align_length, r =
es->x_regno_reg_rtx,
integrate.c:  map->x_regno_reg_rtx = inl_f->emit->x_regno_reg_rtx;
integrate.c:      if (REG_POINTER (map->x_regno_reg_rtx[regno]))
integrate.c:      if (REG_POINTER (map->x_regno_reg_rtx[regno]))
unroll.c:  map->x_regno_reg_rtx = cfun->emit->x_regno_reg_rtx;

Obviously, it only gets (re-)allocated/freed (in emit-rtl.c) and copied
(in integrate.c and unroll.c).  Where are the contents of this array
filled in ???

Thanks in advance,

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)



More information about the Gcc-bugs mailing list