This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [ssaupdate] Local dominance info
Hi,
On Wed, 20 Oct 2004, Andrew MacLeod wrote:
> > > This strikes me *much* more as a local thing that an individual pass
> > > might be interested in, and so should number the stmt's itself for the
> > > duration of its interest.
> >
> > Still you would need some mechanism to update things when statements are
> > inserted, so this would make things only more complicated.
>
> and what wrong with the local_dom_insert_after() and
> local_dom_insert_before() which call the bsi routines? It looks pretty
> trivial to do that, then the info only exists and is maintained when
> you want it.
But then you have to ask yourself everytime you add stmts if you want to
use these or the normal inserters. And what about common code which
inserts statements? Do we need two versions of them too?
Generally I think there should be exactly one interface to do something
(inserting stmts), so if maintaining this local numbering doesn't cost
much it would be much cleaner to do this, instead of relying on special
case code.
Why exactly would you like to have this keeping of information be factored
out?
> I don't see any reason why it should be kept up to date all the time
> when virtually no-one else cares about it.
Cleanlyness of interfaces? Less potential for funny bugs because the
wrong inserters were used by some common code?
Ciao,
Michael.