Generalize getOpenCLImageAddrSpace into getOpenCLTypeAddrSpace, such
that targets can select the address space per type.
No functional changes intended.
Initial patch by Simon Perretta.
Differential D33989
[OpenCL] Allow targets to select address space per type svenvh on Jun 7 2017, 6:00 AM. Authored by
Details Generalize getOpenCLImageAddrSpace into getOpenCLTypeAddrSpace, such No functional changes intended. Initial patch by Simon Perretta.
Diff Detail Event TimelineComment Actions Can you add missing types to test/CodeGenOpenCL/opencl_types.cl ?
Comment Actions Perhaps, I don't understand the concept of layered design in this particular case. But I just find it annoying that we need to re-implement the entire OpenCL AST Type structure in Basic. And even if we don't have dependencies on the files physically we still logically bound to the AST representation in Basics and just entirely mirror it there. |
I think it is a good idea to make this function a central place for all OpenCL types.
Can you also add sampler and pipe type then update CGOpenCLRuntime::getPipeType and CGOpenCLRuntime::getSamplerType to use this function to get address space for sampler and pipe?