[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG067ffbfe6018: [clangd] Introduce ProjectAwareIndex (authored by kadircet). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-22 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 306924. kadircet marked an inline comment as done. kadircet added a comment. - Address comments Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90750/new/ https://reviews.llvm.org/D90750 Files: clang-tools-ex

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-20 Thread Sam McCall via Phabricator via cfe-commits
sammccall accepted this revision. sammccall added inline comments. This revision is now accepted and ready to land. Comment at: clang-tools-extra/clangd/Config.h:95 + static inline ExternalIndexSpec getEmptyKey() { +static ExternalIndexSpec E{ExternalIndexSpec::File, "", ""}

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-20 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 306615. kadircet marked 6 inline comments as done. kadircet added a comment. - Internalize synchronization of indexstorage rather than using Memoize Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90750/new/ htt

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-19 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clang-tools-extra/clangd/Config.h:88 +inline bool operator<(const Config::ExternalIndexSpec &LHS, + const Config::ExternalIndexSpec &RHS) { Maybe we could use DenseMap instead? Defining an order

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-19 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added a comment. ping :) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90750/new/ https://reviews.llvm.org/D90750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet added inline comments. Comment at: clang-tools-extra/clangd/index/ProjectAware.cpp:100 + }); + addIndex(std::move(NewIndex)); + return PlaceHolder; sammccall wrote: > from memoize: > > > Concurrent calls for the same key may r

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-17 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 305695. kadircet marked 5 inline comments as done. kadircet added a comment. - Address comments - Only query the associated index - Use ExternalIndexSpec as the cache key Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. This looks really sensible to me! Nice you managed to reuse Memoize, there's very little ugly caching/locking left. Comment at: clang-tools-extra/clangd/index/ProjectAware.cpp:81 +return IndexForProject.get( +External.Location, [Server =

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-13 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. In D90750#2378987 , @kadircet wrote: > The index has the following query semantics: Rehashing offline conversation: - These heuristics mostly amount to guessing which high-level operation is being performed. It's a non-obvious

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-12 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 304795. kadircet added a comment. - Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90750/new/ https://reviews.llvm.org/D90750 Files: clang-tools-extra/clangd/CMakeLists.txt clang-tools-extra/clangd/

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-06 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet updated this revision to Diff 303442. kadircet added a comment. The index has the following query semantics: - Lookup: it only queries the associated index. This is to not regress latency for operations like Hover and Go-To. - FuzzyFind only queries the associated index when RestrictF

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet planned changes to this revision. kadircet added a comment. This is a WIP patch. Provided as a way to demonstrate how `ExternalBlock` will be used in an index implementation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D90750/new/ https:

[PATCH] D90750: [clangd] Introduce ProjectAwareIndex

2020-11-04 Thread Kadir Cetinkaya via Phabricator via cfe-commits
kadircet created this revision. kadircet added a reviewer: sammccall. Herald added subscribers: cfe-commits, usaxena95, arphaman, mgorny. Herald added a project: clang. kadircet requested review of this revision. Herald added subscribers: MaskRay, ilya-biryukov. An index implementation that can di