[cfe-dev] OpenCL & SPIR specific types - proposal and patch
Anton Lokhmotov
Anton.Lokhmotov at arm.com
Tue Oct 9 07:26:36 PDT 2012
Hi Guy,
+inline bool Type::isImageType() const {
+ return isImage2dT() || isImage2dArrayT() ||
+ isImage3dT() ||
+ isImage1dT() || isImage1dArrayT() || isImage1dBufferT();
Any reason for isImage3dT() test not to be first?
*inline bool Type::isImageType() const {
* return isImage3dT() ||
* isImage2dT() || isImage2dArrayT() ||
* isImage1dT() || isImage1dArrayT() || isImage1dBufferT();
+inline bool Type::isOpenCLSpecificType() const {
+ return isSamplerT() || isEventT() ||
+ isImageType();
+}
*inline bool Type::isOpenCLSpecificType() const {
* return isSamplerT() || isEventT() || isImageType();
*}
+ // Currently these types are pointers to opaque types
* // Currently these types are pointers to opaque types.
+ llvm::DIType OCLImg1dTy, OCLImg1darrTy, OCLImg1dbuffTy;
+ llvm::DIType OCLImg2dTy, OCLImg2darrTy;
+ llvm::DIType OCLImg3dTy;
+ llvm::DIType OCLSmpTy;
+ llvm::DIType OCLEvtTy;
How about:
* llvm::DIType OCLImage1dDITy, OCLImage1dArrayDITy, OCLImage1dBufferDITy;
etc.
Cheers,
Anton.
More information about the cfe-dev
mailing list