[CFG] Loop unswitching

Zdenek Dvorak rakdver@atrey.karlin.mff.cuni.cz
Mon Feb 25 05:24:00 GMT 2002


Hello.

> So the main problem is not killing the conditional described bellow.
> Perhaps you can simply kill the conditonal and create fake edge to keep
> datastructure consistent.  This is probably cleaner sollution than keeping
> "constant" condjump in the loop.
> 
> Also note that heuristics in recursing can be badly confused by not killing the
> code early in case the condtional guards important portion of the loop
> (this is often the case).

I believe this could be solution: in all natural cases, I'm able to remove
the path, and I'm able to detect whether I can do it.  In other cases, I can
either ignore it or make full unswitching; they in fact never occur in
real-world programs (well, except maybe in some generated ones), so it
does not matter.

Zdenek



More information about the Gcc-patches mailing list