[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-16 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. yaxunl marked 2 inline comments as done. Closed by commit rL289979: [OpenCL] Allow disabling types and declarations associated with extensions (authored by yaxunl). Changed prior to commit:

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-16 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 3 inline comments as done. yaxunl added a comment. In https://reviews.llvm.org/D21698#624967, @Anastasia wrote: > LGTM! Small nitpicks below can be done before committing. Also it would be > nice to double check the compile time is still fine after the last rebase. Thanks. I did

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-16 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Small nitpicks below can be done before committing. Also it would be nice to double check the compile time is still fine after the last rebase. Thanks! Comment

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 81471. yaxunl marked 2 inline comments as done. yaxunl added a comment. Added serialisation of types and declarations associated with extensions. Brought the patch up to date. https://reviews.llvm.org/D21698 Files:

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-14 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 6 inline comments as done. yaxunl added inline comments. Comment at: lib/Serialization/ASTReader.cpp:3167 case OPENCL_EXTENSIONS: - // Later tables overwrite earlier ones. - OpenCLExtensions.swap(Record); Anastasia wrote: > Btw,

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-13 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Sema/Sema.h:8081 + /// \brief Set current OpenCL extensions for a type which can only be used + /// when these OpenCL extensions are enabled. If current OpenCL Extsion is + /// empty, do nothing.

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-12 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 81142. yaxunl marked 9 inline comments as done. yaxunl added a comment. Revised by Anastasia's comments. https://reviews.llvm.org/D21698 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: include/clang/Basic/DiagnosticSemaKinds.td:8127 "invalid prototype, variadic arguments are not allowed in OpenCL">; +def err_requires_extension : Error< + "use of %select{declaration|type }0%1 requires %2 extension to be

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 80422. yaxunl marked 6 inline comments as done. yaxunl added a comment. Bring the patch up to date. Revised by Anastasia's comments. https://reviews.llvm.org/D21698 Files: include/clang/Basic/DiagnosticParseKinds.td

[PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-12-06 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl marked 15 inline comments as done. yaxunl added a comment. Sorry for the delay. I will update this patch. Comment at: lib/Parse/ParsePragma.cpp:461 + }; + typedef std::pair OpenCLExtData; } Anastasia wrote: > yaxunl wrote: > > Anastasia wrote: > > >

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-21 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D21698#546733, @yaxunl wrote: > In https://reviews.llvm.org/D21698#540237, @Anastasia wrote: > > > I have made an experiment with a simple kernel: > > > > void foo1(void); > > void foo2(void); > > void foo3(void); > > void

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-19 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D21698#540237, @Anastasia wrote: > I have made an experiment with a simple kernel: > > void foo1(void); > void foo2(void); > void foo3(void); > void foo4(void); > void foo5(void); > void foo6(void); > void foo7(void); > void

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-12 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. I have made an experiment with a simple kernel: void foo1(void); void foo2(void); void foo3(void); void foo4(void); void foo5(void); void foo6(void); void foo7(void); void foo8(void); void foo9(void); void foo10(void); void test(){ foo1();

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Yaxun Liu via cfe-commits
yaxunl updated this revision to Diff 70738. yaxunl marked 5 inline comments as done. yaxunl added a comment. Revised by Anastasia's comments. https://reviews.llvm.org/D21698 Files: include/clang/Basic/DiagnosticParseKinds.td include/clang/Basic/DiagnosticSemaKinds.td

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Yaxun Liu via cfe-commits
yaxunl marked 8 inline comments as done. yaxunl added a comment. F2413912: ___10_Fiji.i F2413913: callgrind.out.20440 Uploaded the kernel used for profiling and the calgrind data. This kernel is dumped from the open source

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. In https://reviews.llvm.org/D21698#537156, @yaxunl wrote: > I did profiling with valgrind for the cost of checking disabled types and > declarations. For a typical program, time spent in checking disabled types > and declarations are less than 0.1%, so this cost can

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-08 Thread Yaxun Liu via cfe-commits
yaxunl added a comment. I did profiling with valgrind for the cost of checking disabled types and declarations. For a typical program, time spent in checking disabled types and declarations are less than 0.1%, so this cost can be ignored. https://reviews.llvm.org/D21698

Re: [PATCH] D21698: [OpenCL] Allow disabling types and declarations associated with extensions

2016-09-05 Thread Anastasia Stulova via cfe-commits
Anastasia requested changes to this revision. Anastasia added a comment. This revision now requires changes to proceed. Have you done any investigation regarding the compilation speed as this change adds expensive container lookups for all OpenCL declarations and function calls. It would be