This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix part of pr25505
- From: "Daniel Berlin" <dberlin at dberlin dot org>
- To: "Josh Conner" <jconner at apple dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 31 Aug 2006 09:03:56 -0400
- Subject: Re: [PATCH] Fix part of pr25505
- References: <44F6DBB3.firstname.lastname@example.org>
+ 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".