[PATCH] D75685: Add MS Mangling for OpenCL Pipe types, add mangling test.

Anastasia Stulova via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 25 10:16:25 PDT 2020


Anastasia added a comment.

Sorry for the delayed comments. It would be good to address those in a separate commit if possible.



================
Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:12
+// WINDOWS: define dso_local void @"?test1@@YAXU?$ocl_pipe at H$00 at __clang@@@Z"
+// UNMANGLED: define {{.*}}void @test1(
+}
----------------
erichkeane wrote:
> Anastasia wrote:
> > Any reason to test unmangled?
> Because you asked to validate the OpenCL cases as well.
Ok, I guess we should add overloadable attribute otherwise it doesn't go through mangling? Then I guess you only need a check for Linux or Windows cases.


================
Comment at: clang/test/CodeGenOpenCL/pipe_types_mangling.cl:25
+
+#ifdef WIN
+// SPIR Spec specifies mangling on pipes that doesn't include the element type
----------------
erichkeane wrote:
> Anastasia wrote:
> > I am still unclear why is this special case?
> It isn't possible to overload on these types in Linux mode, because the OpenCL spec on ItaniumABI has a specific mangling that doesn't take element type and read/write into effect.  The probelm is that on Linux BOTH versions of 'test2' end up with the mangling '@_Z5test28ocl_pipe' (and we get an error in codegen).
> 
> 
Oh I see. I think it would be good to explain this better.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75685/new/

https://reviews.llvm.org/D75685





More information about the cfe-commits mailing list