This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] Fix dominator bug
- From: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: gcc-patches at gcc dot gnu dot org, dnovillo at redhat dot com, jh at suse dot cz,s dot bosscher at student dot tudelft dot nl
- Date: Wed, 7 Jan 2004 16:58:59 +0100
- Subject: Re: [tree-ssa] Fix dominator bug
Hello,
> > On Wed, 2004-01-07 at 10:15, Jan Hubicka wrote:
> >
> > > Perhaps we can just add an sanity check here and insist on caller to
> > > do
> > > whathever is needed to update dominance.
> > >
> > But in this particular case, it's easy to keep the dominance info
> > up-to-date. The call to delete_from_dominance_info shouldn't be
> > expensive.
calling it is definitely a good idea, since it prevents a memory leak
and it is also neccessary to keep the tree consistent. The only reason
we do not see any problems with the block not being removed is because
anything that makes the edges to be removed (and thus may create
unreachable code) invalidates the dominance information (making it only
conservatively correct) and the whole tree is then recomputed from
scratch before using it.
> > Which reminds me, have you seen any compile-time
> > regressions
> > due to this change, Steven?
>
> Only dead code removal is transformation I can think of that would work
> with this code without any other dominance tree manipulation.
> But dead basic blocks can't be in the dminator tree anyway (we abort
> while building the datastructure)
We do not (we have no way of knowing about them, once we throw the basic
block away).
Zdenek