Commit caa0705c by Jan Hubicka Committed by Jan Hubicka

tree-ssa-alias.c (nonoverlapping_component_refs_p_1): Break out from ...; work…

tree-ssa-alias.c (nonoverlapping_component_refs_p_1): Break out from ...; work also on duplicated types.

	* tree-ssa-alias.c (nonoverlapping_component_refs_p_1): Break out
	from ...; work also on duplicated types.
	(nonoverlapping_component_refs_since_match): ... here
	(ncr_type_uid): Break out from ...
	(ncr_compar): ... here; look for TYPE_UID of canonical type if
	available.
	(nonoverlapping_component_refs_p): Use same_type_for_tbaa to match
	the types and nonoverlapping_component_refs_p_1 to disambiguate.
	* g++.dg/lto/alias-3_0.C: New file.
	* g++.dg/lto/alias-3_1.c: New file.

From-SVN: r273322
parent 1d00272b
2019-07-09 Jan Hubicka <hubicka@ucw.cz>
* tree-ssa-alias.c (nonoverlapping_component_refs_p_1): Break out
from ...; work also on duplicated types.
(nonoverlapping_component_refs_since_match): ... here
(ncr_type_uid): Break out from ...
(ncr_compar): ... here; look for TYPE_UID of canonical type if
available.
(nonoverlapping_component_refs_p): Use same_type_for_tbaa to match
the types and nonoverlapping_component_refs_p_1 to disambiguate.
2019-07-09 Martin Sebor <msebor@redhat.com> 2019-07-09 Martin Sebor <msebor@redhat.com>
PR tree-optimization/90989 PR tree-optimization/90989
......
2019-07-09 Jan Hubicka <hubicka@ucw.cz>
* g++.dg/lto/alias-3_0.C: New file.
* g++.dg/lto/alias-3_1.c: New file.
2019-07-09 Martin Sebor <msebor@redhat.com> 2019-07-09 Martin Sebor <msebor@redhat.com>
PR tree-optimization/90989 PR tree-optimization/90989
......
/* { dg-lto-do run } */
/* { dg-lto-options { { -O3 -flto -fno-early-inlining } } } */
struct a
{
int foo,bar;
};
struct b
{
struct a a[10];
};
__attribute__ ((used)) struct b b, *bptr=&b, *bptr2=&b;
__attribute__ ((used)) int i,j;
extern "C" void inline_me_late (void);
int
main (void)
{
int jj=j;
bptr2->a[jj].bar = 0;
inline_me_late ();
if (!__builtin_constant_p (bptr2->a[jj].bar == 0))
__builtin_abort ();
return 0;
}
/* { dg-lto-do run } */
/* { dg-lto-options { { -O3 -flto -fno-early-inlining } } } */
struct a
{
int foo,bar;
};
struct b
{
struct a a[10];
};
extern struct b *bptr;
extern int i;
void
inline_me_late (void)
{
bptr->a[i].foo=1;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment