www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - LLVM and stack depth

reply Ola Fosheim Grostad <ola.fosheim.grostad gmail.com> writes:
LLVM provides something called patch points where one can obtain 
register information and inject machine code at runtime.

I wonder if there is some way to obtain the stack frame size?

I am interested in the possibilty of using patchpoints for 
suspension (async) and use a split stack. So if you have a static 
call tree you compute the stack size you need at all supension 
points. When you call functions that cannot suspend you use the 
system stack. When you call functions that can suspend you use 
the stack for the async task.

Is it possible?
May 22 2021
parent Ola Fosheim =?UTF-8?B?R3LDuHN0YWQ=?= <ola.fosheim.grostad gmail.com> writes:
On Saturday, 22 May 2021 at 09:48:10 UTC, Ola Fosheim Grostad 
wrote:
 Is it possible?
Of course, alloca or recursion would make this impossible, so those have to be eliminated by static analysis of the call-tree...
May 22 2021