[flang-commits] [flang] [mlir] [MLIR][OpenMP] Changes to function-filtering pass (PR #71850)

Sergio Afonso via flang-commits flang-commits at lists.llvm.org
Tue Nov 14 04:01:38 PST 2023


================
@@ -56,18 +57,31 @@ class OMPFunctionFilteringPass
       if (declareTargetOp && declareTargetOp.isDeclareTarget())
         declareType = declareTargetOp.getDeclareTargetDeviceType();
 
-      // Filtering a function here means removing its body and explicitly
-      // setting its omp.declare_target attribute, so that following
-      // translation/lowering/transformation passes will skip processing its
-      // contents, but preventing the calls to undefined symbols that could
-      // result if the function were deleted. The second stage of function
-      // filtering, at the MLIR to LLVM IR translation level, will remove these
-      // from the IR thanks to the mismatch between the omp.declare_target
-      // attribute and the target device.
+      // Filtering a function here means deleting it if it doesn't containt a
----------------
skatrak wrote:

```suggestion
      // Filtering a function here means deleting it if it doesn't contain a
```

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


More information about the flang-commits mailing list