This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Inefficient register passing structs containing QI values
- From: Chris Lattner <sabre at nondot dot org>
- To: <gcc at gnu dot org>
- Date: Mon, 22 Apr 2002 14:09:11 -0500 (CDT)
- Subject: RE: Inefficient register passing structs containing QI values
> 1) Why is it storing the data to the stack anyway? It never uses those
> data locations again in the function, so why does it need to write
> them to memory?
The problem is that the called function might take the address of a
parameter, and pass it to another function. I believe that in this case,
the actual stack address is used instead of storing the object to a
new memory location. Since the calling function doesn't know what the
behavior of the called function is (in general) it generates general
purpose code...
-Chris
http://www.nondot.org/~sabre/os/
http://www.nondot.org/~sabre/Projects/