public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/50887] New: [avr] Support ACCUMULATE_OUTGOING_ARGS
@ 2011-10-27 17:58 gjl at gcc dot gnu.org
2011-10-27 18:02 ` [Bug target/50887] " gjl at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-10-27 17:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50887
Bug #: 50887
Summary: [avr] Support ACCUMULATE_OUTGOING_ARGS
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: gjl@gcc.gnu.org
CC: eric.weddington@atmel.com
Target: avr
Supporting accumulate outgoing arguments can reduce code size in functions that
call functions which get their arguments on the stack more than once
(statically).
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/50887] [avr] Support ACCUMULATE_OUTGOING_ARGS
2011-10-27 17:58 [Bug target/50887] New: [avr] Support ACCUMULATE_OUTGOING_ARGS gjl at gcc dot gnu.org
@ 2011-10-27 18:02 ` gjl at gcc dot gnu.org
2011-10-27 18:03 ` gjl at gcc dot gnu.org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-10-27 18:02 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50887
--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-10-27 18:01:17 UTC ---
Created attachment 25636
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25636
aoa.c
C source file that has several call to printf-ish function.
With the current implementation, after each call the code must get rid of the
pushed arguments which is expensive as SP cannot be modified directly.
Compile with, e.g.,
$ avr-gcc aoa.c -S -Os -mmcu=avr4
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/50887] [avr] Support ACCUMULATE_OUTGOING_ARGS
2011-10-27 17:58 [Bug target/50887] New: [avr] Support ACCUMULATE_OUTGOING_ARGS gjl at gcc dot gnu.org
2011-10-27 18:02 ` [Bug target/50887] " gjl at gcc dot gnu.org
@ 2011-10-27 18:03 ` gjl at gcc dot gnu.org
2011-10-29 14:37 ` gjl at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-10-27 18:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50887
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
Status|UNCONFIRMED |ASSIGNED
Last reconfirmed| |2011-10-27
AssignedTo|unassigned at gcc dot |gjl at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.7.0
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/50887] [avr] Support ACCUMULATE_OUTGOING_ARGS
2011-10-27 17:58 [Bug target/50887] New: [avr] Support ACCUMULATE_OUTGOING_ARGS gjl at gcc dot gnu.org
2011-10-27 18:02 ` [Bug target/50887] " gjl at gcc dot gnu.org
2011-10-27 18:03 ` gjl at gcc dot gnu.org
@ 2011-10-29 14:37 ` gjl at gcc dot gnu.org
2012-01-20 12:36 ` gjl at gcc dot gnu.org
2012-01-20 12:58 ` gjl at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-10-29 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50887
--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-10-29 14:36:05 UTC ---
Author: gjl
Date: Sat Oct 29 14:35:59 2011
New Revision: 180654
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=180654
Log:
PR target/50887
* config/avr/avr.opt (-maccumulate-args): New option.
* config/avr/avr.h (STARTING_FRAME_OFFSET): Redefine to
avr_starting_frame_offset.
(ACCUMULATE_OUTGOING_ARGS): Define to avr_accumulate_outgoing_args.
* config/avr/avr.md (UNSPECV_WRITE_SP_IRQ_ON): Remove.
(UNSPECV_WRITE_SP_IRQ_OFF): Remove.
(UNSPECV_WRITE_SP): New constant.
(*addhi3_sp_R): Rewrite to...
(*addhi3_sp): ...this new insn.
(movhi_sp_r_irq_off, movhi_sp_r_irq_on): Combine to...
(movhi_sp_r): ...this new insn.
* config/avr/avr-protos.h (avr_accumulate_outgoing_args): New.
(avr_starting_frame_offset): New.
* config/avr/avr.c (avr_accumulate_outgoing_args): New function.
(avr_starting_frame_offset): New function.
(avr_outgoing_args_size): New static function.
(avr_initial_elimination_offset): Use it.
(avr_simple_epilogue): Use it.
(avr_asm_function_end_prologue): Use it.
(expand_epilogue): Use it.
(expand_prologue): Use it. Break out code to...
(avr_prologue_setup_frame): ...this new static function.
(avr_can_eliminate): Allow eliminating to frame pointer if there
is one.
(avr_frame_pointer_required_p): Use frame pointer if target has a
nonlocal label.
* config/avr/constraints.md (R): Remove.
(Csp): New constraint.
* config/avr/predicates.md (avr_sp_immediate_operand): Use it.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/avr/avr-protos.h
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h
trunk/gcc/config/avr/avr.md
trunk/gcc/config/avr/avr.opt
trunk/gcc/config/avr/constraints.md
trunk/gcc/config/avr/predicates.md
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/50887] [avr] Support ACCUMULATE_OUTGOING_ARGS
2011-10-27 17:58 [Bug target/50887] New: [avr] Support ACCUMULATE_OUTGOING_ARGS gjl at gcc dot gnu.org
` (2 preceding siblings ...)
2011-10-29 14:37 ` gjl at gcc dot gnu.org
@ 2012-01-20 12:36 ` gjl at gcc dot gnu.org
2012-01-20 12:58 ` gjl at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-01-20 12:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50887
--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-01-20 12:31:59 UTC ---
Author: gjl
Date: Fri Jan 20 12:31:46 2012
New Revision: 183336
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=183336
Log:
PR target/49868
PR target/50887
* doc/extend.texi (Named Address Spaces): Split into subsections.
(AVR Named Address Spaces): New subsection.
(M32C Named Address Spaces): New subsection.
(RL78 Named Address Spaces): New subsection.
(SPU Named Address Spaces): New subsection.
(Variable Attributes): New anchor "AVR Variable Attributes".
(AVR Variable Attributes): Rewrite and avoid wording
"address space" in this context.
* doc/invoke.texi (AVR Options): Rewrite and add documentation
for -maccumulate-args, -mbranch-cost=, -mrelax, -mshort-calls.
(AVR Built-in Macros): New subsubsection therein.
* doc/md.texi (AVR constraints): Remove "C04", "R".
Modified:
trunk/gcc/ChangeLog
trunk/gcc/doc/extend.texi
trunk/gcc/doc/invoke.texi
trunk/gcc/doc/md.texi
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/50887] [avr] Support ACCUMULATE_OUTGOING_ARGS
2011-10-27 17:58 [Bug target/50887] New: [avr] Support ACCUMULATE_OUTGOING_ARGS gjl at gcc dot gnu.org
` (3 preceding siblings ...)
2012-01-20 12:36 ` gjl at gcc dot gnu.org
@ 2012-01-20 12:58 ` gjl at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: gjl at gcc dot gnu.org @ 2012-01-20 12:58 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50887
Georg-Johann Lay <gjl at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords|documentation |
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2012-01-20 12:33:45 UTC ---
Closed with its documentation
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2012-01-20 12:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-27 17:58 [Bug target/50887] New: [avr] Support ACCUMULATE_OUTGOING_ARGS gjl at gcc dot gnu.org
2011-10-27 18:02 ` [Bug target/50887] " gjl at gcc dot gnu.org
2011-10-27 18:03 ` gjl at gcc dot gnu.org
2011-10-29 14:37 ` gjl at gcc dot gnu.org
2012-01-20 12:36 ` gjl at gcc dot gnu.org
2012-01-20 12:58 ` gjl at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).