This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Improve removal of statements when removing blocks
- From: law at redhat dot com
- To: Jason Merrill <jason at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 Jul 2003 10:22:33 -0600
- Subject: Re: [tree-ssa] Improve removal of statements when removing blocks
- Reply-to: law at redhat dot com
In message <wvlvfu23pgj.fsf@prospero.boston.redhat.com>, Jason Merrill writes:
>On Wed, 16 Jul 2003 19:11:55 -0600, law@redhat.com wrote:
>
>> Unfortunately, the code which linearizes a COND_EXPR which is always
>> true requires an ELSE clause which is empty -- a COMPOUND_EXPR with
>> both operands being empty statements does not qualify as empty, nor does
>> a chain of COMPOUND_EXPRs where all the leafs are empty statements.
>
>This is why we should be checking TREE_SIDE_EFFECTS rather than
>IS_EMPTY_STMT in most cases.
Agreed. However, I'm pretty sure that wouldn't help in this case --
unless we propagate up changes in TREE_SIDE_EFFECTS as we delete
unreachable statments with side effects.
jeff