Patches to fix optimizer bug & C++ exceptions for GCC VAX backend
Jeff Law
law@redhat.com
Tue Apr 26 20:41:00 GMT 2016
On 04/01/2016 01:06 PM, Jake Hamby wrote:
>
> My theory is that it has to do with liveness detection and a write
> into the stack frame being incorrectly seen as updating a local
> variable, but that could be completely wrong. I was hoping that by
> cc'ing gcc-patches that somebody more familiar with why some phase of
> the optimizer might decide to delete this particular insn that copies
> data into the stack (to overwrite the return address, e.g. to move to
> EH_RETURN_HANDLER_RTX) immediately before returning.
Dead store elimination is the most likely candidate. It "knows" that
stores into the local frame are dead when the function returns and uses
that information to eliminate such stores.
You may just need to set the volatile flag on the MEM when you generate
it in your backend. For example see
config/pa/pa.c::pa_eh_return_handler_rtx.
Jeff
More information about the Gcc-patches
mailing list