[all-commits] [llvm/llvm-project] 86e0a6: Add MS Mangling for OpenCL Pipe types, add manglin...

Erich Keane via All-commits all-commits at lists.llvm.org
Wed Mar 25 08:01:27 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 86e0a6c6062705ec8f6f7333872d566e74d66424
      https://github.com/llvm/llvm-project/commit/86e0a6c6062705ec8f6f7333872d566e74d66424
  Author: Erich Keane <erich.keane at intel.com>
  Date:   2020-03-25 (Wed, 25 Mar 2020)

  Changed paths:
    M clang/lib/AST/MicrosoftMangle.cpp
    A clang/test/CodeGenOpenCL/pipe_types_mangling.cl

  Log Message:
  -----------
  Add MS Mangling for OpenCL Pipe types, add mangling test.

SPIRV2.0 Spec only specifies Linux mangling, however our downstream has
use for a Windows mangling for these types.

Unfortunately, the SPIRV
spec specifies a single mangling for all pipe types, despite clang
allowing overloading on these types.  Because of this, this patch
chooses to mangle the read/writability and element type for the windows
mangling.

The windows manglings in the test all demangle according to demangler:
"void __cdecl test1(struct __clang::ocl_pipe<int,1>)
"void __cdecl test2(struct __clang::ocl_pipe<float,0>)
"void __cdecl test2(struct __clang::ocl_pipe<int,1>)
"void __cdecl test3(struct __clang::ocl_pipe<int const,1>)
"void __cdecl test4(struct __clang::ocl_pipe<union
__clang::__vector<unsigned char,3>,1>)
"void __cdecl test5(struct __clang::ocl_pipe<union
__clang::__vector<int,4>,1>)
"void __cdecl test_reserved_read_pipe(struct __clang::_ASCLglobal<struct
Person > * __ptr64,struct __clang::ocl_pipe<struct Person,1>)

Differential Revision: https://reviews.llvm.org/D75685




More information about the All-commits mailing list