Eric Botcazou <ebotca...@adacore.com> writes: >> non-local labels should block most optimizations by the fact they >> are a receiver of control flow and thus should have an abnormal >> edge coming into them. If that's not the case (no abnormal edge) >> then that's the bug to fix. > > It's (of course) more complicated, you need to look at HP's fix and testcase > to see why we need a full optimization barrier. See also the prologue and > epilogue of many architectures which also need a blockage when they are > establishing or destroying the frame.
But the prologue/epilogue case often doesn't need to be a full blockage. We could move a load-immediate instruction -- or even an accesss to known- global memory -- before the allocation or after the deallocation. This can actually be important on architectures that use load-multiple to restore the return register and want the prefetcher to see the target address as early as possible. So I think the prologue and epilogue is one case where we really do want to spell out what's clobbered by the allocation and deallocation. Thanks, Richard