[clang] [llvm] [mlir] [OMPIRBuilder] - Handle dependencies in `createTarget` (PR #93977)

Sergio Afonso via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 3 04:29:35 PDT 2024


================
@@ -682,6 +682,41 @@ convertOmpTeams(omp::TeamsOp op, llvm::IRBuilderBase &builder,
   return bodyGenStatus;
 }
 
+static void
+buildDependData(Operation *op, LLVM::ModuleTranslation &moduleTranslation,
----------------
skatrak wrote:

I'd suggest taking `std::optional<ArrayAttr> depends` and `OperandRange dependVars` as arguments instead of `Operation *op` here. This way you don't need to try casting `op` to each supported operation below, but rather make the body of this function what the `processDepends` lambda inside currently has.

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


More information about the cfe-commits mailing list