[llvm-dev] Metadata/DebugInfo in *.ll file
Roman Lebedev via llvm-dev
llvm-dev at lists.llvm.org
Tue Jan 15 05:19:44 PST 2019
On Tue, Jan 15, 2019 at 4:11 PM Norbert Dajka via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> 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.
Pretty sure this is just a bug in LLVM.
Would be a good idea for you to verify that it still happens with
trunk, come up with a minimal test case, and file a bug.
> 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, 17:26):
>> Generally, a good strategy is to look at what Clang generates for similar code and mimic that in your IR generator.
>> -- adrian
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
More information about the llvm-dev