This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa]: Dump file option names and small DCE fix
- From: Jeff Law <law at porcupine dot slc dot redhat dot com>
- To: Diego Novillo <dnovillo at redhat dot com>
- Cc: Daniel Berlin <dberlin at dberlin dot org>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 19 Sep 2002 08:19:10 -0600
- Subject: Re: [tree-ssa]: Dump file option names and small DCE fix
- Reply-to: law at redhat dot com
In message <20020919012053.GB21342@tornado.toronto.redhat.com>, Diego Novillo w
rites:
>On Wed, 18 Sep 2002, Daniel Berlin wrote:
>
>> In trying out DCE, I noticed that it fcloses the dump_file in the same
>> if block it opens it in, so nothing besides a pre-dce dump gets printed
>> to it.
>>
>Thanks. This is OK.
>
>
>> I fixed this, and took the time to canonicalize the dump
>> option/file/enum names as we talked about earlier.
>> They now match the -f option. So we have -ftree-ssa-ccp and
>> -fdump-tree-ssa-ccp, and the enum is TDI_ssa_ccp.
>>
>You know, I've been thinking about this whole naming convention.
>After having typed -fdump-tree-...blah...blah like a million
>times, I'm finding these long names really annoying.
>
>Would it break your heart if we removed the ssa prefix from all
>these names? After all, we already know that these passes are
>working on SSA, and to the end-user the fact that they are using
>SSA or not is irrelevant. If, at a later date, we implement say
>a DCE pass that doesn't use SSA, then we can name it differently.
>What I propose is:
>
>-ftree-ssa => Goes away. Indirectly enabled by the
> other switches.
>-ftree-ssa-ccp => -ftree-ccp
>-ftree-ssa-dce => -ftree-dce
>-ftree-ssa-pre => -ftree-pre
>
>Similarly, we drop 'ssa' from the -fdump-tree switches.
>
>
>> After doing this, on a simple example, DCE eliminated everything.
>> The reason was that it doesn't consider return_stmt's inherently
>> necessary.
>>
>Hmm, I think this is wrong. A return statement shouldn't be
>inherently necessary. Consider:
>
> if (impossible)
> return;
>
>By making the return inherently necessary, you trick DCE into
>leaving the if() that we already know is impossible.
This should be caught by CCP, not DCE.
jeff