[flang-commits] [flang] [OpenMP][Flang] Add "IsolatedFromAbove" trait to omp.target (PR #67164)

Akash Banerjee via flang-commits flang-commits at lists.llvm.org
Mon Oct 30 08:31:02 PDT 2023


================
@@ -1203,9 +1201,11 @@ def MapInfoOp : OpenMP_Op<"map_info", [AttrSizedOperandSegments]> {
   }];
 
   let assemblyFormat = [{
-    `var_ptr` `(` $var_ptr `:` type($var_ptr) `,` $var_type`)`
     oilist(
-        `var_ptr_ptr` `(` $var_ptr_ptr `:` type($var_ptr_ptr) `)`
+        `val` `(` $val `:` type($val) `)`
+      | `var_ptr` `(` $var_ptr `:` type($var_ptr) `)`
+      | `var_type` `(` $var_type `)`
+      | `var_ptr_ptr` `(` $var_ptr_ptr `:` type($var_ptr_ptr) `)`
----------------
TIFitis wrote:

Currently, `$var_type` is being set to the element_type for `$var_ptr`, or the type of the val for `$val`.

This is done so that later we can always just call a single `get_var_type()` to get the type, instead of having to check if it is a `$val` or `$var_ptr` and then using appropriate functions to retrieve the type.

Do you prefer the latter approach?

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


More information about the flang-commits mailing list