[PATCH] D27049: [OpenCL] Refactor out ReadPipe/WritePipe

Yaron Keren via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 26 12:31:27 PST 2016


yaron.keren added inline comments.


================
Comment at: lib/AST/ASTContext.cpp:8258
       return RHS;
-    return isa<ReadPipeType>(LHS) ? getReadPipeType(ResultType)
-                                  : getWritePipeType(ResultType);
+    const PipeType *PT = LHS->getAs<PipeType>();
+    return PT->isReadOnly() ? getReadPipeType(ResultType)
----------------
I'm not too familar how PipeTypes should be merged, is it on purpose the process is not commutative,

ReadPipeType merged with WritePipeType is ReadPipeType

WritePipeType merged with ReadPipeType is WritePipeType 



Repository:
  rL LLVM

https://reviews.llvm.org/D27049





More information about the cfe-commits mailing list