some tree-ssa vs mainline stats
law@redhat.com
law@redhat.com
Thu Jun 19 21:57:00 GMT 2003
In message <200306191744.h5JHi04X011156@gremlin.ics.uci.edu>, Dan Nicolaescu wr
ites:
> { // THIS BLOCK CAN BE ELIMINATED
> struct iterator<std::random_access_iterator_tag,const GATOM*,int,cons
>t GATOM* const*,const GATOM* const&> * const this;
>
> (void)0
> };
> this->_M_current = *T.9563
> }
> }
>
>
>It seems that DCE is getting confused by "this", so it doesn't
>eliminate the inner block of dead code.
It's not that it's confused. It simply doesn't know that it's safe for
the block to go away.
You might think that if a block has no code that it could be safely
removed. Bzzt. We can (unfortunately) get uses of variables outside
their lexical scope. It's on the todo list to fix.
So you might then think that you could remove unused variables. I in
fact have code to do this. However, it runs afoul of some problems in
how we gimplify nested functions and SAVE_EXPRs. I believe resolving
this is probably the top of my stack once I'm through this round of
CFG EH cleanups.
>
>Also there's a lot of "if (1)" and "if (0)" code.
I'd love to have a compilable example. If we've got if (1) or if (0) code
lying around, I'd definitely want to have a deeper look.
jeff
More information about the Gcc
mailing list