This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [tree-ssa]: Dump file option names and small DCE fix

In message <>, Diego Novillo w
 >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.  

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]