aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2025-04-28 12:23:42 -0700
committerGitHub <noreply@github.com>2025-04-28 12:23:42 -0700
commit95795ab7dc3029e64e0a0a7893b95f4bfab667f1 (patch)
tree6105f223e73711bd22d0ee4cdbf0cdbe1d7b644d /clang/lib/Frontend/CompilerInvocation.cpp
parent9124e963a3bf73fd7430a17535d638601be5630f (diff)
downloadllvm-95795ab7dc3029e64e0a0a7893b95f4bfab667f1.zip
llvm-95795ab7dc3029e64e0a0a7893b95f4bfab667f1.tar.gz
llvm-95795ab7dc3029e64e0a0a7893b95f4bfab667f1.tar.bz2
Linker: Remove dropTriviallyDeadConstantArrays().
By calling this function after every link, we introduce quadratic behavior during full LTO links that primarily affects links involving large numbers of constant arrays, such as the full LTO part of a ThinLTO link which will involve large numbers of vtable constants. Removing this call resulted in a 1.3x speedup in the indexing phase of a large internal Google binary. This call was originally introduced to reduce memory consumption during full LTO (see commit dab999d54f39af3ebb6a23e850dbc9742016fac8), but it doesn't seem to be the case that this helps any more. I ran 3 stage2 links of clang with full LTO and ThinLTO with and without this change and measured the max RSS. The results were as follows (all in KB): ``` FullLTO before 22362512 22383524 22387456 after 22383496 22365356 22364352 ThinLTO before 4391404 4478192 4383468 after 4399220 4363100 4417688 ``` As you can see, any max RSS differences are in the noise. Reviewers: nikic, teresajohnson Reviewed By: teresajohnson, nikic Pull Request: https://github.com/llvm/llvm-project/pull/137081
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions