This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PREFERRED_STACK_BOUNDARY/function calling code fix
- To: hubicka at atrey dot karlin dot mff dot cuni dot cz
- Subject: Re: PREFERRED_STACK_BOUNDARY/function calling code fix
- From: Mark Mitchell <mark at codesourcery dot com>
- Date: Wed, 08 Mar 2000 08:57:58 -0800
- Cc: gcc-patches at gcc dot gnu dot org
- Organization: CodeSourcery, LLC
- References: <20000303125028.A17799@atrey.karlin.mff.cuni.cz><20000303091155I.mitchell@codesourcery.com><20000306214645.B28672@atrey.karlin.mff.cuni.cz>
Jan --
Re: http://gcc.gnu.org/ml/gcc-patches/2000-02/msg00427.html
Generally, the patch is OK, but there are a few issues.
o + perm = (struct perm_function *) xcalloc ...
This will never be freed, even if the function is garbage collected.
I now that doesn't happen now, but maybe it will at some point.
You can fix this by using ggc_alloc_obj to allocate the memory,
and then making sure that the memory is marked as needed when
the function is.
o I don't like the name `perm_function' for the structure, or the
name DECL_FUNCTION for the macro. How
about naming the structure `post_compilation_data' and macro
field DECL_PCD, not DECL_FUNCTION.
o I'm nervous about the places where you changed how we copy
DECL_SAVED_INSNS and/or DECL_FRAME_SIZE. Those members are
part of a union; we have to make sure we copy the biggest member.
That's hard to do, and hard to maintain, so really that code
ought just to copy the entire union. That's safer -- in case
someone adds something bigger in there at some point.
Please repost the patch with those changes for one more round of
approval. RTH may have additional comments as well.
--
Mark Mitchell mark@codesourcery.com
CodeSourcery, LLC http://www.codesourcery.com