[LLVMdev] [PATCH] Segmented Stacks
viridia at gmail.com
Thu Jul 14 18:28:51 PDT 2011
On Thu, Jul 14, 2011 at 4:20 PM, Talin <viridia at gmail.com> wrote:
> On Thu, Jul 14, 2011 at 9:07 AM, Sanjoy Das <
> sanjoy at playingwithpointers.com> wrote:
>> Hi llvm-dev!
>> I have attached the current state of my GSoC work in patches  for
>> review; this currently allows LLVM to correctly handle functions running
>> out of stack space and variable sized stack objects.
>> Firstly, since I think it is better to get things merged in small
>> chunks, I'd like to have some specific feedback on where my work stands
>> in terms of mergeability.
>> Secondly, I had been working on supporting variable arguments before I
>> started to clean up my work and roll a patch series. The varargs work is
>> not completed yet; and I recall having a discussion on this list some
>> time back  about adding support for co-routines. Does postponing the
>> vararg work and seeing if co-routines can be implemented sound more
>> useful (since we should be able to cheaply create and destroy stacks
>> now). I understand that segmented stacks will primarily be used by
>> managed languages; does support for varargs seem important enough in
>> such cases?
>> I think I was the one who was interested in support for coroutines. My
> language doesn't currently use variable arguments, but there might be others
> who would find it useful.
>>  I'm working on implementing segmented stacks as a part of GSoC '11.
>>  The previous discussion has concluded with a suggestion of adding
>> three intrinsics to LLVM: llvm.stacknew, llvm.stackswitch and
>> llvm.stackdestroy; which should be enough to allow the frontend
>> developer to implement his or her own co-routining semantics.
>> Actually, now that I think of it there's something I need that is of
higher priority (for me anyway) than either of the things you mention: Will
I still be able to iterate through stack frames for purposes of garbage
collection? In other words, if I use the segmented stack feature, will I
need to modify my code that traces roots on the stack?
Here's what the current code looks like:
>> Sanjoy Das
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> -- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev