On Tue, 2024-07-09 at 18:09 -0700, Alexei Starovoitov wrote: [...] > somewhere after spill/fill removal subprog->stack_depth > needs to be adjust to nocsr_stack_off, > otherwise extra stack space is wasted. > I couldn't find this logic in the patch. Such logic is not present. > Once the adjustment logic is done, pls add a selftest with > nocsr and may_goto, since may_goto processing is in the same > do_misc_fixups() loop and it needs to grow the stack while > spill/fill removal will shrink the stack. It might be necessary to move the spill/fill removal to a separate pass exactly because of this dependency. I'll think about the implementation, but it might be tricky.