This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE340604: [clangd] Speculative code completion index request
before Sema is run. (authored by ioeric, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D50962?vs=162356&id=162358#toc
Re
ioeric updated this revision to Diff 162356.
ioeric added a comment.
- add doc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/TUScheduler.h
clangd/index/I
ilya-biryukov accepted this revision.
ilya-biryukov added a comment.
This revision is now accepted and ready to land.
LG, thanks. And two small NITs.
Comment at: clangd/CodeComplete.h:184
+llvm::Expected
+speculateCompletionFilter(llvm::StringRef Content, Position Pos);
+
-
ioeric updated this revision to Diff 162355.
ioeric added a comment.
- moved SpecReq into CodeComplete.cpp
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/TU
ioeric updated this revision to Diff 162351.
ioeric added a comment.
- fix doc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/TUScheduler.h
clangd/index/I
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.h:187
+/// A speculative and asynchronous fuzzy find index request (based on cached
+/// request) that can be before parsing sema. This would reduce completion
+/// latency if the speculation succeeds.
-
ilya-biryukov added inline comments.
Comment at: clangd/CodeComplete.h:187
+/// A speculative and asynchronous fuzzy find index request (based on cached
+/// request) that can be before parsing sema. This would reduce completion
+/// latency if the speculation succeeds.
-
ioeric updated this revision to Diff 162348.
ioeric marked 5 inline comments as done.
ioeric added a comment.
- Merge remote-tracking branch 'origin/master' into speculate-index
- address comments.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServe
ilya-biryukov added inline comments.
Comment at: clangd/ClangdServer.cpp:159
+ }
+ if (SpecFuzzyReq) {
+if (auto Filter = speculateCompletionFilter(Content, Pos)) {
ioeric wrote:
> ilya-biryukov wrote:
> > NIT: maybe invert condition to reduce nesting?
> It
ioeric updated this revision to Diff 162335.
ioeric added a comment.
- fix typos..
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/TUScheduler.h
clangd/ind
ioeric updated this revision to Diff 162224.
ioeric added a comment.
- another minior cleanup
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/TUScheduler.h
ioeric added inline comments.
Comment at: clangd/ClangdServer.cpp:159
+ }
+ if (SpecFuzzyReq) {
+if (auto Filter = speculateCompletionFilter(Content, Pos)) {
ilya-biryukov wrote:
> NIT: maybe invert condition to reduce nesting?
It would become something lik
ioeric updated this revision to Diff 16.
ioeric added a comment.
- minor cleanup
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/TUScheduler.h
clangd/i
ioeric updated this revision to Diff 162221.
ioeric marked 5 inline comments as done.
ioeric added a comment.
Herald added subscribers: jfb, javed.absar.
- Moved most logic into CodeComplete.cc
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cp
ilya-biryukov added a comment.
Really excited about this one, this should give us decent latency improvements
when using the static index.
My main suggestion would be to put almost all of the speculating code into
`CodeComplete.cpp`.
We could merely return the request that should be used for sp
ioeric updated this revision to Diff 161937.
ioeric added a comment.
- minor cleanup.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/CodeComplete.cpp
clangd/CodeComplete.h
clangd/index/Index.cpp
clang
ioeric added inline comments.
Comment at: unittests/clangd/CodeCompleteTests.cpp:1710
+ $bol^
+ ab$ab^
+ x.ab$dot^
kadircet wrote:
> Maybe an EXPECT for this one as well?
Nice catch!
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/
ioeric updated this revision to Diff 161651.
ioeric marked an inline comment as done.
ioeric added a comment.
- Improve tests.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/ClangdServer.h
clangd/CodeComplete.cpp
clangd/CodeCo
kadircet added inline comments.
Comment at: unittests/clangd/CodeCompleteTests.cpp:1710
+ $bol^
+ ab$ab^
+ x.ab$dot^
Maybe an EXPECT for this one as well?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
__
ioeric updated this revision to Diff 161537.
ioeric added a comment.
- Make sure completion result callback can be called even if the unused
speculative request has not finished.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D50962
Files:
clangd/ClangdServer.cpp
clangd/Cla
ioeric planned changes to this revision.
ioeric added a comment.
I just realized that `CodeCompleteFlow` would be blocked by the speculative
index request even when index request is not needed (e.g. member access),
because it owns the future object. This can make some completion requests
slower
ioeric created this revision.
ioeric added reviewers: hokein, ilya-biryukov.
Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay.
For index-based code completion, send an asynchronous speculative index
request, based on the index request for the last code completion on the
22 matches
Mail list logo