artiq icon indicating copy to clipboard operation
artiq copied to clipboard

compiler: Include callee name in `rpc.*` llvm::Values

Open dnadlinger opened this issue 6 years ago • 2 comments

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.)

dnadlinger avatar Jun 30 '18 16:06 dnadlinger

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.

whitequark avatar Jul 11 '18 01:07 whitequark

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.)

dnadlinger avatar Jul 11 '18 12:07 dnadlinger