https://github.com/david-xl commented: High level question. Have you considered emit inline sequences to the callbacks (or emit partial inline sequence with fastpath)? It will greatly reduce runtime overhead. https://github.com/llvm/llvm-project/pull/207385