[llvm] [RemoveDIs] Load into new debug info format by default in LLVM (PR #89799)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 11 03:19:11 PDT 2024


jeanPerier wrote:

Thanks!

> Since this didn't show up the last time this patch landed, there's presumably some new code added to flang since then that inserts debug intrinsics in some way other than the DIBuilder, so it might be very straightforward to update the code in question.

That is very likely, @abidh is currently making patch to generate debug info in flang.

Note that flang is generating MLIR LLVM dialect. It generates mlir::LLVM::DbgDeclareOp [here](https://github.com/llvm/llvm-project/blob/995ba4afcd0d913bca5e082afe90be78b2882f79/flang/lib/Optimizer/CodeGen/CodeGen.cpp#L185C25-L185C49). These MLIR ops are then later translated into LLVM IR (likely in mlir/lib/Target/LLVMIR/ModuleTranslation.cpp or mlir/lib/Target/LLVMIR/DebugTranslation.cpp but I am not sure here).

It is weird though that the flto flag matters here. Is it possible that the -flto pipeline would incorrectly mark the module as using debug records?

https://github.com/llvm/llvm-project/pull/89799


More information about the llvm-commits mailing list