[flang-commits] [flang] [mlir] [flang] Add debug information for module variables. (PR #91582)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Tue May 14 05:55:57 PDT 2024
================
@@ -91,6 +169,10 @@ void AddDebugInfoPass::runOnOperation() {
llvm::dwarf::getLanguage("DW_LANG_Fortran95"), fileAttr, producer,
isOptimized, debugLevel);
+ module.walk([&](fir::GlobalOp globalOp) {
----------------
tblah wrote:
`mlir::Operation::walk` will visit every descendant operation. I think `fir::GlobalOp` can only be nested directly inside of the `MoudleOp` so it would be much more efficient to have a for loop over the direct descendants of the module.
https://github.com/llvm/llvm-project/pull/91582
More information about the flang-commits
mailing list