[PATCH] Fix part of pr25505

Daniel Berlin dberlin@dberlin.org
Thu Aug 31 14:18:00 GMT 2006


> +               {
> +                 FOR_EACH_SSA_DEF_OPERAND (def_p, stmt, op_iter, SSA_OP_ALL_DEFS)
> +                   {
> +                     tree def = DEF_FROM_PTR (def_p);
> +                     if (TREE_CODE (def) == SSA_NAME)
> +                       def = SSA_NAME_VAR (def);
> +                     if (is_call_clobbered (def))
> +                       goto unsafe;
> +                   }
>                 }
>

1. How can DEF be anything but an SSA_NAME?  This iterator only
iterates over the SSA_NAMES.
2. You really want if (MTAG_P (def) && is_call_clobbered (def)).

It's not possible for an SSA variable to be clobbered, even if the
underlying var on which it was originally based is.
However, it is possible for the SSA memory tag to be clobbered.
The above will incorrectly look at the underlying variable in the case
of non-memory tags, and will come up with an answer of "clobbered"
when it should come up with an answer of "not-clobbered".



More information about the Gcc-patches mailing list