[all-commits] [llvm/llvm-project] 11c1d8: [Lex] Bring back the magic number 50 in updateCons...

Haojian Wu via All-commits all-commits at lists.llvm.org
Wed Oct 26 03:07:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 11c1d8b7fd82b32b37db47bcd8eac813b9667b5c
      https://github.com/llvm/llvm-project/commit/11c1d8b7fd82b32b37db47bcd8eac813b9667b5c
  Author: Haojian Wu <hokein.wu at gmail.com>
  Date:   2022-10-26 (Wed, 26 Oct 2022)

  Changed paths:
    M clang/lib/Lex/TokenLexer.cpp
    A clang/test/Lexer/update_consecutive_macro_address_space.c

  Log Message:
  -----------
  [Lex] Bring back the magic number 50 in updateConsecutiveMacroArgTokens.

This patch is a reland of 74e4f778cf16cbf7163b5c6de6027a43f5e9169f and
f83347b0bedb22ea676861c8e4e2ed9c31371ade with the removed 50 trick back.

The magic number 50 was removed in D134942, as a behavior change for
performance reason.

While it reduces the number of SLocEntry, it increases the usage of
SourceLocation address space usage, which is critical for compiling
large TU.

This fixes a regression caused in D134942 -- clang failed to compile one of
our internal files, complaining the file is too large to process because clang
runs out of source location space (we spend 40% more address space!)

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




More information about the All-commits mailing list