[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-12-05 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Following up on the layering violation in https://reviews.llvm.org/D40838 Repository: rL LLVM https://reviews.llvm.org/D33989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/li

Re: [PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-12-04 Thread David Blaikie via cfe-commits
Ping - I have a pretty clear workaround internally, but still would be happy to remove any workarounds given the opportunity. As for layering. For now the issue is that libAST depends on libBasic, and libraries can't have circular dependencies. Modular builds (well, especially modular codegen, but

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-11-17 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. 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

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-11-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: cfe/trunk/lib/Basic/TargetInfo.cpp:351 +LangAS::ID TargetInfo::getOpenCLTypeAddrSpace(const Type *T) const { + auto BT = dyn_cast(T); rsmith wrote: > Anastasia wrote: > > chapuni wrote: > > > Excuse me for old commit,

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-11-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added inline comments. Comment at: cfe/trunk/lib/Basic/TargetInfo.cpp:351 +LangAS::ID TargetInfo::getOpenCLTypeAddrSpace(const Type *T) const { + auto BT = dyn_cast(T); Anastasia wrote: > chapuni wrote: > > Excuse me for old commit, I think it might be

Re: [PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-11-16 Thread David Blaikie via cfe-commits
Ping on this layering violation. A simple way to demonstrate this is to move the definition of clang::Type::getTypeClass out of line: This results in an unresolved symbol due to incorrect/broken dependencies. Richard? Anyone else? Ideas on how to address this layering violation? Anastasia: Could

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-10-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: cfe/trunk/lib/Basic/TargetInfo.cpp:351 +LangAS::ID TargetInfo::getOpenCLTypeAddrSpace(const Type *T) const { + auto BT = dyn_cast(T); chapuni wrote: > Excuse me for old commit, I think it might be layering violation

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-10-12 Thread NAKAMURA Takumi via Phabricator via cfe-commits
chapuni added inline comments. Comment at: cfe/trunk/lib/Basic/TargetInfo.cpp:351 +LangAS::ID TargetInfo::getOpenCLTypeAddrSpace(const Type *T) const { + auto BT = dyn_cast(T); Excuse me for old commit, I think it might be layering violation. Could we avoid us

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-08-15 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL310911: [OpenCL] Allow targets to select address space per type (authored by svenvh). Changed prior to commit: https://reviews.llvm.org/D33989?vs=110947&id=37#toc Repository: rL LLVM https://rev

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-08-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl accepted this revision. yaxunl added a comment. This revision is now accepted and ready to land. LGTM. Thanks. https://reviews.llvm.org/D33989 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listi

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-08-14 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked 2 inline comments as done. svenvh added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} yaxunl wrote: > Anastasia wrote: > > bader wrote: > > > yaxunl wrote: > > > > bader wrote:

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-08-14 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh updated this revision to Diff 110947. svenvh edited the summary of this revision. svenvh added a comment. Herald added a subscriber: nhaehnle. Apologies for the late followup! Rebased the patch and addressed your comments. https://reviews.llvm.org/D33989 Files: include/clang/Basic/Tar

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-19 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} Anastasia wrote: > bader wrote: > > yaxunl wrote: > > > bader wrote: > > > > yaxunl wrote: > > > > > I think the default (including

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-19 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} bader wrote: > yaxunl wrote: > > bader wrote: > > > yaxunl wrote: > > > > I think the default (including even_t, clk_event_t, qu

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-16 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} yaxunl wrote: > bader wrote: > > yaxunl wrote: > > > I think the default (including even_t, clk_event_t, queue_t, > > > reserved_id

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-15 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} bader wrote: > yaxunl wrote: > > I think the default (including even_t, clk_event_t, queue_t, reserved_id_t) > > should be global

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added inline comments. Comment at: include/clang/Basic/TargetInfo.h:1041 +default: + return LangAS::Default; +} yaxunl wrote: > I think the default (including even_t, clk_event_t, queue_t, reserved_id_t) > should be global since these opaque O

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-13 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. Can you add missing types to test/CodeGenOpenCL/opencl_types.cl ? Comment at: include/clang/Basic/TargetInfo.h:1034 + virtual LangAS::ID getOpenCLTypeAddrSpace(BuiltinType::Kind K) const { +switch (K) { +#define IMAGE_TYPE(ImgType, Id, SingletonId,

[PATCH] D33989: [OpenCL] Allow targets to select address space per type

2017-06-07 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. Generalize getOpenCLImageAddrSpace into getOpenCLTypeAddrSpace, such that targets can select the address space per type. No functional changes intended. In particular, this is already covered by test/CodeGenOpenCL/opencl_types.cl . Patch by Simon Perretta. https: