[tree-ssa] Dce & infinite loops

Dale Johannesen dalej@apple.com
Thu Mar 18 18:11:00 GMT 2004


On Mar 18, 2004, at 8:25 AM, Zdenek Dvorak wrote:
>
> 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).

I think it is a good idea.  In the past I've been on RMS's side in this
matter (don't remove them under the assumption that users put it
there for a reason), but enough people inside Apple have asked
for empty loops to be removed that I'm ready to change my mind.
If there is controversy, it might be conditionalized on 
-fremove-empty-loops
or something like that.

Of course this refers only to finite empty loops; infinite ones cannot
be removed, as several people have said.  (As a semi-practical
matter, you can use these to wait for an external signal from ^C
or the like.)



More information about the Gcc mailing list