<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">These functions produce a warning message:</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);"><br>
</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0">"warning C4190: '__kmpc_atomic_cmplx8_rd' has C-linkage specified,
but returns UDT '__kmp_cmplx64_t' which is incompatible with C"<br>
</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0">Would it make more sense to remove these functions from the dllexports
for arm64 instead? Or are these warnings acceptable in LLVM?</span></div>
<div class="elementToProof"><span style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);" class="ContentPasted0"><br>
</span></div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Thank you,</div>
<div class="elementToProof" style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255, 255, 255);">
Bran (he/him)</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Martin Storsjö via Phabricator <reviews@reviews.llvm.org><br>
<b>Sent:</b> Thursday, December 1, 2022 1:34 PM<br>
<b>To:</b> Bran Hagger <brhagger@microsoft.com>; jdoerfert@anl.gov <jdoerfert@anl.gov>; martin@martin.st <martin@martin.st><br>
<b>Cc:</b> stefomeister@gmail.com <stefomeister@gmail.com>; openmp-commits@lists.llvm.org <openmp-commits@lists.llvm.org>; kristof.beyls@arm.com <kristof.beyls@arm.com>; phoebe.wang@intel.com <phoebe.wang@intel.com>; kevin.sala@bsc.es <kevin.sala@bsc.es>; balaji-sankar-naga-sai-sandeep.kosuri@hpe.com
<balaji-sankar-naga-sai-sandeep.kosuri@hpe.com>; misono.tomohiro@fujitsu.com <misono.tomohiro@fujitsu.com>; sunil.shrestha@hpe.com <sunil.shrestha@hpe.com>; vigbalas@amd.com <vigbalas@amd.com>; bhuvanendra.kumarn@amd.com <bhuvanendra.kumarn@amd.com>; lin32@llnl.gov
<lin32@llnl.gov>; liao6@llnl.gov <liao6@llnl.gov>; abidmuslim@gmail.com <abidmuslim@gmail.com>; sara.royuela@bsc.es <sara.royuela@bsc.es>; Saiyedul.Islam@amd.com <Saiyedul.Islam@amd.com>; soutomar@amd.com <soutomar@amd.com>; chichun.chen@hpe.com <chichun.chen@hpe.com>;
deepak.eachempati@hpe.com <deepak.eachempati@hpe.com>; xw111luoye@gmail.com <xw111luoye@gmail.com>; ron.lieberman@amd.com <ron.lieberman@amd.com>; jdenny.ornl@gmail.com <jdenny.ornl@gmail.com>; jatin.bhateja@gmail.com <jatin.bhateja@gmail.com>; greg63706@gmail.com
<greg63706@gmail.com>; ravi.narayanaswamy@intel.com <ravi.narayanaswamy@intel.com>; michael.hliao@gmail.com <michael.hliao@gmail.com>; zhang.guansong@gmail.com <zhang.guansong@gmail.com>; a.bataev@hotmail.com <a.bataev@hotmail.com>; david.green@arm.com <david.green@arm.com>;
jinsong.ji@intel.com <jinsong.ji@intel.com><br>
<b>Subject:</b> [EXTERNAL] [PATCH] D139139: Enable kmpc_atomic functions for arm64</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">mstorsjo added inline comments.<br>
<br>
<br>
================<br>
Comment at: openmp/runtime/src/kmp_atomic.h:1033<br>
+#if KMP_ARCH_X86 || KMP_ARCH_X86_64<br>
kmp_cmplx64 __kmpc_atomic_cmplx8_rd(ident_t *id_ref, int gtid,<br>
kmp_cmplx64 *loc);<br>
----------------<br>
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.<br>
<br>
<br>
================<br>
Comment at: openmp/runtime/src/kmp_atomic.h:1341<br>
kmp_cmplx32 rhs, kmp_cmplx32 *out, int flag);<br>
-<br>
+#if KMP_ARCH_X86 || KMP_ARCH_X86_64<br>
kmp_cmplx64 __kmpc_atomic_cmplx8_add_cpt(ident_t *id_ref, int gtid,<br>
----------------<br>
The same goes for this ifdef block.<br>
<br>
<br>
Repository:<br>
rG LLVM Github Monorepo<br>
<br>
CHANGES SINCE LAST ACTION<br>
<a href="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%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</a><br>
<br>
<a href="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">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</a><br>
<br>
</div>
</span></font></div>
</body>
</html>