[PATCH] D134942: [Lex] Simplify and cleanup the updateConsecutiveMacroArgTokens implementation.

Nick Desaulniers via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 30 15:10:49 PDT 2022


nickdesaulniers added a comment.

In D134942#3827216 <https://reviews.llvm.org/D134942#3827216>, @hokein wrote:

> Some more perf data on building linux kernel (x86_64)
>
> before: getFileID 2.4% (1.10% on `getFileIDSlow`)
> after: getFileID 2.35% (1.05% on `getFileIDSlow`)

What compiler was used as the bootstrap?

For me bootstrapping w/ clang, I observed:

  Before:
  +    2.11%  clang-15                           [.] clang::SourceManager::getFileIDLocal
  After:
  +    2.01%  clang-15                           [.] clang::SourceManager::getFileIDLocal

I can test again bootstrapping with gcc.

This is such a small improvement that I'm tempted to say "look elsewhere." But it is an improvement in the hottest method, and gets rid of that awful magic constant 50. It might take a few refactorings to get this method out of the top spot of profiles.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D134942/new/

https://reviews.llvm.org/D134942



More information about the cfe-commits mailing list