I am looking into building a Pin tool that uses the ZCA generated for Cilk Plus, and I have a question that is not answer by the document "Intrisics for Low Overhead Annotations."
In particular, I am wondering what is the parameter passed to the cilk_leave_begin annotation (the document says some stable stack pointer, but it doesn't say what). According to the document, cilk_enter_begin takes the pointer to cilkrts_stack_frame corresponding of the executing Cilk function, so I wondered if the cilk_leave_begin takes either the same cilkrts_stack_frame as cilk_enter_begin, or the cilkrts_stack_frame of its immediate Cilk ancestor frame. It turns out that, it's neither. (This is confirmed by writing a simple Pin tool that intercepts cilk_enter_begin and cilk_leave_begin and print out the parameters.) Out of curiousity, what exactly does cilk_leave_frame take for parameter?