This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Thoughts about semantics of BB_VISITED
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 it is doomed :-(. Quite often there is no real reason why a pass
should use BB_VISITED -- it can simply use sbitmap of basic blocks instead.
> In any case, I agree that we should assert this inside verify_flow_info.
> I'll prepare a patch.
Thanks.
Zdenek