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: Thoughts about semantics of BB_VISITED




On Fri, 7 Jan 2005, Diego Novillo wrote:

Zdenek Dvorak wrote:
Hello,


If the state of the mark would be undefined, you would need either to
clean them up first (over whole cfg), or use bitmaps for the marks.
Both of these approaches bring a risk of quadratic behavior.


Quadratic behaviour? How?


because the places where it is used now (most notably, get_loop_body)
do not look at whole cfg, but just at the loop body.

Oh, I see. So, this is inside a helper, not a pass. How unfortunate. Perhaps get_loop_body should not use BB_VISITED. What if the pass calling get_loop_body is using BB_VISITED for its own processing?

Then you get screwed, because it clears the visited flags when it's done (see dfs_enumerate_from).



Also note that get_loop_body_in_dom_order doesn't touch the visited flags.


Whatever get_loop_body does to visited flags should at the very least be documented.

--Dan


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