[all-commits] [llvm/llvm-project] a0eb79: [MLIR][acc] Introduce varType to acc data clause o...

Razvan Lupusoru via All-commits all-commits at lists.llvm.org
Mon Dec 9 15:15:10 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a0eb794da8b8c1e423e4b3100a137faf3844406f
      https://github.com/llvm/llvm-project/commit/a0eb794da8b8c1e423e4b3100a137faf3844406f
  Author: Razvan Lupusoru <razvan.lupusoru at gmail.com>
  Date:   2024-12-09 (Mon, 09 Dec 2024)

  Changed paths:
    M flang/lib/Lower/OpenACC.cpp
    M mlir/include/mlir/Dialect/OpenACC/OpenACCOps.td
    M mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
    M mlir/test/Dialect/OpenACC/legalize-data.mlir
    M mlir/test/Dialect/OpenACC/ops.mlir
    M mlir/test/Target/LLVMIR/openacc-llvm.mlir

  Log Message:
  -----------
  [MLIR][acc] Introduce varType to acc data clause operations (#119007)

The acc data clause operations hold an operand named `varPtr`. This was
intended to hold a pointer to a variable - where the element type of
that pointer specifies the type of the variable. However, for both
memref and llvm dialects, this assumption is not true. This is because
memref element type for cases like memref<10xf32> is simply f32 and for
LLVM, after opaque pointers, the variable type is no longer recoverable.

Thus, introduce varType to ensure that appropriate semantics are kept.

Both the parser and printer for this new type attribute allow it to not
be specified in cases where a dialect's getElementType() applied to
`varPtr`'s type has a recoverable type. And more specifically, for FIR,
no changes are needed in the MLIR unit tests.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list