[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

Nikita Popov via cfe-commits cfe-commits at lists.llvm.org
Fri Mar 21 14:08:40 PDT 2025


nikic wrote:

> clang/lib/CodeGen/CGBuiltin.cpp is over 1MB long (>23k LoC), and can take minutes to recompile (depending on compiler and host system) when modified, and 5 seconds for clangd to update for every edit. Splitting this file was discussed in this thread:

It looks like while this makes the individual files somewhat faster to compile, it makes the total time to compile all them *much* higher, by a factor of more than 3. It adds 1% to the clang build time.

Maybe all the files are including some unusually expensive header or something?

https://github.com/llvm/llvm-project/pull/132252


More information about the cfe-commits mailing list