[Flang][OpenMP][MLIR] Add declare target attribute set and interface for the OpenMP dialect
This attribute represents the OpenMP declare target directive, it marks a function or global as declare target by being present but also contains information on the device_type and capture clause (link or to). It being an attribute allows it to mark existing constructs and be converted trivially on lowering from the OpenMP dialect to MLIR using amendOperation. An interface has been made for the declare target attribute, with several helper methods for managing the attribute, this interface can be applied to MLIR operations that are allowed to be marked as declare target (as an example, it is by default applied to func.func, LLVMFunc, fir.GlobalOps and LLVMGlobalOps). Reviewers: kiranchandramohan Differential Revision: https://reviews.llvm.org/D150328
Loading
Please sign in to comment