[llvm-branch-commits] [flang] [llvm] [mlir] [Flang][OpenMP][MLIR] Initial declare target to for variables implementation (PR #119589)

Sergio Afonso via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Aug 11 07:37:14 PDT 2025


================
@@ -0,0 +1,38 @@
+// RUN: mlir-translate -mlir-to-llvmir %s | FileCheck %s
+
+// This tests the replacement of operations for declare target to with the
+// generated declare target to global variable inside of target op regions when
+// lowering to IR for device. Unfortunately as the host file is not passed as a
+// module attribute, we miss out on the metadata and entry info.
+//
+// Unfortunately, only so much can be tested as the device side is dependent on
+// a *.bc file created by the host and appended as an attribute to the module.
----------------
skatrak wrote:

Nit: I think the last clarification is a bit redundant, since it's the same as the last sentence of the first paragraph.
```suggestion
// This tests the replacement of operations for `declare target to` with the
// generated `declare target to` global variable inside of target op regions when
// lowering to IR for device. Unfortunately, as the host file is not passed as a
// module attribute, we miss out on the metadata and entry info.
```
```

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


More information about the llvm-branch-commits mailing list