https://gcc.gnu.org/bugzilla/show_bug.cgi?id=124420

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |jamborm at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org,
                   |                            |rsandifo at gcc dot gnu.org

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
I guess we need sth similar to the can_inline_p hook.  But I also thought that
there's globally a single factor determining the actual POLY_INT_CST constant.
So that's no longer the case and POLY_INT_CSTs are not IP invariant?

IMO one bug then is that svcntd() exposes a POLY_INT_CST instead of
evaluating it.

/* Return true if T is a GIMPLE minimal invariant.  It's a restricted
   form of function invariant.  */

bool
is_gimple_min_invariant (const_tree t)
{
  if (TREE_CODE (t) == ADDR_EXPR)
    return is_gimple_invariant_address (t);

  return is_gimple_constant (t);
}

/* Return true if T is a GIMPLE interprocedural invariant.  It's a restricted
   form of gimple minimal invariant.  */

bool
is_gimple_ip_invariant (const_tree t)
{
  if (TREE_CODE (t) == ADDR_EXPR)
    return is_gimple_ip_invariant_address (t);

  return is_gimple_constant (t);
}

so POLY_INT_CSTs are not is_gimple_ip_invariant?

Reply via email to