hahnjo wrote:

### Performance measurements with LLVM

I tested these patches for building LLVM itself with modules 
(`LLVM_ENABLE_MODULES=ON`). To work around 
https://github.com/llvm/llvm-project/issues/130795, I apply 
https://github.com/llvm/llvm-project/pull/131354 before building Clang. In 
terms of overall performance for the entire build, I'm not able to measure a 
difference in memory consumption because that is dominated by the linker. The 
run time performance is very noisy, so it's hard to make accurate statements 
but it looks unaffected as well.

I did some measurements for individual files, chosen by searching for large 
object files and excluding generated files. For each version, I first build 
LLVM completely to populate the `module.cache` and then delete and rebuild only 
one object file. Run time performance is not hugely affected, it seems to get 
slightly faster with this PR.

`Maximum resident set size (kbytes)` from `/usr/bin/time -v`:
| object file | before* | `main` | this PR |
| --- | --- | --- | --- |
| `lib/Analysis/CMakeFiles/LLVMAnalysis.dir/ScalarEvolution.cpp.o` | 543100 | 
515184 | 445784 |
| `lib/Passes/CMakeFiles/LLVMPasses.dir/PassBuilder.cpp.o` | 923036 | 884160 | 
805960 |
| `lib/Transforms/IPO/CMakeFiles/LLVMipo.dir/AttributorAttributes.cpp.o` | 
639184 | 600076 | 522512 |
| `lib/Transforms/Vectorize/CMakeFiles/LLVMVectorize.dir/SLPVectorizer.cpp.o` | 
876580 | 857404 | 776572 |

before*: reverting fb2c9d940ad87e6ae09e06c6915e0c925a4f87ec, 
c5e4afe6733c58e24023ede04275bbed3bde8240, 
30ea0f0ce476bf4c12684a9a514af2ca660bbe44, 
20e904950967c125abc1e91f57e5a373987ff016 on current `main`

https://github.com/llvm/llvm-project/pull/133057
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to