[Bug target/34888] Stack patterns for AVR not optimal
rth at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Aug 2 21:14:00 GMT 2011
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.
More information about the Gcc-bugs
mailing list