This is the mail archive of the gcc-patches@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]: PRE updates and note on bug


On Tue, 2003-07-22 at 18:00, Steven Bosscher wrote:
> Op di 22-07-2003, om 19:57 schreef Andrew MacLeod:
> > Like I said, Im contemplating ditching bsi_prev anyway... no-one uses it
> > and its horribly inefficient.
> 
> I had a use for it in my attempt to write a tree based tail recursion
> elimination pass.  Efficient reverse iterators would be very useful to
> identify calls in tail positions, as well as for identifying exit
> blocks.  I suppose many jump optimizations could benefit from reverse
> iterators as well. 
> 

Oughtn't those things be identifiable using the CFG and bsi_last()?

> So it would be nice to see bsi_prev() be fixed instead of removed :)
> 

I agree, it ought to get fixed eventually... I just dont have time right
now to look at it.

> There was an idea to use TREE_CHAIN of the COMPOUND_EXPRs to make the
> containers double linked lists.  What happened to that idea?
> 
>
The right solution is to replace COMPOUND_EXPRs with a different linking
mechanism.. but easier said than done so far. Too many other things that
need attention.

we do have the macros:
  FOR_EACH_STMT_IN_REVERSE
and
  FOR_EACH_BSI_IN_REVERSE

These are used by algorithms which need to traverse all the stmts in a
block backwards, and they work reasonably efficiently, at least compared
top bsi_prev() :-)

Andrew.





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