public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/26387] New: Should promote heap allocation to stack allocation
@ 2006-02-20 22:16 rguenth at gcc dot gnu dot org
2006-02-20 22:17 ` [Bug tree-optimization/26387] " pinskia at gcc dot gnu dot org
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2006-02-20 22:16 UTC (permalink / raw)
To: gcc-bugs
void foo(void)
{
int *p = new int;
delete *p;
}
storage allocation should be changed from heap to stack allocation if
possible and of known (low) size. This way allocation can be optimized
away completely in some cases. Such opportunities are often exposed
by inlining of libstdc++ container operations.
--
Summary: Should promote heap allocation to stack allocation
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: enhancement
Priority: P3
Component: tree-optimization
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: rguenth at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26387
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/26387] Should promote heap allocation to stack allocation
2006-02-20 22:16 [Bug tree-optimization/26387] New: Should promote heap allocation to stack allocation rguenth at gcc dot gnu dot org
@ 2006-02-20 22:17 ` pinskia at gcc dot gnu dot org
2006-02-20 22:18 ` pinskia at gcc dot gnu dot org
2006-02-21 2:20 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-20 22:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-02-20 22:17 -------
Actually this is just dead code, see PR 19831.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26387
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/26387] Should promote heap allocation to stack allocation
2006-02-20 22:16 [Bug tree-optimization/26387] New: Should promote heap allocation to stack allocation rguenth at gcc dot gnu dot org
2006-02-20 22:17 ` [Bug tree-optimization/26387] " pinskia at gcc dot gnu dot org
@ 2006-02-20 22:18 ` pinskia at gcc dot gnu dot org
2006-02-21 2:20 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-20 22:18 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-02-20 22:18 -------
I should note that even right now operator new is not marked with the malloc
attribute which is PR 23383.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26387
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/26387] Should promote heap allocation to stack allocation
2006-02-20 22:16 [Bug tree-optimization/26387] New: Should promote heap allocation to stack allocation rguenth at gcc dot gnu dot org
2006-02-20 22:17 ` [Bug tree-optimization/26387] " pinskia at gcc dot gnu dot org
2006-02-20 22:18 ` pinskia at gcc dot gnu dot org
@ 2006-02-21 2:20 ` pinskia at gcc dot gnu dot org
2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-02-21 2:20 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-02-21 02:20 -------
Confirmed but only for small sizes.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Priority|P3 |P5
Last reconfirmed|0000-00-00 00:00:00 |2006-02-21 02:20:19
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26387
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2006-02-21 2:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-20 22:16 [Bug tree-optimization/26387] New: Should promote heap allocation to stack allocation rguenth at gcc dot gnu dot org
2006-02-20 22:17 ` [Bug tree-optimization/26387] " pinskia at gcc dot gnu dot org
2006-02-20 22:18 ` pinskia at gcc dot gnu dot org
2006-02-21 2:20 ` pinskia at gcc dot gnu dot 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).