[LLVMdev] Segmented Stacks: Pre-midterm work

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Tue Aug 16 14:18:56 PDT 2011


On 11-08-15 4:19 PM, Sanjoy Das wrote:
> Hi!
> 
> I've been working on coroutines for some time, and it seems you were
> right - it makes much more sense to have regular C (and assembly) code
> for handling coroutines. For instance, I'd otherwise would have to
> make an assumption about the threading model the platform has (or
> assume there are no threads at all, which prevents me from allowing
> goroutine like ("run parallel till you need to write to a channel")
> behavior).
> 
> Right now I'm sort-of dogfooding my work by trying to get Go running
> on dragonegg.

Nice idea. That should find the corner cases!

> I've discovered some small issues already (for instance
> I need to save R10 somewhere when compiling a function with a nest
> parameter). I'll send a revised set of patches within sometime this
> week, addressing all such issues I can find.

Thanks!

> That apart, about getting Go to work with dragonegg:
> 
> 1. Does it sound viable?
> 2. What things do I need to keep in mind?

I haven't been keeping track of gcc, but I would think so. Go was added
after most of the LTO work in gcc, so other than debug info it should
have a reasonable separation from the "middle end".

> Currently, I'm passing `-fplugin=./dragonegg.so' to gccgo and have
> edited dragonegg to enable segmented stacks when it detects the
> language is "GNU Go". This seems to do what I expect (saving the fact
> the binaries throw a mysterious SIGILL :) ).
> 
> Thanks!
> 

Thanks!

Rafael



More information about the llvm-dev mailing list