artiq
artiq copied to clipboard
compiler: Include callee name in `rpc.*` llvm::Values
When debugging compiler issues in complex code, RPC receive loops can sometimes be a bit annoying to tell apart in IR dumps. Including the line number of the call or the (unqualified) name of the callee in label/value names would help readability.
(This is obviously not user-facing, and strictly a quality-of-life enhancement.)
There should be debug information in IR and LLVM should extract line numbers from that. If it doesn't I think there's some option that does it, we might need to expose it in llvmlite though.
There are probably line numbers; my eyes might have just skipped past the !metadata.
I just thought it would be cute (and helpful) if the blocks were named rpc.print.next
or something instead of just rpc.next
.
(This issue was more of a reminder to myself to have a quick look how involved it would be to funnel the function name to that point in llvm_ir_generator, and either quickly implement it or ditch the idea.)