This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH to gimplify_modify_expr to avoid extra copies
On Thu, Jun 10, 2004 at 11:27:25PM -0400, Jason Merrill wrote:
> ! /* Use a V_MAY_DEF if the RHS might throw, as the LHS won't be
> ! modified in that case. FIXME we should represent somehow
> ! that it is killed on the fallthrough path. */
> ! || TREE_CODE (TREE_OPERAND (stmt, 1)) == CALL_EXPR
> ! || (flag_non_call_exceptions
> ! && tree_could_trap_p (TREE_OPERAND (stmt, 1))))
After gimplification, we can do better than this; use tree_could_throw_p.
Hmm, I see we currently only use this on complete statements. There's a
bug here for expressions -- the final return should be checking
tree_could_trap_p.
r~