[Bug debug/56510] [4.7/4.8 Regression] More var-tracking scalability problems
jakub at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Mar 3 12:40:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56510
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2013-03-03 12:40:09 UTC ---
Reduced testcase:
struct S { unsigned long s1; void **s2[0]; };
void **a, **b, **c, **d, **e, **f;
static void **
baz (long x, long y)
{
void **s = f;
*f = (void **) (y << 8 | (x & 0xff));
f += y + 1;
return s;
}
void bar (void);
void
foo (void)
{
void **g = b[4];
a = b[2];
b = b[1];
g[2] = e;
void **h = ((void ***************)
a)[1][1][1][1][1][1][1][1][1][1][1][1][1][66];
void **i = ((struct S *) h)->s2[4];
d = baz (4, 3);
d[1] = b;
d[2] = a;
d[3] = bar;
b = d;
g[1] = i[2];
a = g;
((void (*) (void)) (i[1])) ();
}
I'd say the problem is that during expansion we turn:
_10 = MEM[(void * * * * * * * * * * * * * * *)a.1_4 + 8B];
_11 = MEM[(void * * * * * * * * * * * * * *)_10 + 8B];
_12 = MEM[(void * * * * * * * * * * * * *)_11 + 8B];
_13 = MEM[(void * * * * * * * * * * * *)_12 + 8B];
_14 = MEM[(void * * * * * * * * * * *)_13 + 8B];
_15 = MEM[(void * * * * * * * * * *)_14 + 8B];
_16 = MEM[(void * * * * * * * * *)_15 + 8B];
_17 = MEM[(void * * * * * * * *)_16 + 8B];
_18 = MEM[(void * * * * * * *)_17 + 8B];
_19 = MEM[(void * * * * * *)_18 + 8B];
_20 = MEM[(void * * * * *)_19 + 8B];
_21 = MEM[(void * * * *)_20 + 8B];
_22 = MEM[(void * * *)_21 + 8B];
h_23 = MEM[(void * *)_22 + 528B];
# DEBUG h => h_23
i_24 = MEM[(struct S *)h_23].s2[4];
into:
(debug_insn 14 13 15 2 (var_location:DI h (mem/f:DI (plus:DI (mem/f:DI (plus:DI
(mem/f:DI (plus:DI (mem/f:DI (plus:DI (mem/f:DI (plus:DI (mem/f:DI
(plus:DI (mem/f:DI (plus:DI (mem/f:DI (plus:DI (mem/f:DI (plus:DI (mem/f:DI
(plus:DI (mem/f:DI (plus:DI (mem/f:DI (plus:DI (mem/f:DI (plus:DI (mem/
f:DI (plus:DI (reg/f:DI 61 [ a.1 ])
(const_int 8 [0x8])) [0 MEM[(vo
id * * * * * * * * * * * * * * *)a.1_4 + 8B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void * * *
* * * * * * * * * * *)_10 + 8B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void * * * * * * *
* * * * * *)_11 + 8B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void * * * * * * * * * * *
*)_12 + 8B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void * * * * * * * * * * *)_13 + 8
B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void * * * * * * * * * *)_14 + 8B]+0 S8 A6
4])
(const_int
8 [0x8])) [0 MEM[(void * * * * * * * * *)_15 + 8B]+0 S8 A64])
(const_int 8
[0x8])) [0 MEM[(void * * * * * * * *)_16 + 8B]+0 S8 A64])
(const_int 8 [0x8])) [0
MEM[(void * * * * * * *)_17 + 8B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void *
* * * * *)_18 + 8B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void * * * *
*)_19 + 8B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void * * * *)_20 +
8B]+0 S8 A64])
(const_int 8 [0x8])) [0 MEM[(void * * *)_21 + 8B]+0 S8
A64])
(const_int 528 [0x210])) [0 MEM[(void * *)_22 + 528B]+0 S8 A64]))
pr56510-2.i:21 -1
(nil))
which is simply too large for any reasonable cselib handling, it would better
be split using debug temporaries.
OT, are you sure the testcase doesn't violate aliasing just about everywhere?
More information about the Gcc-bugs
mailing list