public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/58622] New: With -fomit-frame-pointer, A64 does not generate post-decrement stores
@ 2013-10-04 18:24 b.grayson at samsung dot com
2014-01-28 15:23 ` [Bug target/58622] " rearnsha at gcc dot gnu.org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: b.grayson at samsung dot com @ 2013-10-04 18:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58622
Bug ID: 58622
Summary: With -fomit-frame-pointer, A64 does not generate
post-decrement stores
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
Assignee: unassigned at gcc dot gnu.org
Reporter: b.grayson at samsung dot com
Target: AArch64
Build: 4.9.0 20130602
In A64, if one compiles a simple program under -O3, one gets code like this:
int bar(int i);
int foo() { return bar(5)+4; }
A64 -O3 assembly:
foo:
stp x29, x30, [sp, -16]!
add x29, sp, 0
mov w0, 5
bl bar
add w0, w0, 4
ldp x29, x30, [sp], 16
ret
Note the use of update-form loads and stores for the SP.
But if one uses -O3 -fomit-frame-pointer, the following is obtained:
foo:
sub sp, sp, #16
mov w0, 5
str x30, [sp]
bl bar
add w0, w0, 4
ldr x30, [sp]
add sp, sp, 16
ret
The sub and str could be merged into str x30, [sp, #-16]!, and the ldr/add
could be merged into ldr x30, [sp], #16 (if I have my assembly correct), as
they were in the with-frame-pointer case. On some ARM implementations, the
updates are "for free", so one would get better performance with the merged
load/store instructions, not to mention better instruction-cache density.
Note that under A32, identical code (using update/post-decrement stores) is
generated regardless of omit-frame-pointer settings.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58622] With -fomit-frame-pointer, A64 does not generate post-decrement stores
2013-10-04 18:24 [Bug target/58622] New: With -fomit-frame-pointer, A64 does not generate post-decrement stores b.grayson at samsung dot com
@ 2014-01-28 15:23 ` rearnsha at gcc dot gnu.org
2014-03-13 3:24 ` kuganv at linaro dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: rearnsha at gcc dot gnu.org @ 2014-01-28 15:23 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58622
Richard Earnshaw <rearnsha at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2014-01-28
Ever confirmed|0 |1
--- Comment #1 from Richard Earnshaw <rearnsha at gcc dot gnu.org> ---
Confirmed. Prologue and epilogue code is constructed in the backend late on.
Any optimizations have to be done during the code generation. The particular
path with -fomit-frame-pointer is not on by default and clearly hasn't been
tuned yet.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58622] With -fomit-frame-pointer, A64 does not generate post-decrement stores
2013-10-04 18:24 [Bug target/58622] New: With -fomit-frame-pointer, A64 does not generate post-decrement stores b.grayson at samsung dot com
2014-01-28 15:23 ` [Bug target/58622] " rearnsha at gcc dot gnu.org
@ 2014-03-13 3:24 ` kuganv at linaro dot org
2014-03-20 19:18 ` ramana at gcc dot gnu.org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: kuganv at linaro dot org @ 2014-03-13 3:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58622
Kugan <kuganv at linaro dot org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |kuganv at linaro dot org
--- Comment #2 from Kugan <kuganv at linaro dot org> ---
Created attachment 32342
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32342&action=edit
Proposed RFC patch
Proposed RFC patch - In the process rgression testing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58622] With -fomit-frame-pointer, A64 does not generate post-decrement stores
2013-10-04 18:24 [Bug target/58622] New: With -fomit-frame-pointer, A64 does not generate post-decrement stores b.grayson at samsung dot com
2014-01-28 15:23 ` [Bug target/58622] " rearnsha at gcc dot gnu.org
2014-03-13 3:24 ` kuganv at linaro dot org
@ 2014-03-20 19:18 ` ramana at gcc dot gnu.org
2014-07-24 14:54 ` mshawcroft at gcc dot gnu.org
2014-07-24 14:54 ` mshawcroft at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: ramana at gcc dot gnu.org @ 2014-03-20 19:18 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58622
Ramana Radhakrishnan <ramana at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |ramana at gcc dot gnu.org
Assignee|unassigned at gcc dot gnu.org |mshawcroft at gcc dot gnu.org
--- Comment #3 from Ramana Radhakrishnan <ramana at gcc dot gnu.org> ---
(In reply to Kugan from comment #2)
> Created attachment 32342 [details]
> Proposed RFC patch
>
> Proposed RFC patch - In the process rgression testing.
Kugan,
This also needs to handle ILP32 and probably needs a bit more TLC than just
this. We have something ongoing that can help address this, so assigning to
Marcus as he's been looking into some of this.
However this is stage1 material and cannot make it in for 4.9.
Ramana
(In reply to Kugan from comment #2)
> Created attachment 32342 [details]
> Proposed RFC patch
>
> Proposed RFC patch - In the process rgression testing.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58622] With -fomit-frame-pointer, A64 does not generate post-decrement stores
2013-10-04 18:24 [Bug target/58622] New: With -fomit-frame-pointer, A64 does not generate post-decrement stores b.grayson at samsung dot com
` (2 preceding siblings ...)
2014-03-20 19:18 ` ramana at gcc dot gnu.org
@ 2014-07-24 14:54 ` mshawcroft at gcc dot gnu.org
2014-07-24 14:54 ` mshawcroft at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: mshawcroft at gcc dot gnu.org @ 2014-07-24 14:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58622
mshawcroft at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |4.10.0
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug target/58622] With -fomit-frame-pointer, A64 does not generate post-decrement stores
2013-10-04 18:24 [Bug target/58622] New: With -fomit-frame-pointer, A64 does not generate post-decrement stores b.grayson at samsung dot com
` (3 preceding siblings ...)
2014-07-24 14:54 ` mshawcroft at gcc dot gnu.org
@ 2014-07-24 14:54 ` mshawcroft at gcc dot gnu.org
4 siblings, 0 replies; 6+ messages in thread
From: mshawcroft at gcc dot gnu.org @ 2014-07-24 14:54 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58622
mshawcroft at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution|--- |FIXED
--- Comment #4 from mshawcroft at gcc dot gnu.org ---
Issue resolved with Jiong's prologue / epilogue patch series committed to
trunk:
The relevant optimization commits are r212976, r212999, r213000.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-07-24 14:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-04 18:24 [Bug target/58622] New: With -fomit-frame-pointer, A64 does not generate post-decrement stores b.grayson at samsung dot com
2014-01-28 15:23 ` [Bug target/58622] " rearnsha at gcc dot gnu.org
2014-03-13 3:24 ` kuganv at linaro dot org
2014-03-20 19:18 ` ramana at gcc dot gnu.org
2014-07-24 14:54 ` mshawcroft at gcc dot gnu.org
2014-07-24 14:54 ` mshawcroft 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).