OpenCilk / opencilk-project

Monorepo for the OpenCilk compiler. Forked from llvm/llvm-project and based on Tapir/LLVM.
Other
89 stars 29 forks source link

Passing parent stack frames to spawn-helper functions #252

Closed neboat closed 1 month ago

neboat commented 1 month ago

This PR drafts compiler changes to pass a pointer to the __cilkrts_stack_frame in a parent spawning function, along with other compile-time information, to a spawn helper. This change allows the spawn helper to access the parent stack frame more efficiently and enables a variety of optimizations to reduce spawn overhead.

This PR provides the necessary compiler changes for PR OpenCilk/cheetah#29.

VoxSciurorum commented 1 month ago

This looks good, except I want a better comment around the isa<Constant> check so it is clear what problem is being avoided.