[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.

  rG LLVM Github Monorepo



-------------- 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