[all-commits] [llvm/llvm-project] cb3f8d: [Lexer] Speedup LexTokenInternal

serge-sans-paille via All-commits all-commits at lists.llvm.org
Wed Nov 16 06:57:56 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cb3f8d53e6c35e6538ccbb54fdd848de2b3d0d1e
      https://github.com/llvm/llvm-project/commit/cb3f8d53e6c35e6538ccbb54fdd848de2b3d0d1e
  Author: serge-sans-paille <sguelton at mozilla.com>
  Date:   2022-11-16 (Wed, 16 Nov 2022)

  Changed paths:
    M clang/include/clang/Lex/Token.h
    M clang/lib/Lex/Lexer.cpp

  Log Message:
  -----------
  [Lexer] Speedup LexTokenInternal

Only reset "NeedsCleaning" flag in case of re-entrant call.
Do not needlessly blank IdentifierInfo. This information will be set
once the token type is picked.

This yields a nice 1% speedup when pre-processing sqlite amalgamation
through:

valgrind --tool=callgrind ./bin/clang -E sqlite3.c -o/dev/null

Differential Revision: https://reviews.llvm.org/D137960




More information about the All-commits mailing list