http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34888
--- Comment #4 from Richard Henderson <rth at gcc dot gnu.org> 2011-08-02 21:10:51 UTC --- Created attachment 24897 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=24897 Optimize pop-all The proposed patch for PR49864 introduces REG_ARGS_SIZE. This records a (normally) non-negative number of bytes that have been pushed for arguments. Post-reload, if we see a (mov sp reg) insn that says that it's resetting the stack height, under a (common) set of conditions we can transform that to (mov sp fp) and let the previous (mov reg sp) (add reg N) insns be deleted as dead code. This reduces that common case to 4 insns instead of 9.