Displaying 7 results from an estimated 7 matches for "setup_block".
2011 Apr 03
1
[LLVMdev] GSoC '11: Segmented Stacks
...on uses a constant amount
of stack space, that value (known at compile-time) will be used.
Otherwise some worst-case upper limit (8 KiB, say) is chosen as the
"size" of the stack-frame.
If the current block does not have enough space, control branches to a
stub of code (a naked function, setup_block) which
1. Allocates a new block if required (may not always be needed, since
we're keeping never de-allocating old blocks).
2. Copies everything addressed SP relative to the new block. Adjusts
the stack pointer.
3. Saves the real return address in the block header. Modifies the
return addre...
2011 Apr 11
2
[LLVMdev] RFC: GSoC Project
...ine) which will work like
setup_new_block, except:
1. It will first check if saved_stack is NULL. If it is NULL, it will
allocate a new block and save it to saved_stack. It if isn't, it'll
simply restore saved_sp, saved_ip.
2. In case a new block was allocated, it will pretty much do what
setup_block does, after which it will adjust the SP to make space for
the saved registers.
The destroy_block procedure will also have to be a little different
(mentioned below).
There are four things (relevant to this discussion) a co-routine can do:
Yield
This returns control to the calling function, with...
2011 Apr 11
0
[LLVMdev] RFC: GSoC Project
...ew_block, except:
>
> 1. It will first check if saved_stack is NULL. If it is NULL, it will
> allocate a new block and save it to saved_stack. It if isn't, it'll
> simply restore saved_sp, saved_ip.
>
> 2. In case a new block was allocated, it will pretty much do what
> setup_block does, after which it will adjust the SP to make space for
> the saved registers.
>
> The destroy_block procedure will also have to be a little different
> (mentioned below).
>
> There are four things (relevant to this discussion) a co-routine can do:
>
> Yield
>
> This...
2011 Apr 11
2
[LLVMdev] RFC: GSoC Project
...gt;> 1. It will first check if saved_stack is NULL. If it is NULL, it will
>> allocate a new block and save it to saved_stack. It if isn't, it'll
>> simply restore saved_sp, saved_ip.
>>
>> 2. In case a new block was allocated, it will pretty much do what
>> setup_block does, after which it will adjust the SP to make space for
>> the saved registers.
>>
>> The destroy_block procedure will also have to be a little different
>> (mentioned below).
>>
>> There are four things (relevant to this discussion) a co-routine can do:
>&g...
2011 Apr 11
0
[LLVMdev] RFC: GSoC Project
...irst check if saved_stack is NULL. If it is NULL, it will
>>> allocate a new block and save it to saved_stack. It if isn't, it'll
>>> simply restore saved_sp, saved_ip.
>>>
>>> 2. In case a new block was allocated, it will pretty much do what
>>> setup_block does, after which it will adjust the SP to make space for
>>> the saved registers.
>>>
>>> The destroy_block procedure will also have to be a little different
>>> (mentioned below).
>>>
>>> There are four things (relevant to this discussion) a c...
2011 Apr 11
0
[LLVMdev] RFC: GSoC Project
On Sun, Apr 10, 2011 at 4:16 PM, Chris Lattner <clattner at apple.com> wrote:
>
> On Apr 10, 2011, at 2:45 PM, Talin wrote:
>
> I wonder - would something like this allow for multiple stacks for a single
> thread? I'm thinking of something like continuations / fibers / green
> threads, which would be very handy.
>
>
> I haven't looked at the proposal, but
2011 Apr 10
2
[LLVMdev] RFC: GSoC Project
On Apr 10, 2011, at 2:45 PM, Talin wrote:
> I wonder - would something like this allow for multiple stacks for a single thread? I'm thinking of something like continuations / fibers / green threads, which would be very handy.
I haven't looked at the proposal, but yes, this would be very useful functionality for LLVM to provide.
-Chris
>
> On Wed, Mar 23, 2011 at 3:07 AM,