[tree-ssa] Dce & infinite loops
Zdenek Dvorak
rakdver@atrey.karlin.mff.cuni.cz
Thu Mar 18 16:38:00 GMT 2004
Hello,
> >OK, I may easily extend the loop optimizer to remove empty loops if
> >there is a demand for it (once dce is fixed so that it is not done
> >even in cases it is incorrect, as happens now).
> >
>
> How is the loop in your example different from a call to
> a non-terminating function returning void? I don't see
> why the optimizers would handle that correctly and not
> the infinite loop. Could you explain?
I had in one of previous mails, but anyway: for the function we see it
has side effects (nontermination), so we mark it as neccesary. For the
loop we do not.
The solution is obvious -- mark the backedges of the loops for that we are
not able to prove that they have to terminate as well.
Zdenek
More information about the Gcc
mailing list