commit | 95795ab7dc3029e64e0a0a7893b95f4bfab667f1 | [log] [tgz] |
---|---|---|
author | Peter Collingbourne <peter@pcc.me.uk> | Mon Apr 28 12:23:42 2025 -0700 |
committer | GitHub <noreply@github.com> | Mon Apr 28 12:23:42 2025 -0700 |
tree | 6105f223e73711bd22d0ee4cdbf0cdbe1d7b644d | |
parent | 9124e963a3bf73fd7430a17535d638601be5630f [diff] |
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
Welcome to the LLVM project!
This repository contains the source code for LLVM, a toolkit for the construction of highly optimized compilers, optimizers, and run-time environments.
The LLVM project has multiple components. The core of the project is itself called “LLVM”. This contains all of the tools, libraries, and header files needed to process intermediate representations and convert them into object files. Tools include an assembler, disassembler, bitcode analyzer, and bitcode optimizer.
C-like languages use the Clang frontend. This component compiles C, C++, Objective-C, and Objective-C++ code into LLVM bitcode -- and from there into object files, using LLVM.
Other components include: the libc++ C++ standard library, the LLD linker, and more.
Consult the Getting Started with LLVM page for information on building and running LLVM.
For information on how to contribute to the LLVM project, please take a look at the Contributing to LLVM guide.
Join the LLVM Discourse forums, Discord chat, LLVM Office Hours or Regular sync-ups.
The LLVM project has adopted a code of conduct for participants to all modes of communication within the project.