This is the mail archive of the gcc@gcc.gnu.org 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] Lazy updating of stmt operands


Hello,

> > > > > tree-dfa.c:compute_immediate_uses()
> > > >
> > > > Which needs to pass through every single statement in the program. Not
> > > > really terribly efficient.
> > >
> > > *shrug*, it's used by SSA-CCP.  Since def-use edges are only needed by
> > > some passes, I don't think it would be worth our while trying to
> > > maintain them in get_stmt_operands.
> > 
> > There are going to be more passes that need immediate uses.  Even a simple 
> > pass to kill redundant PHIs (say, after unswitching a loop) will have to go 
> > over _all_ statements to get the immediate uses of one or two statements.  It 
> > would be really nice if there were some way to keep this information 
> > up-to-date at all times...
> 
> So use get_immidiate_uses() which does what is required on demand, and
> if we discover its a serious performance issue down the road, it ought
> to be easy enough to change.

we are talking about updating ssa after every operation; this would mean
calling get_immediate_uses a lot. I am quite sure there would be a
performance problem.  There is a little sense in not keeping the
information, especially given that it is entirely trivial.  I will
prepare a patch so that we may measure whether the costs of the updating
are significant.

Zdenek


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