This is part of a larger thread --- Adding CPS call support to LLVM where there is a large discussion on the correct design of how to teach LLVM about CPS.

Gor Nishanov proided the above example of encoding CPS using the llvm coro instructions.