This patch adds support for the registration of the requires directives with the runtime.
Each requires directive clause will enable a particular flag to be set.
The set of flags is passed to the runtime to be checked for compatibility with other such flags coming from other object files.
The registration function is called whenever OpenMP is present even if a requires directive is not present. This helps detect cases in which requires directives are used inconsistently.
Don't you need a bool for each characteristics? Your intention is to have one bit vector for each characteristics that matter to the compiler?
Also, it is my belief that you need to record 2 states:
unmaterialized (meaning I have not processed any target yet, so I should record any requires as they arrive)
finalized (I am processing a target, so the state is now fixed)
you need this in case you have an input like this:
declare target
int x
end declare target
requires unified memory
which is illegal