edge vector corruption

Nathan Sidwell nathan@codesourcery.com
Wed Sep 29 13:06:00 GMT 2004


Jan Hubicka wrote:

>>If edge vectors can be reallocated in such loops, then the iterators need
>>redesigning.
> 
> It always has been possible to do so easilly, so I would guess we do it
> from time to time.
Though not an edge expert, I am inclined to agree.  This case was buried
several levels in.

> In edge forwarding it is quite important for time complexity (ie we need
> to walk all edges together with possibly elliminating them in linear
> time).  This is why it used
>   for (e = b->succ; e; e = next)
> ...
>         next = e->succ_next;
> other places that are mine will use same paradigm, so it is easy to grep
> for "next = e".

or a
	for (ix = 0; EDGE_ITERATE (b->succ, ix, e); ix++)
	{...}
I proposed -- but y'all are fed up with me going on about that :)

nathan

-- 
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk




More information about the Gcc-bugs mailing list