public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/9624] Stack space allocation too gratuitious
       [not found] <20030208002600.9624.dath@ficker.net>
@ 2003-07-28  0:23 ` pinskia at physics dot uc dot edu
  2003-11-25  8:48 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-07-28  0:23 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9624


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|0000-00-00 00:00:00         |2003-07-28 00:23:36
               date|                            |


------- Additional Comments From pinskia at physics dot uc dot edu  2003-07-28 00:23 -------
On the tree-ssa branch, gcc gcc does not allocate space for buf at all but it does not fix 
the problem if you use buf, the space allocated is still too gratuitious.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug optimization/9624] Stack space allocation too gratuitious
       [not found] <20030208002600.9624.dath@ficker.net>
  2003-07-28  0:23 ` [Bug optimization/9624] Stack space allocation too gratuitious pinskia at physics dot uc dot edu
@ 2003-11-25  8:48 ` pinskia at gcc dot gnu dot org
  2004-01-09  2:44 ` pinskia at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-25  8:48 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2003-11-25 08:48 -------
This looks like an aligment issue.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|2003-07-28 00:23:36         |2003-11-25 08:48:12
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9624


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug optimization/9624] Stack space allocation too gratuitious
       [not found] <20030208002600.9624.dath@ficker.net>
  2003-07-28  0:23 ` [Bug optimization/9624] Stack space allocation too gratuitious pinskia at physics dot uc dot edu
  2003-11-25  8:48 ` pinskia at gcc dot gnu dot org
@ 2004-01-09  2:44 ` pinskia at gcc dot gnu dot org
  2004-09-08 11:29 ` [Bug rtl-optimization/9624] " bisqwit at iki dot fi
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-01-09  2:44 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-01-09 02:44 -------
*** Bug 13623 has been marked as a duplicate of this bug. ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |anupamk at speakeasy dot net


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9624


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/9624] Stack space allocation too gratuitious
       [not found] <20030208002600.9624.dath@ficker.net>
                   ` (2 preceding siblings ...)
  2004-01-09  2:44 ` pinskia at gcc dot gnu dot org
@ 2004-09-08 11:29 ` bisqwit at iki dot fi
  2004-09-08 11:31 ` bisqwit at iki dot fi
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: bisqwit at iki dot fi @ 2004-09-08 11:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bisqwit at iki dot fi  2004-09-08 11:29 -------
Alignment indeed rounds up the size, but consider this code:
  void xxx(void)
  {
      unsigned x[12451];
  }
No matter which optimization settings you run it at (even with
-fomit-frame-pointer), gcc will still emit code that allocates 49804+ bytes from
stack and immediately releases it. On x86, for example, it does this:
  _Z3xxxv:
      subl $49820, %esp
      addl $49820, %esp
      ret

Same thing also happens for unused local structs and classes.
The stack space isn't freed.

This does not happen with simple variables (ints and such), probably because the
compiler treats them as register variables by default and only allocates stack
space when it has no other choice.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9624


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/9624] Stack space allocation too gratuitious
       [not found] <20030208002600.9624.dath@ficker.net>
                   ` (3 preceding siblings ...)
  2004-09-08 11:29 ` [Bug rtl-optimization/9624] " bisqwit at iki dot fi
@ 2004-09-08 11:31 ` bisqwit at iki dot fi
  2004-09-08 18:27 ` pinskia at gcc dot gnu dot org
  2004-09-13 10:08 ` rth at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: bisqwit at iki dot fi @ 2004-09-08 11:31 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From bisqwit at iki dot fi  2004-09-08 11:31 -------
Err, meant "needlessly allocated" in comment #6, not "not freed".


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9624


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/9624] Stack space allocation too gratuitious
       [not found] <20030208002600.9624.dath@ficker.net>
                   ` (4 preceding siblings ...)
  2004-09-08 11:31 ` bisqwit at iki dot fi
@ 2004-09-08 18:27 ` pinskia at gcc dot gnu dot org
  2004-09-13 10:08 ` rth at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-08 18:27 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-09-08 18:27 -------
I should note that on the mainline now, we don't allocate the stack space for unused arrays.

-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9624


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug rtl-optimization/9624] Stack space allocation too gratuitious
       [not found] <20030208002600.9624.dath@ficker.net>
                   ` (5 preceding siblings ...)
  2004-09-08 18:27 ` pinskia at gcc dot gnu dot org
@ 2004-09-13 10:08 ` rth at gcc dot gnu dot org
  6 siblings, 0 replies; 7+ messages in thread
From: rth at gcc dot gnu dot org @ 2004-09-13 10:08 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From rth at gcc dot gnu dot org  2004-09-13 10:08 -------
Indeed, fixed for 4.0.  Will not be fixed in previous versions.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.0.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9624


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2004-09-13 10:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20030208002600.9624.dath@ficker.net>
2003-07-28  0:23 ` [Bug optimization/9624] Stack space allocation too gratuitious pinskia at physics dot uc dot edu
2003-11-25  8:48 ` pinskia at gcc dot gnu dot org
2004-01-09  2:44 ` pinskia at gcc dot gnu dot org
2004-09-08 11:29 ` [Bug rtl-optimization/9624] " bisqwit at iki dot fi
2004-09-08 11:31 ` bisqwit at iki dot fi
2004-09-08 18:27 ` pinskia at gcc dot gnu dot org
2004-09-13 10:08 ` rth 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).