[Mlir-commits] [flang] [llvm] [mlir] [OpenMPIRBuilder] Don't drop debug info for target region. (PR #80692)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Tue Sep 3 00:28:12 PDT 2024


================
@@ -309,7 +309,11 @@ void AddDebugInfoPass::handleFuncOp(mlir::func::FuncOp funcOp,
     return;
 
   funcOp.walk([&](fir::cg::XDeclareOp declOp) {
-    handleDeclareOp(declOp, fileAttr, spAttr, typeGen, symbolTable);
+    // FIXME: We currently dont handle variables that are not in the entry
+    // blocks of the fuctions. These may be variable or arguments used in the
+    // OpenMP target regions.
+    if (&funcOp.front() == declOp->getBlock())
----------------
jeanPerier wrote:

These can also be variables from Fortran BLOCK constructs, or the selectors from ASSOCIATE/SELECT TYPE/SELECT RANK/SELECT CASE.

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


More information about the Mlir-commits mailing list