[Openmp-commits] [PATCH] D108574: [OpenMP] libomp: runtime part of omp_all_memory task dependence implementation.

Andrey Churbanov via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Wed Nov 17 07:47:05 PST 2021

AndreyChurbanov added a comment.

In D108574#3080797 <https://reviews.llvm.org/D108574#3080797>, @protze.joachim wrote:

> Writing up the OMPT interface for `omp_all_memory`, I realized that treating `omp_all_memory` individually might not be the best choice, considering that the spec talks about "Reserved Locators".
> How final is this compiler interface?
>> Library recognizes the new type via either
>> (dependence_address == NULL && dependence_flag == 0x80 (set highest bit of 1-byte flag))
>> or
>> (dependence_address == SIZE_MAX).

These are actually two interfaces, and compiler has a choice which one to use.

> My suggestion would be to define `dependence_flag == 0x80` indicating the presence of a //reserved locator//, but still use a specific address value to indicate the concrete locator. I guess for the alternative interface with `SIZE_MAX`, we could use `SIZE_MAX-1`... for upcoming reserved locators.

If library sees specific address value it ignores the flag value.  The specification requires the flag to be set by user to the value "out" or "inout", so it may be simpler for compiler to leave the flag with this value (just a guess as I am not a compiler expert).
To me having two requirements when one is enough only adds unneeded complexity.

  rG LLVM Github Monorepo



More information about the Openmp-commits mailing list