[flang-commits] [flang] [flang][Lower] Convert OMP Map and related functions to evaluate::Expr (PR #81626)

Valentin Clement バレンタイン クレメン via flang-commits flang-commits at lists.llvm.org
Tue Mar 19 09:37:03 PDT 2024


================
@@ -808,14 +808,83 @@ genBaseBoundsOps(fir::FirOpBuilder &builder, mlir::Location loc,
   return bounds;
 }
 
+namespace detail {
+template <typename T> //
+static T &&AsRvalueRef(T &&t) {
+  return std::move(t);
+}
+template <typename T> //
+static T AsRvalueRef(T &t) {
+  return t;
+}
+template <typename T> //
+static T AsRvalueRef(const T &t) {
+  return t;
+}
+
+// Helper class for stripping enclosing parentheses and a conversion that
+// preserves type category. This is used for triplet elements, which are
+// always of type integer(kind=8). The lower/upper bounds are converted to
+// an "index" type, which is 64-bit, so the explicit conversion to kind=8
----------------
clementval wrote:

Thanks. The changes on the OpenACC and DirectiveCommon side look ok to me. I'll let someone from the OpenMP side to approve the rest of the changes.

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


More information about the flang-commits mailing list