[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 144303. nik added a comment. Reduction to skip-in-preamble-only functionality. Repository: rC Clang https://reviews.llvm.org/D45815 Files: include/clang-c/Index.h include/clang/Frontend/ASTUnit.h lib/Frontend/ASTUnit.cpp

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-27 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D45815#1079327, @ilya-biryukov wrote: > > OK, I've rechecked this change. I don't see any obvious mistake :) > > I think I got to the bottom of it. We didn't expect a big win, because we > expect people to not put their non-template code into the

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-26 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov requested changes to this revision. ilya-biryukov added a comment. This revision now requires changes to proceed. > OK, I've rechecked this change. I don't see any obvious mistake :) I think I got to the bottom of it. We didn't expect a big win, because we expect people to not put

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-26 Thread Erik Verbruggen via Phabricator via cfe-commits
erikjv added a comment. About the timing testing: I'm not very familiar with boost, but it probably has a library that's using templates more than either LLVM or Qt. Maybe you can test one of those too? LGTM otherwise. Repository: rC Clang https://reviews.llvm.org/D45815

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-24 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik updated this revision to Diff 143738. nik marked 2 inline comments as done. nik added a comment. Herald added a subscriber: eraman. Addressed inline comments. Repository: rC Clang https://reviews.llvm.org/D45815 Files: include/clang-c/Index.h include/clang/Frontend/ASTUnit.h

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-24 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik marked 3 inline comments as done. nik added a comment. In https://reviews.llvm.org/D45815#1076434, @ilya-biryukov wrote: > In https://reviews.llvm.org/D45815#1073581, @nik wrote: > > > Hmm, that indicates that template function bodies are actually not that > > dominant, which I also haven't

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-24 Thread Ivan Donchevskii via Phabricator via cfe-commits
yvvan added inline comments. Comment at: include/clang/Frontend/ASTUnit.h:679 + struct SkipFunctionBodiesOptions { +SkipFunctionBodiesOptions() {} +enum { None, MainFileAndPreamble, Preamble } Scope = None; ilya-biryukov wrote: > Default ctor will be

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: include/clang/Frontend/ASTUnit.h:679 + struct SkipFunctionBodiesOptions { +SkipFunctionBodiesOptions() {} +enum { None, MainFileAndPreamble, Preamble } Scope = None; Default ctor will be generated

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-24 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D45815#1073581, @nik wrote: > Hmm, that indicates that template function bodies are actually not that > dominant, which I also haven't thought. Now I'm doubting the correctness of > my patch/tests. The numbers are definitely

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-20 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. In https://reviews.llvm.org/D45815#1073418, @ilya-biryukov wrote: > In https://reviews.llvm.org/D45815#1072094, @nik wrote: > > > @ilya: Using SkipFunctionBodies_AllExceptTemplates for the preamble might > > be also useful for clangd. > > > Unfortunately, that's also the

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-20 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. In https://reviews.llvm.org/D45815#1072094, @nik wrote: > @ilya: Using SkipFunctionBodies_AllExceptTemplates for the preamble might be > also useful for clangd. Unfortunately, that's also the biggest performance win you get when skipping the function bodies.

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-19 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik added a comment. @ilya: Using SkipFunctionBodies_AllExceptTemplates for the preamble might be also useful for clangd. Repository: rC Clang https://reviews.llvm.org/D45815 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D45815: [libclang] Add options to limit skipping of function bodies

2018-04-19 Thread Nikolai Kosjar via Phabricator via cfe-commits
nik created this revision. Herald added subscribers: cfe-commits, kbarton, nemanjai, klimek. As an addition to CXTranslationUnit_SkipFunctionBodies, provide the new options CXTranslationUnit_LimitSkipFunctionBodiesToPreamble CXTranslationUnit_LimitSkipFunctionBodiesToNonTemplates. The first