[cfe-dev] Implementing OpenMP function variants
John McCall via cfe-dev
cfe-dev at lists.llvm.org
Wed Dec 18 12:18:24 PST 2019
On 18 Dec 2019, at 15:02, Doerfert, Johannes wrote:
> On 12/18, John McCall wrote:
>> On 18 Dec 2019, at 14:25, Doerfert, Johannes wrote:
>>> On 12/18, John McCall wrote:
>>>> On 18 Dec 2019, at 11:16, Doerfert, Johannes wrote:
>>>>> Is there a good reason to make 5.1-type variants different from
>>>>> multi-versions (as we have them)? They do not depend on the
>>>>> lexical call
>>>>> context but only on the compilation parameters.
>>>> Are multi-versions yet another feature? Do they interact with this
>>> In 5.1, `begin/end declare variant` multi-version a function
>>> the same way as `__attribute__((target(...)))` does. The condition
>>> be more than only a target though. (I mispoke earlier, it can
>>> call site context information). So we have multiple versions of a
>>> function, let's say "sin", and depending on the compilation target,
>>> e.g., are we compiling for nvptx or not, ans call site context,
>>> are we syntacitally inside a parallel region, we pick on of them.
>>> prototype for this reuses almost all of the multi-version code that
>>> enables the target attribute as it seemed to be the natural fit.
>> I see. And that’s still totally statically selected at use time,
> Yes, as of OpenMP TR8 (Nov this year). But (to me) it is fairly
> we'll also get an dynamic dispatch version too, maybe even this year
> OpenMP 5.1).
A dynamic version of `__attribute__((target))`, or of variants, or both?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev