[Bug tree-optimization/36347] New: points-to sets should be always kept for call-clobbering
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Tue May 27 13:42:00 GMT 2008
typedef unsigned long my_uintptr_t;
int check_a(my_uintptr_t tagged_ptr);
int __attribute__((noinline)) try_a(my_uintptr_t x)
{
my_uintptr_t heap[2];
my_uintptr_t *hp = heap;
hp[0] = x;
hp[1] = 0;
return check_a((my_uintptr_t)(void*)((char*)hp + 1));
}
<bb 2>:
# heap_10 = VDEF <heap_9(D)>
heap[0] = x_2(D);
# heap_11 = VDEF <heap_10>
heap[1] = 0;
D.1562_4 = &heap + 1;
D.1563_5 = (long unsigned int) D.1562_4;
# heap_12 = VDEF <heap_11>
D.1561_6 = check_a (D.1563_5);
return D.1561_6;
The points-to solution for D.1562_4 is D.1562_4 = { heap }, but we drop
that to
D.1562_4, its value escapes, points-to anything
because the pointer is never dereferenced. This causes all addressable
variables to escape at the call to check_a, which pessimizes code and
causes useless VOPs.
--
Summary: points-to sets should be always kept for call-clobbering
Product: gcc
Version: 4.4.0
Status: UNCONFIRMED
Keywords: missed-optimization, alias
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36347
More information about the Gcc-bugs
mailing list