[flang-commits] [flang] [flang] Add debug information for module variables. (PR #91582)

Kiran Chandramohan via flang-commits flang-commits at lists.llvm.org
Mon May 20 04:55:36 PDT 2024


================
@@ -0,0 +1,39 @@
+! RUN: %flang_fc1 -emit-fir -debug-info-kind=standalone -mmlir --mlir-print-debuginfo %s -o - | \
+! RUN: fir-opt --cg-rewrite --mlir-print-debuginfo | fir-opt --add-debug-info --mlir-print-debuginfo | FileCheck %s
----------------
kiranchandramohan wrote:

I was trying to convey the following:
-> If it is the `AddDebugInfo` pass that you want to test, then give it the input after `cg-rewrite` and test its output.
-> If it is the `CodeGen` changes that you want to test, then give it the input before `Codegen` and test its output.

I am guessing the LLVM IR changes helps it easier to review and hence it might be OK to add it to the Integration directory. 

Generally tests that specifically checks the changes are easier to review and also maintain. This way of writing helps to ensure that when some unrelated changes happen these tests are not affected. For testing end to end flows we should ideally set up a separate buildbot or move these to the llvm-testsuite/Fortran/Debug.

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


More information about the flang-commits mailing list