SSA-based dead-code elimination

Mark Mitchell mark@codesourcery.com
Wed Aug 2 14:50:00 GMT 2000


>>>>> "Laurent" == Laurent Guerby <guerby@acm.org> writes:

    Laurent> Mark Mitchell wrote [about empty loops removal]:
    >> So, I think we should reserve your patch for the day when we
    >> actually turn this stuff on by default.

    Laurent> Will there be a documented way to generate an empty loop
    Laurent> that survives optimization then? I can think of using a
    Laurent> volatile variable, but this generates unecessary memory
    Laurent> accesses.

The usual use for such a thing is a timing loop on an embedded system.
In that case, you already need intimate knoweldge of the processor.
You can write the loop as a volatile asm, and the optimizer will leave
it alone.

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com


More information about the Gcc-patches mailing list