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] [PATCH]: Fix DCE not updating bb->end_tree_p


bsi_last() has a speed hack in it that predates bsi_prev(), or at least
doesnt work with bsi_prev(). I dont recall saying anything about using
bsi_last() :-).

Then how does one iterate through a basic block in reverse, if not starting with bsi_last and using bsi_prev until we hit the start?
:)



bsi_last(), for better or for worse, will attempt to set the iterator to
whatever the end pointer is. If it succeeds in doing this, it doesnt
have the iterator history required when we decend down into BIND_EXPR's.
It was never really intended for use with bsi_prev(). It was really
intended for when you simply wanted a BSI object for the last stmt.


I didnt suggest using bsi_last(). I suggested changing your loop which
is going to pass through the previous stmt before it terminates anyway,
This would require two iterators, rahter than one, since we don't know what the previous statement is before we start.

So if I did what you said, i'd have effectively copied and pasted what bsi_prev's code is to do this exact same thing, which seems like a very silly thing to do.



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