This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question on cfg_remove_useless_stmts_bb
- From: kenner at vlsi1 dot ultra dot nyu dot edu (Richard Kenner)
- To: law at redhat dot com
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 17 Aug 04 06:57:19 EDT
- Subject: Re: Question on cfg_remove_useless_stmts_bb
if (TREE_CODE (stmt) == ASM_EXPR
|| (TREE_CODE (stmt) == MODIFY_EXPR
&& (TREE_OPERAND (stmt, 0) == var
|| TREE_CODE (stmt, 0) == val)))
Ought to do the trick.
In this case, yes, but I'm not convinced that it's complete. Couldn't
VAL be a more complex expression here and we have to verify that none of
its operands were modified? That issue is basically the other motivation
for my query (the primary one being, of course, "how did this ever work?"!).