[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-09-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl abandoned this revision. yaxunl added a comment. We implemented this optimization through some target specific llvm pass. https://reviews.llvm.org/D36327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36327#840658, @bader wrote: > In https://reviews.llvm.org/D36327#840616, @yaxunl wrote: > > > In https://reviews.llvm.org/D36327#839809, @rjmccall wrote: > > > > > Could you just implement this in SimplifyLibCalls? I assume there's some > >

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-14 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. In https://reviews.llvm.org/D36327#840616, @yaxunl wrote: > In https://reviews.llvm.org/D36327#839809, @rjmccall wrote: > > > Could you just implement this in SimplifyLibCalls? I assume there's some > > way to fill in TargetLibraryInfo appropriately for a platform. Is

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36327#839809, @rjmccall wrote: > Could you just implement this in SimplifyLibCalls? I assume there's some way > to fill in TargetLibraryInfo appropriately for a platform. Is that too late > for your linking requirements? Both the

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-11 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Could you just implement this in SimplifyLibCalls? I assume there's some way to fill in TargetLibraryInfo appropriately for a platform. Is that too late for your linking requirements? https://reviews.llvm.org/D36327

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-11 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. John, do you have any comments? Thanks. https://reviews.llvm.org/D36327 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-08 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. @rsmith do you have an opinion on what would be the right place for the kind of proposed optimization? It looks like it can be implemented as target independent optimization, acting only for target with specified properties - in this case target must provide required

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-08 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36327#835634, @Anastasia wrote: > In https://reviews.llvm.org/D36327#835153, @b-sumner wrote: > > > In https://reviews.llvm.org/D36327#834032, @Anastasia wrote: > > > > > In https://reviews.llvm.org/D36327#833891, @yaxunl wrote: > > > > > > >

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-08 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36327#835153, @b-sumner wrote: > In https://reviews.llvm.org/D36327#834032, @Anastasia wrote: > > > In https://reviews.llvm.org/D36327#833891, @yaxunl wrote: > > > > > In https://reviews.llvm.org/D36327#833653, @bader wrote: > > > > > > >

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-08 Thread Brian Sumner via Phabricator via cfe-commits
b-sumner added a comment. In https://reviews.llvm.org/D36327#834032, @Anastasia wrote: > In https://reviews.llvm.org/D36327#833891, @yaxunl wrote: > > > In https://reviews.llvm.org/D36327#833653, @bader wrote: > > > > > Hi Sam, > > > > > > What do you think about implementing this optimization

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D36327#833891, @yaxunl wrote: > In https://reviews.llvm.org/D36327#833653, @bader wrote: > > > Hi Sam, > > > > What do you think about implementing this optimization in target specific > > optimization pass? Since size/alignment is saved as

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-07 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D36327#833653, @bader wrote: > Hi Sam, > > What do you think about implementing this optimization in target specific > optimization pass? Since size/alignment is saved as function parameter in > LLVM IR, the optimization can be done in target

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-07 Thread Alexey Bader via Phabricator via cfe-commits
bader added a comment. Hi Sam, What do you think about implementing this optimization in target specific optimization pass? Since size/alignment is saved as function parameter in LLVM IR, the optimization can be done in target specific components w/o adding additional conditions to generic

[PATCH] D36327: [OpenCL] Allow targets emit optimized pipe functions for power of 2 type sizes

2017-08-04 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. Herald added a subscriber: tpr. Currently Clang emits call of __read_pipe_2 or __read_pipe_4 for OpenCL read_pipe builtin, with appended type size and alignment arguments, where 2 or 4 indicates the original number of arguments. For certain targets (e.g. amdgpu),