This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Back-end-supported heap-based frame allocations?
- To: Knut Aksel Røysland <knutroy at ifi dot uio dot no>
- Subject: Re: Back-end-supported heap-based frame allocations?
- From: Richard Henderson <rth at redhat dot com>
- Date: Thu, 2 Aug 2001 17:22:57 -0700
- Cc: gcc at gcc dot gnu dot org
- References: <200108021245.21861.tyrfing.ifi.uio.no@ifi.uio.no>
On Thu, Aug 02, 2001 at 02:45:35PM +0200, Knut Aksel Røysland wrote:
> Personally, I lack the time and competence to undertake such a project
> at this time, but I would appreciate comments on how easily this could
> be integrated into the current back-end implementation, so that I have
> some sensible words to put into my thesis' concluding remarks.
Excruciatingly hard, I'd think.
This is something that would have to be tackled invidivually
for every target. Moreover, many targets have hardware support
for stack-based frames which cannot be turned off, so you'd have
to come up with a mechanism to perform the call using a stack
based frame, then swap the data into the heap based frame *after*
making a function call to allocate the heap frame.
Worse, you can't call from heap-based functions into stack based
functions unless you play interesting games with the frame pointers
at the call site, or have some a-priori knowledge of the maximum
stack depth of the functions you want to call.
r~