public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ian Lance Taylor <iant@google.com>
To: Hariharan Sandanagobalane <hariharans@picochip.com>
Cc: gcc@gcc.gnu.org
Subject: Re: Stack parameter - pass by value - frame usage
Date: Thu, 13 Sep 2007 20:41:00 -0000	[thread overview]
Message-ID: <m37imu2t9c.fsf@localhost.localdomain> (raw)
In-Reply-To: <46E92357.5070502@picochip.com>

Hariharan Sandanagobalane <hariharans@picochip.com> writes:

> I looked at an inefficient code sequence for a simple program using
> GCC's picochip port (not yet submitted to mainline).

Are you working with mainline sources?

> Note that the parameter is being written to the frame in the last 2
> instructions above. This, i am guessing is the reason for the
> get_frame_size() returning 4 later on, though the actual save of the
> struct parameter value on the stack is being eliminated at later
> optimization phases (CSE and DCE, i believe).
> 
> Why does the compiler do this? I vaguely remember x86 storing all
> parameter values on stack. Is that the reason for this behaviour? Is
> there anything i can do in the port to get around this problem?

At a guess, it's because the frontend decided that the struct was
addressable and needed to be pushed on the stack.  I thought this got
cleaned up recently, though.

Ian

  reply	other threads:[~2007-09-13 20:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-13 11:47 Hariharan Sandanagobalane
2007-09-13 20:41 ` Ian Lance Taylor [this message]
2007-09-21 10:42   ` Hariharan Sandanagobalane

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=m37imu2t9c.fsf@localhost.localdomain \
    --to=iant@google.com \
    --cc=gcc@gcc.gnu.org \
    --cc=hariharans@picochip.com \
    /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).