[flang-commits] [flang] [mlir] [mlir][debuginfo] Add support for subprogram annotations (PR #110946)
Walter Erquinigo via flang-commits
flang-commits at lists.llvm.org
Fri Oct 4 12:31:15 PDT 2024
walter-erquinigo wrote:
> > @Dinistro , I've added one more test but I'm kind of unable to implement an import test because llvm doesn't have actual C++ entities for `DW_TAG_LLVM_annotation`. All usages of annotations are done at a very low level and thus writing such tests is unfeasible (i.e. it's not possible to write `llvm.di_annotation`). Would it be okay to land this patch as it is without the import test? I'm afraid that building the proper annotation infrastructure in LLVM would be a much larger project and that is kind of falling out of my limited timelines.
>
> I'm not too familiar with this in LLVM IR. So this can not even be written in textual IR?
I'm also not very familiar with this, as annotations have been implemented as a bag of data in LLVM IR. Probably that's why proper declarations in LLVM IR haven't been introduced, even though it seems people are only using it to store strings.
If it serves you, I was able to have my compiler define annotations at the MLIR level and generate a resultant binary whose DWARF in fact had this annotations. I don't see why importing wouldn't work, but it's just the representation used by `debug-info.ll` incapable of represent nicely an annotation.
https://github.com/llvm/llvm-project/pull/110946
More information about the flang-commits
mailing list