This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Liberating structs from memory
- To: law at cygnus dot com
- Subject: Re: Liberating structs from memory
- From: Greg McGary <greg at mcgary dot org>
- Date: 18 Aug 2000 15:36:45 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <30878.966637384@upchuck>
Jeffrey A Law <law@cygnus.com> writes:
> I think this is most easily done at the tree level -- except that we do not
> have functions as trees for most of the front-ends yet, so it's hard to know
> if an auto has had its address taken until its too late.
I assume you refer to `x_whole_function_mode_p'. What, if anything,
prevents us from doing this in the C front end today? If doable, that
sounds like a useful enabling step. I plan to put BPs only in C and
C++ front ends. The next natural choice is ObjC, but I'll leave that
to someone who cares about it. I don't think BPs make sense for other
languages.
> Seems generally reasonable, though you've got to fight the problem of
> dumping stuff to memory *after* you've already creates its DECL_RTL. In
> a number of ways it's similar to the ADDRESSOF problem where we have these
> magic tidbits lying around for a while then after various optimizations we
> have to convert them to sensible RTL.
Wouldn't whole-function mode would conveniently solve this problem?
We could determine if the struct needs to be in memory before we
make its DECL_RTL, no?
Greg