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

via flang-commits flang-commits at lists.llvm.org
Fri Oct 13 09:58:57 PDT 2023


================
@@ -1144,14 +1144,13 @@ def DataBoundsOp : OpenMP_Op<"bounds",
 }
 
 def MapInfoOp : OpenMP_Op<"map_info", [AttrSizedOperandSegments]> {
-  let arguments = (ins OpenMP_PointerLikeType:$var_ptr,
-                       Optional<OpenMP_PointerLikeType>:$var_ptr_ptr,
+  let arguments = (ins AnyTypeOf<[IntLikeType, Index, OpenMP_PointerLikeType]>:$var_ptr,
----------------
agozillon wrote:

In this case I believe it's because index values are sometimes used inside of the omp.target region when generated outside of the omp.target region and we capture them implicitly in this patch as there may be a need to pass them to the device, I imagine this could perhaps be restricted to just Index, but I agree OpenMP_PointerLikeType would be nice to have on its own. @TIFitis can likely explain it better than I can! 

I think Kiran suggested a name change if we continue down this route, or an alternative field. 

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


More information about the flang-commits mailing list