https://github.com/jhuber6 commented: So, the kernel metadata has a lot of special codegen associated with it. It seems the approach here is to turn the kernels into thin wrappers that call an outlined function? https://github.com/llvm/llvm-project/pull/115821