[llvm-dev] Metadata/DebugInfo in *.ll file

Norbert Dajka via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 15 05:11:23 PST 2019

Yes, this is for a front-end-ish project. I generate LLVM IR from assembly.
The result is optimized through several builtin passes, like simplify cfg,
value propagation, simple const propagation, etc. I tried setDebugLoc, but
it gets dropped. Aside from simplify CFG, I can't see where this happens,
and it is already dropped before simplify cfg. It looks like I would be
better off adding instruction metadata after generating IR, outside LLVM,
instead of forcing it to process things backwards.

Adrian Prantl <aprantl at apple.com> ezt írta (időpont: 2019. jan. 14., H,

> Generally, a good strategy is to look at what Clang generates for similar
> code and mimic that in your IR generator.
> -- adrian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190115/ed3d8013/attachment.html>

More information about the llvm-dev mailing list