We are in the process of implementing target offloading for OpenMP in flang. Some of the information would be naturally represented as additional attributes on functions/modules e.g. if a function is a target or host function, variants etc. Similarly, on the module level we need to know if the module is for host or device compilation and there are various directives that might be present
One option is to add omp.module and omp.function to the omp dialect and define these attributes. The other option is to use dialect attributes on the built in function/module ops. What is the better approach, and what are the criteria for choosing one approach over the other?