[Openmp-commits] [EXTERNAL] [PATCH] D139139: Enable kmpc_atomic functions for arm64

Bran Hagger via Openmp-commits openmp-commits at lists.llvm.org
Thu Dec 1 15:02:03 PST 2022


These functions produce a warning message:

"warning C4190: '__kmpc_atomic_cmplx8_rd' has C-linkage specified, but returns UDT '__kmp_cmplx64_t' which is incompatible with C"

Would it make more sense to remove these functions from the dllexports for arm64 instead? Or are these warnings acceptable in LLVM?

Thank you,
Bran (he/him)
________________________________
From: Martin Storsjö via Phabricator <reviews at reviews.llvm.org>
Sent: Thursday, December 1, 2022 1:34 PM
To: Bran Hagger <brhagger at microsoft.com>; jdoerfert at anl.gov <jdoerfert at anl.gov>; martin at martin.st <martin at martin.st>
Cc: stefomeister at gmail.com <stefomeister at gmail.com>; openmp-commits at lists.llvm.org <openmp-commits at lists.llvm.org>; kristof.beyls at arm.com <kristof.beyls at arm.com>; phoebe.wang at intel.com <phoebe.wang at intel.com>; kevin.sala at bsc.es <kevin.sala at bsc.es>; balaji-sankar-naga-sai-sandeep.kosuri at hpe.com <balaji-sankar-naga-sai-sandeep.kosuri at hpe.com>; misono.tomohiro at fujitsu.com <misono.tomohiro at fujitsu.com>; sunil.shrestha at hpe.com <sunil.shrestha at hpe.com>; vigbalas at amd.com <vigbalas at amd.com>; bhuvanendra.kumarn at amd.com <bhuvanendra.kumarn at amd.com>; lin32 at llnl.gov <lin32 at llnl.gov>; liao6 at llnl.gov <liao6 at llnl.gov>; abidmuslim at gmail.com <abidmuslim at gmail.com>; sara.royuela at bsc.es <sara.royuela at bsc.es>; Saiyedul.Islam at amd.com <Saiyedul.Islam at amd.com>; soutomar at amd.com <soutomar at amd.com>; chichun.chen at hpe.com <chichun.chen at hpe.com>; deepak.eachempati at hpe.com <deepak.eachempati at hpe.com>; xw111luoye at gmail.com <xw111luoye at gmail.com>; ron.lieberman at amd.com <ron.lieberman at amd.com>; jdenny.ornl at gmail.com <jdenny.ornl at gmail.com>; jatin.bhateja at gmail.com <jatin.bhateja at gmail.com>; greg63706 at gmail.com <greg63706 at gmail.com>; ravi.narayanaswamy at intel.com <ravi.narayanaswamy at intel.com>; michael.hliao at gmail.com <michael.hliao at gmail.com>; zhang.guansong at gmail.com <zhang.guansong at gmail.com>; a.bataev at hotmail.com <a.bataev at hotmail.com>; david.green at arm.com <david.green at arm.com>; jinsong.ji at intel.com <jinsong.ji at intel.com>
Subject: [EXTERNAL] [PATCH] D139139: Enable kmpc_atomic functions for arm64

mstorsjo added inline comments.


================
Comment at: openmp/runtime/src/kmp_atomic.h:1033
+#if KMP_ARCH_X86 || KMP_ARCH_X86_64
 kmp_cmplx64 __kmpc_atomic_cmplx8_rd(ident_t *id_ref, int gtid,
                                     kmp_cmplx64 *loc);
----------------
Why are these functions only declared on x86? These functions are among the exported ones. Since they aren't declared here (within an `extern "C" {...}` block, they end up with mangled C++ names. When linking in MSVC mode, the linker still manages to map the undecorated C symbol name to the C++ symbol and exporting that, but in mingw mode, it doesn't automatically find a matching itanium mangled symbol.


================
Comment at: openmp/runtime/src/kmp_atomic.h:1341
                                   kmp_cmplx32 rhs, kmp_cmplx32 *out, int flag);
-
+#if KMP_ARCH_X86 || KMP_ARCH_X86_64
 kmp_cmplx64 __kmpc_atomic_cmplx8_add_cpt(ident_t *id_ref, int gtid,
----------------
The same goes for this ifdef block.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD139139%2Fnew%2F&data=05%7C01%7Cbrhagger%40microsoft.com%7C55a6af13ea6a4738b65f08dad3e3d401%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638055272809103721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=PBGyshAzmRVBDPPH9cE0L5p5wIGrqBEP161ETnbrH%2FY%3D&reserved=0

https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD139139&data=05%7C01%7Cbrhagger%40microsoft.com%7C55a6af13ea6a4738b65f08dad3e3d401%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638055272809103721%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=ZbQ8Xmmh7MWY0vM6T80PcuC1HXNpiRC0%2BuGoYfUtf%2FQ%3D&reserved=0

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20221201/88736e6b/attachment-0001.html>


More information about the Openmp-commits mailing list