[Mlir-commits] [flang] [mlir] [mlir][OpenMP] Annotate `private` vars with `map_idx` when needed (PR #116770)
Tom Eccles
llvmlistbot at llvm.org
Wed Nov 20 03:11:35 PST 2024
================
@@ -0,0 +1,22 @@
+//===- Utils.cpp - Utils for the OpenMP MLIR Dialect ------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+
+#include "mlir/Dialect/OpenMP/Utils.h"
+#include "mlir/IR/BuiltinTypes.h"
+
+namespace mlir::omp::utils {
+mlir::ArrayAttr makeI64ArrayAttr(llvm::ArrayRef<int64_t> values,
----------------
tblah wrote:
You could instead use `mlir::DenseI64ArrayAttr`, which can be built from and implicitly converted back to `llvm::ArrayRef<int64_t>`.
See `mlir::Builder::getDenseI64ArrayAttr(ArrayRef<int64_t> values)`
https://github.com/llvm/llvm-project/pull/116770
More information about the Mlir-commits
mailing list