[all-commits] [llvm/llvm-project] 475938: [flang][openacc] Update the global ctor for descri...

Valentin Clement (バレンタイン クレメン) via All-commits all-commits at lists.llvm.org
Tue Aug 8 15:14:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 475938d12cf021c293ecee41e3f2c464c60f54c7
      https://github.com/llvm/llvm-project/commit/475938d12cf021c293ecee41e3f2c464c60f54c7
  Author: Valentin Clement <clementval at gmail.com>
  Date:   2023-08-08 (Tue, 08 Aug 2023)

  Changed paths:
    M flang/lib/Lower/OpenACC.cpp
    M flang/test/Lower/OpenACC/acc-declare.f90
    M mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp

  Log Message:
  -----------
  [flang][openacc] Update the global ctor for descriptor

The global ctor for acc declare when the variable is a descriptor
is treated differently. The descriptor is implicity copied in.
An additional registering function will be generated to deal with
the data pointer when the data is actually allocated. This will come in
a follow up patch.

The descriptor is not a user visible detail but an implementation detail.
The intent for declare is that the lifetime is implicitly managed - and the
data must be on device. Since descriptor holds pointer to the data,
it makes sense to also make this available on device at same time.
Copyin is used because it contains relevant details about the data such
as bounds.

Reviewed By: razvanlupusoru

Differential Revision: https://reviews.llvm.org/D157338




More information about the All-commits mailing list