This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/34888] Stack patterns for AVR not optimal
- From: "rth at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 2 Aug 2011 21:14:12 +0000
- Subject: [Bug target/34888] Stack patterns for AVR not optimal
- Auto-submitted: auto-generated
- References: <bug-34888-4@http.gcc.gnu.org/bugzilla/>
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.