[PATCH] D127379: [Lex] Keep track of skipped preprocessor blocks and advance the lexer directly if they are revisited

Argyrios Kyrtzidis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 8 22:32:02 PDT 2022


akyrtzi created this revision.
Herald added a project: All.
akyrtzi requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This speeds up preprocessing, specifically for preprocessing the clang sources time is reduced by about -36%,
using measurements on M1Pro with a release+thinLTO build.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D127379

Files:
  clang/include/clang/Lex/Preprocessor.h
  clang/lib/Lex/PPDirectives.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127379.435427.patch
Type: text/x-patch
Size: 4618 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220609/09d90839/attachment.bin>


More information about the cfe-commits mailing list