[clang] [flang] [flang][draft] Improve debug info generation. (PR #84202)

Kiran Chandramohan via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 6 10:02:50 PST 2024


kiranchandramohan wrote:

Thanks for this patch to improve debug support in Flang. If you are planning to work long-time on enabling full debug support then it would be good to write a design document (in flang/docs), get it agreed upon by everyone and then proceed. I attempted some time ago at https://reviews.llvm.org/D138534. Could you go through the discussions there? You could adopt a similar style document. @jeanPerier @vzakhari and @tblah might have opinions.

There were some questions on how to generate debug info. This could be generated during lowering and carried in Ops. Alternatively, one of the motivations for adding `hlfir.declare` was to collect and retain variable information suitable for debug info generation. `fir.declare` also probably helps but it is probably dropped before we get to AddDebugFoundation.

The AddDebugFoundation pass was added to retain some location information generation that was lost due to some core MLIR changes. It is not compulsory to retain it if there are better ways to generate debug information.

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


More information about the cfe-commits mailing list