public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "falk at debian dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug tree-optimization/26388] Variable sized storage allocation should be promoted to stack allocation
Date: Mon, 20 Feb 2006 23:06:00 -0000	[thread overview]
Message-ID: <20060220230638.8936.qmail@sourceware.org> (raw)
In-Reply-To: <bug-26388-10053@http.gcc.gnu.org/bugzilla/>



------- Comment #6 from falk at debian dot org  2006-02-20 23:06 -------
(In reply to comment #5)

> If this is really not feasible or will not work in any useful cases,
> maybe exposing the stack to the user would be a nice thing to have.
> Like
> 
>  foo()
>  {
>    int *p = __builtin_stack_top();
>    *(p--) = i;
>    ...
>  }
> 
> where __builtin_stack_top() would be beyond the known stack usage of
> foo(), erroring in case of function calls, of course (or even make
> the stack decrements builtins).

This would be a quite finicky interface. For example, on the Alpha
architecture,
the stack pointer needs to be 16-byte aligned at all times. Also, you must
not read at some position on the stack unless you've previously written within
4096 bytes (or something) of that position. I suppose other architectures
have similar peculiarities.


-- 


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


  parent reply	other threads:[~2006-02-20 23:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-20 22:20 [Bug tree-optimization/26388] New: " rguenth at gcc dot gnu dot org
2006-02-20 22:21 ` [Bug tree-optimization/26388] " pinskia at gcc dot gnu dot org
2006-02-20 22:27 ` rguenth at gcc dot gnu dot org
2006-02-20 22:34 ` rguenth at gcc dot gnu dot org
2006-02-20 22:36 ` falk at debian dot org
2006-02-20 22:52 ` rguenther at suse dot de
2006-02-20 23:06 ` falk at debian dot org [this message]
2006-02-21  2:22 ` pinskia at gcc dot gnu dot org
     [not found] <bug-26388-4@http.gcc.gnu.org/bugzilla/>
2011-07-27 10:57 ` rguenth at gcc dot gnu.org
2012-02-22 13:37 ` xiaoyuanbo at yeah dot net

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060220230638.8936.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).