public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/54546] New: SH: Enable -fshrink-wrap
@ 2012-09-11 8:45 chrbr at gcc dot gnu.org
2012-09-11 8:46 ` [Bug target/54546] " chrbr at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-09-11 8:45 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54546
Bug #: 54546
Summary: SH: Enable -fshrink-wrap
Classification: Unclassified
Product: gcc
Version: 4.7.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: target
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: chrbr@gcc.gnu.org
Created attachment 28169
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28169
simple-return pattern
Implement the simple_return pattern to enable shrink-wrapping, which is
beneficial on SH when the prologue/epilogue is small enough or when not
optimizing for size. Adding the sh_can_use_return_insn_p function so
refinements based on epilogue size can be further added.
However this exposes a -freorder-blocks-and-partition -fprofile-use regression
in the testsuite with that must be investigated.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/54546] SH: Enable -fshrink-wrap
2012-09-11 8:45 [Bug target/54546] New: SH: Enable -fshrink-wrap chrbr at gcc dot gnu.org
@ 2012-09-11 8:46 ` chrbr at gcc dot gnu.org
2012-09-13 6:41 ` chrbr at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-09-11 8:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54546
chrbr at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/54546] SH: Enable -fshrink-wrap
2012-09-11 8:45 [Bug target/54546] New: SH: Enable -fshrink-wrap chrbr at gcc dot gnu.org
2012-09-11 8:46 ` [Bug target/54546] " chrbr at gcc dot gnu.org
@ 2012-09-13 6:41 ` chrbr at gcc dot gnu.org
2012-09-14 13:22 ` chrbr at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-09-13 6:41 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54546
--- Comment #1 from chrbr at gcc dot gnu.org 2012-09-13 06:40:54 UTC ---
shrink-wrapping exposes a few problems related to partitioning.
1) Tries to duplicate a Basic block that has only one predecessor coming from a
different partition. Since the edge is not marking with with EDGE_CROSSING
missing across section boundary. Note that even with EDGE_CROSSING information,
the generated code would be quite bad, with extra jumps coming from the
critical path.
The problem is explained with the start of a resolution here
http://gcc.gnu.org/ml/gcc-patches/2012-09/msg00794.html
2) Seem to miss redirecting CROSS_JUMPING jumps. When we have
jump_insn 205 204 179 4 (set (pc)
(reg:SI 1 r1 [237])) 316 {indirect_jump_compact}
(expr_list:REG_CROSSING_JUMP (nil)
(nil))
we have a JUMP_LABEL (insn) containing the setting or r1 with the label_rtx,
but 'patch_jump_insn' fails to see it, although it looks like the branch could
be redirected.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/54546] SH: Enable -fshrink-wrap
2012-09-11 8:45 [Bug target/54546] New: SH: Enable -fshrink-wrap chrbr at gcc dot gnu.org
2012-09-11 8:46 ` [Bug target/54546] " chrbr at gcc dot gnu.org
2012-09-13 6:41 ` chrbr at gcc dot gnu.org
@ 2012-09-14 13:22 ` chrbr at gcc dot gnu.org
2012-11-01 0:03 ` olegendo at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-09-14 13:22 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54546
--- Comment #2 from chrbr at gcc dot gnu.org 2012-09-14 13:22:34 UTC ---
Author: chrbr
Date: Fri Sep 14 13:22:29 2012
New Revision: 191301
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=191301
Log:
PR target/54546
* config/sh/sh-protos.h (sh_need_epilogue): Delete.
(sh_can_use_simple_return_p): Declare.
* config/sh/sh.c (sh_can_use_simple_return_p): Define.
(sh_need_epilogue, sh_need_epilogue_known): Delete.
(sh_output_function_epilogue): Remove sh_need_epilogue_known.
* config/sh/sh.md (simple_return, return): Define.
(epilogue): Use inline return rtl.
(sh_expand_epilogue): Cleanup parameters boolean type.
* config/sh/iterators.md (any_return): New iterator.
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config/sh/iterators.md
trunk/gcc/config/sh/sh-protos.h
trunk/gcc/config/sh/sh.c
trunk/gcc/config/sh/sh.md
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/54546] SH: Enable -fshrink-wrap
2012-09-11 8:45 [Bug target/54546] New: SH: Enable -fshrink-wrap chrbr at gcc dot gnu.org
` (2 preceding siblings ...)
2012-09-14 13:22 ` chrbr at gcc dot gnu.org
@ 2012-11-01 0:03 ` olegendo at gcc dot gnu.org
2012-11-07 13:24 ` chrbr at gcc dot gnu.org
2012-11-09 14:40 ` chrbr at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: olegendo at gcc dot gnu.org @ 2012-11-01 0:03 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54546
--- Comment #3 from Oleg Endo <olegendo at gcc dot gnu.org> 2012-11-01 00:03:11 UTC ---
Even though simple_return is not supported on SHmedia, is it OK to close this
PR?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/54546] SH: Enable -fshrink-wrap
2012-09-11 8:45 [Bug target/54546] New: SH: Enable -fshrink-wrap chrbr at gcc dot gnu.org
` (3 preceding siblings ...)
2012-11-01 0:03 ` olegendo at gcc dot gnu.org
@ 2012-11-07 13:24 ` chrbr at gcc dot gnu.org
2012-11-09 14:40 ` chrbr at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-11-07 13:24 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54546
--- Comment #4 from chrbr at gcc dot gnu.org 2012-11-07 13:23:53 UTC ---
There is still the reorder-branch-and-partition issue pending...
(In reply to comment #3)
> Even though simple_return is not supported on SHmedia, is it OK to close this
> PR?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug target/54546] SH: Enable -fshrink-wrap
2012-09-11 8:45 [Bug target/54546] New: SH: Enable -fshrink-wrap chrbr at gcc dot gnu.org
` (4 preceding siblings ...)
2012-11-07 13:24 ` chrbr at gcc dot gnu.org
@ 2012-11-09 14:40 ` chrbr at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: chrbr at gcc dot gnu.org @ 2012-11-09 14:40 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54546
chrbr at gcc dot gnu.org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Version|4.7.0 |4.8.0
Resolution| |FIXED
--- Comment #5 from chrbr at gcc dot gnu.org 2012-11-09 14:40:15 UTC ---
Remaining partitioning issue fixed with
http://gcc.gnu.org/ml/gcc-patches/2012-11/msg00630.html. Fixed in 4.8
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2012-11-09 14:40 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-11 8:45 [Bug target/54546] New: SH: Enable -fshrink-wrap chrbr at gcc dot gnu.org
2012-09-11 8:46 ` [Bug target/54546] " chrbr at gcc dot gnu.org
2012-09-13 6:41 ` chrbr at gcc dot gnu.org
2012-09-14 13:22 ` chrbr at gcc dot gnu.org
2012-11-01 0:03 ` olegendo at gcc dot gnu.org
2012-11-07 13:24 ` chrbr at gcc dot gnu.org
2012-11-09 14:40 ` chrbr 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).