* [Bug middle-end/51982] Shrink-wrapping opportunity
2012-01-24 19:08 [Bug middle-end/51982] New: Shrink-wrapping opportunity dje at gcc dot gnu.org
@ 2012-01-24 19:42 ` pinskia at gcc dot gnu.org
2012-01-24 19:42 ` dje at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-01-24 19:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51982
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Depends on| |10474
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-01-24 19:02:33 UTC ---
This is most likely the same reference problem as in PR 10474 comment #10.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/51982] Shrink-wrapping opportunity
2012-01-24 19:08 [Bug middle-end/51982] New: Shrink-wrapping opportunity dje at gcc dot gnu.org
2012-01-24 19:42 ` [Bug middle-end/51982] " pinskia at gcc dot gnu.org
@ 2012-01-24 19:42 ` dje at gcc dot gnu.org
2012-02-06 7:07 ` amodra at gmail dot com
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dje at gcc dot gnu.org @ 2012-01-24 19:42 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51982
David Edelsohn <dje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |missed-optimization
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-01-24
CC| |amodra at gcc dot gnu.org
Ever Confirmed|0 |1
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/51982] Shrink-wrapping opportunity
2012-01-24 19:08 [Bug middle-end/51982] New: Shrink-wrapping opportunity dje at gcc dot gnu.org
2012-01-24 19:42 ` [Bug middle-end/51982] " pinskia at gcc dot gnu.org
2012-01-24 19:42 ` dje at gcc dot gnu.org
@ 2012-02-06 7:07 ` amodra at gmail dot com
2013-04-21 23:26 ` dje at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: amodra at gmail dot com @ 2012-02-06 7:07 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51982
Alan Modra <amodra at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC|amodra at gcc dot gnu.org |amodra at gmail dot com
--- Comment #2 from Alan Modra <amodra at gmail dot com> 2012-02-06 07:07:41 UTC ---
I confirm comment #2. We do have incoming args being saved in callee-saved
regs and those callee-saved regs then being used.
However, there are additional problems to solve before this function will ever
be shrink-wrapped. We have uses of callee-saved regs for more than just
incoming args. For instance, "mask" gets put in r24 and "ep0" in r25 in the
first bb, and a little later, "i" in r29 and others are used for other
intermediate values.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/51982] Shrink-wrapping opportunity
2012-01-24 19:08 [Bug middle-end/51982] New: Shrink-wrapping opportunity dje at gcc dot gnu.org
` (2 preceding siblings ...)
2012-02-06 7:07 ` amodra at gmail dot com
@ 2013-04-21 23:26 ` dje at gcc dot gnu.org
2013-11-25 13:10 ` jamborm at gcc dot gnu.org
2021-12-25 11:32 ` [Bug rtl-optimization/51982] " pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: dje at gcc dot gnu.org @ 2013-04-21 23:26 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51982
--- Comment #3 from David Edelsohn <dje at gcc dot gnu.org> 2013-04-21 23:26:03 UTC ---
Created attachment 29912
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29912
self-contained example
The function lookup_unicode should be shrink-wrapped to not create a stack
frame if unicode_eq is not called, which is the common case
if (!PyUnicode_CheckExact(key)) {
return lookdict(mp, key, hash, value_addr);
}
i = (size_t)hash & mask;
ep = &ep0[i];
if (ep->me_key == NULL || ep->me_key == key) {
*value_addr = &ep->me_value;
return ep;
}
/* ----- Postpone frame creation until this point. ------ */
if (ep->me_key == dummy)
freeslot = ep;
else {
if (ep->me_hash == hash && unicode_eq(ep->me_key, key)) {
*value_addr = &ep->me_value;
return ep;
}
freeslot = NULL;
}
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug middle-end/51982] Shrink-wrapping opportunity
2012-01-24 19:08 [Bug middle-end/51982] New: Shrink-wrapping opportunity dje at gcc dot gnu.org
` (3 preceding siblings ...)
2013-04-21 23:26 ` dje at gcc dot gnu.org
@ 2013-11-25 13:10 ` jamborm at gcc dot gnu.org
2021-12-25 11:32 ` [Bug rtl-optimization/51982] " pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: jamborm at gcc dot gnu.org @ 2013-11-25 13:10 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51982
Bug 51982 depends on bug 10474, which changed state.
Bug 10474 Summary: shrink wrapping for functions
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10474
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug rtl-optimization/51982] Shrink-wrapping opportunity
2012-01-24 19:08 [Bug middle-end/51982] New: Shrink-wrapping opportunity dje at gcc dot gnu.org
` (4 preceding siblings ...)
2013-11-25 13:10 ` jamborm at gcc dot gnu.org
@ 2021-12-25 11:32 ` pinskia at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-25 11:32 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51982
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Last reconfirmed|2012-01-24 00:00:00 |2021-12-25
Component|middle-end |rtl-optimization
--- Comment #6 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note in the self-contained example, you need to remove the static from
lookdict_unicode function.
But I still see there is no shrink-wrapping happening on aarch64, even though
it could with some minor register allocation changes.
^ permalink raw reply [flat|nested] 7+ messages in thread