[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-11 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D51544#1230264, @asavonic wrote: > In https://reviews.llvm.org/D51544#1229105, @Anastasia wrote: > > > > With this setup, we can compile opencl-c-common.h, opencl-c-fp16.h and > > > opencl-c-fp64.h into PCHs with one set of extensions/OpenCL

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-11 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. In https://reviews.llvm.org/D51544#1229105, @Anastasia wrote: > > With this setup, we can compile opencl-c-common.h, opencl-c-fp16.h and > > opencl-c-fp64.h into PCHs with one set of extensions/OpenCL version, > > and use them for any other set of extensions/OpenCL ver

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. > With this setup, we can compile opencl-c-common.h, opencl-c-fp16.h and > opencl-c-fp64.h into PCHs with one set of extensions/OpenCL version, > and use them for any other set of extensions/OpenCL version. Clang > will detect this and throw out an error, which can be

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D51544#1227336, @asavonic wrote: > In https://reviews.llvm.org/D51544#1227313, @Anastasia wrote: > > > Currently the main header still contains everything, so the size of the PCH > > won't change. > > > The idea is that we don't pre-compile

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-07 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. In https://reviews.llvm.org/D51544#1227313, @Anastasia wrote: > Currently the main header still contains everything, so the size of the PCH > won't change. The idea is that we don't pre-compile the whole opencl-c.h, we split it into several headers (3 of them are targ

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-07 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D51544#1224780, @asavonic wrote: > In https://reviews.llvm.org/D51544#1224730, @Anastasia wrote: > > > It seems generally good to partition this big header but I am trying to > > understand what problem is it trying to solve now? > > > Main

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-05 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic added a comment. In https://reviews.llvm.org/D51544#1224730, @Anastasia wrote: > It seems generally good to partition this big header but I am trying to > understand what problem is it trying to solve now? Main motivation is to reduce memory footprint by factoring out everything that

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-05 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added a comment. It seems generally good to partition this big header but I am trying to understand what problem is it trying to solve now? The unsupported declarations are guarded out by `#if defined(ext_name)` and therefore won't be parsed and put into PCH is extensions are not supp

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-09-04 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added inline comments. Comment at: lib/Headers/opencl-c-common.h:9 +//===--===// + +#ifndef __OPENCL_C_COMMON_H__ Would it be worth having a brief explanation here about what is supposed t

[PATCH] D51544: [OpenCL] Split opencl-c.h header

2018-08-31 Thread Andrew Savonichev via Phabricator via cfe-commits
asavonic created this revision. asavonic added reviewers: Anastasia, yaxunl, bader. Herald added subscribers: cfe-commits, jfb, mgorny. TL;DR - This patch splits huge opencl-c.h header into multiple headers to support efficient use of Precompiled Headers (or Modules): - opencl-c-defs.h conta