[openacc] Add dialect definition for acc declare
A declare directive is used to specify the creation of a visible device copy of a variable for the duration of the implicit data region as it relates to the scope in which the variable is declared. In order to support this, the following new operations were added: 1) `acc.global_ctor` and `acc.global_dtor`. These are used whenever the declare directive applies to a global. 2) `acc.declare_enter` and `acc.declare_exit`. These operations are modeled similarly to `acc.enter_data` and `acc.exit_data`. The reason they are not modeled like `acc.data` is so that these operations can be used both for globals and regions like functions. 3) `acc.declare_device_resident` and `acc.declare_link`. These operations are modeled in a manner consistent with previously defined data entry operation model. The `acc.getdeviceptr` was generalized so that it can be used with acc.declare_exit. Reviewed By: clementval, vzakhari Differential Revision: https://reviews.llvm.org/D155322
Loading
Please sign in to comment