|Eliminate break/continue statements in loops firstname.lastname@example.org (=?ISO-8859-1?Q?Roland_Lei=DFa?=) (2009-12-07)|
|Re: Eliminate break/continue statements in loops email@example.com (Martin Ward) (2009-12-09)|
|Re: Eliminate break/continue statements in loops firstname.lastname@example.org (email@example.com) (2009-12-09)|
|Date:||Wed, 9 Dec 2009 15:04:17 -0800 (PST)|
|Posted-Date:||10 Dec 2009 02:25:16 EST|
It's standard practice to invert the condition and jump to the loop
exit code to "eliminate breaks and continues.
Roland Lei_a wrote:
> I am currently working on a optimization algorithm. So far it works on
> simple programs with a linear control flow, if-else-constructs, simple
> while loops and simple do-while loops. The constructs may be nested.
> With a simple loop I mean a loop which does not make use of continue,
> break or even goto.
> I know that irreducible CFGs can be transformed to reducible ones by
> node splitting. So I don't have to worry about cross edges if I
> implement that. But my question is whether there has been done some
> research to eliminate continue and break statements out of loops so an
> equivalent program results which does only make use of simple loops.
Return to the
Search the comp.compilers archives again.