https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126130
Richard Biener <rguenth at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot
gnu.org
--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> ---
The Open variable is expanded when processing
ParseNALBlock.clobber = ParseNALBlock.clobber + UNKNOWN
as a side-note I see we create
ParseNALBlock.clobber = CALLCLOBBERED(27)
but no constraint involving CALLCLOBBERED(27), so this constraint gets
ignored later.
Then:
Unifying Open.clobber to ParseNALBlock.clobber
...
Unifying ESCAPED to ParseNALBlock.clobber
and this is where we get
ESCAPED = ESCAPED + UNKNOWN
affecting it.
The constraint that exposes 'Open' and not any of its subvars is from
vlc_entry__0_9_0f/3
callarg(38) = &Open
callarg(38) = callarg(38) + UNKNOWN
callarg(38) = *callarg(38) + UNKNOWN
CALLUSED(34) = callarg(38)
...
ESCAPED = &Open
I think it should be correct to handle is_fn_info variables as to be
never willingly subject to UNKNOWN offset constraints, we only ever
create known offset constraints for calls or argument accesses. That
would make a + not-UNKNOWN to + UNKNOWN not a conservative transition
in the constraint set which is a bit backwards and sounds dangerous,
but at least for PTA Andersen we never merge such constraints
(it would sound like a missed opportunity though, to drop all + not-UNKNOWN
when there's a + UNKNOWN complex constraint).
So
diff --git a/gcc/pta-andersen.cc b/gcc/pta-andersen.cc
index bba34b3c9a0..7adf4f53579 100644
--- a/gcc/pta-andersen.cc
+++ b/gcc/pta-andersen.cc
@@ -394,7 +394,8 @@ solution_set_expand (bitmap set, bitmap *expanded)
{
varinfo_t v = get_varinfo (j);
if (v->is_artificial_var
- || v->is_full_var)
+ || v->is_full_var
+ || v->is_fn_info)
continue;
if (v->head != prev_head)
{
plus, for consistency
diff --git a/gcc/pta-andersen.cc b/gcc/pta-andersen.cc
index 2792813f304..2ad6e7ea987 100644
--- a/gcc/pta-andersen.cc
+++ b/gcc/pta-andersen.cc
@@ -768,7 +768,7 @@ build_pred_graph (void)
/* All related variables are no longer direct nodes. */
bitmap_clear_bit (graph->direct_nodes, rhsvar);
v = get_varinfo (rhsvar);
- if (!v->is_full_var)
+ if (!v->is_full_var && !v->is_fn_info)
{
v = get_varinfo (v->head);
do
The choice to handle [indirect] calls and function special variables the
way we do bites back here. A more explicit notion would have been to
add special constraint types for calls and access to function parts.