[PATCH] D122760: [OpenMP] Add OpenMP variant extension to keep the unmangled name

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 13:40:07 PDT 2022


jhuber6 created this revision.
jhuber6 added a reviewer: jdoerfert.
Herald added subscribers: asavonic, dexonsmith, guansong, yaxunl.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscribers: llvm-commits, cfe-commits, sstefan1.
Herald added projects: clang, LLVM.

The OpenMP variant clause current ensures unique function identifiers by
mangling the name with `$ompvariant...`. This patch adds an extension to
prevent this by stripping off the mangling during code generation. Doing
this will conflict with the other symbols in the module, but it will
allow us to overload the names of existing symbols if their definitions
are allowed to be dropped. This is most useful for overloading the
meaning of math functions without changing the symbol so they can still
be identified by LLVM.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122760

Files:
  clang/include/clang/Basic/IdentifierTable.h
  clang/lib/CodeGen/CodeGenModule.cpp
  clang/lib/Parse/ParseOpenMP.cpp
  clang/lib/Sema/SemaOpenMP.cpp
  clang/test/OpenMP/nvptx_declare_variant_name_mangling.cpp
  llvm/include/llvm/Frontend/OpenMP/OMPKinds.def

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122760.419256.patch
Type: text/x-patch
Size: 5515 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220330/9c2ff1d5/attachment-0001.bin>


More information about the cfe-commits mailing list