This is an archive of the discontinued LLVM Phabricator instance.

[OpenMP] Export `ompx::` symbols from the device runtime
ClosedPublic

Authored by jdoerfert on Dec 19 2022, 12:01 PM.

Diff Detail

Event Timeline

jdoerfert created this revision.Dec 19 2022, 12:01 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2022, 12:01 PM
jdoerfert requested review of this revision.Dec 19 2022, 12:01 PM
openmp/libomptarget/DeviceRTL/src/exports
5

I'd prefer our ompx extension to be C interfaces instead of C++.

jdoerfert added inline comments.Dec 19 2022, 12:04 PM
openmp/libomptarget/DeviceRTL/src/exports
5

Why should they be one or the other?

ompx_
and
ompx::

can (and will) coexist, no?

jhuber6 added inline comments.Dec 19 2022, 12:05 PM
openmp/libomptarget/DeviceRTL/src/exports
5

Could we do *ompx* instead to avoid the mangled name in the list?

openmp/libomptarget/DeviceRTL/src/exports
5

Could we do *ompx* instead to avoid the mangled name in the list?

I think that is even worse.

If the interface function calls will be generated by the front end, non-mangled interface functions are better. After all, name mangling is part of ABI.

jdoerfert added inline comments.Dec 19 2022, 12:09 PM
openmp/libomptarget/DeviceRTL/src/exports
5

we could, but I'd honestly prefer to restrict it to the prefix and namespace. Though, given that this is our runtime, we might be able to avoid using ompx in the middle of a symbol name.

If the interface function calls will be generated by the front end, non-mangled interface functions are better. After all, name mangling is part of ABI.

But they are not (always). The user will be able to call ompx::mapping::getThreadIdInBlock (or a renamed version of it).

openmp/libomptarget/DeviceRTL/src/exports
5

If the uses are for users, that would be fine. Wonder how LLVM libraries expose their C++ interfaces.

This revision is now accepted and ready to land.Dec 19 2022, 12:23 PM
Herald added a project: Restricted Project. · View Herald TranscriptDec 19 2022, 2:48 PM