[PATCH] D46015: [OpenCL] Add separate read_only and write_only pipe IR types

Stuart Brady via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 24 08:25:40 PDT 2018


stuart created this revision.
stuart added reviewers: Anastasia, yaxunl.
Herald added a subscriber: cfe-commits.

SPIR-V encodes the read_only and write_only access qualifiers of pipes,
so separate LLVM IR types are required to target SPIR-V.  Other backends
may also find this useful.

These new types are opencl.pipe_ro_t and opencl.pipe_wo_t, which replace
opencl.pipe_t.

This replaces __get_pipe_num_packets(...) and __get_pipe_max_packets(...)
which took a read_only pipe with separate versions for read_only and
write_only pipes, namely:

- __get_pipe_num_packets_ro(...)
- __get_pipe_num_packets_wo(...)
- __get_pipe_max_packets_ro(...)
- __get_pipe_max_packets_wo(...)


Repository:
  rC Clang

https://reviews.llvm.org/D46015

Files:
  lib/CodeGen/CGBuiltin.cpp
  lib/CodeGen/CGOpenCLRuntime.cpp
  lib/CodeGen/CGOpenCLRuntime.h
  test/CodeGenOpenCL/opencl_types.cl
  test/CodeGenOpenCL/pipe_builtin.cl
  test/CodeGenOpenCL/pipe_types.cl
  test/Index/pipe-size.cl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46015.143750.patch
Type: text/x-patch
Size: 15086 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180424/6185c730/attachment.bin>


More information about the cfe-commits mailing list