Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.compilers    |    Compiler construction, theory, etc. (Mod    |    2,753 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 1,773 of 2,753    |
|    scooter.phd@gmail.com to All    |
|    Re: Eliminate break/continue statements     |
|    09 Dec 09 15:04:17    |
      It's standard practice to invert the condition and jump to the loop       exit code to "eliminate breaks and continues.              Roland Lei_a wrote:       > Hi,       >       > 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.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca