[PATCH] D54547: PTH-- Remove feature entirely-

Vladimir Voskresensky via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 16 11:08:23 PST 2018


voskresensky.vladimir added a comment.

In https://reviews.llvm.org/D54547#1301359, @erichkeane wrote:

> > I thought clang-d service is using it to speed up indexing.
>
> Presumably, I could also just make PTH use another bit or two for the TokenID and it would work fine.  However, when I mentioned this on IRC the general response was that it is a 'failed experiment'.  In your use case, I wonder why you couldn't just use PCH and get even further performance improvements?


To be fair, I don't remember exactly. :-)
I remember we shared the same PTH for all C and C++ files and built some preprocessor-based features for incomplete code written in editor based on that.

Hmm... One more thing I had to fix was: lex in mode where we emit all preprocessor tokens there as well (like "#define MACRO A" => #, define, MACRO, A)

PHT was also used for rebuilding PCH, when something is changed. Because often single changed file can completely invalidate PCH, while PTH just contain pp-lexed tokens which doesn't carry semantic. So, PTHManager could skip providing tokens for changed file, but keep proved them for all other files.


https://reviews.llvm.org/D54547





More information about the cfe-commits mailing list