[clang] [Clang][Inliner] Enable module-local optimizer hints by default (PR #238529)
Kuba Mracek via cfe-commits
cfe-commits at lists.llvm.org
Sat Nov 7 10:43:01 PST 2026
kubamracek wrote:
> show perf data on SPEC 2026 + other perf data
Performance data is the primary motivator here:
(1) SPEC 2026 for -O3. Some workloads produce identical binaries (no change from this PR), usually because the workload is plain C, but not always, there's cases of C++ codebases there too.
```
| CODE SIZE CHANGE | RUNTIME CHANGE |
| |(lower = better)|
--------------------------------------------------------------------------------------------------------------
706 | −512 B (−0.22%) | −0.51% ±0.1 | ✅ real gain, repeatable, attributed to a hot func getting inlined
707 | +3,200 B (+1.78%) | +0.49% ±0.7 | noise / layout effect, not repeatable
708 | identical binary
709 | identical binary
710 | −960 B (−0.03%) | −0.97% ±0.8 | ✅ real gain, repeatable, attributed to a hot func getting inlined
714 | identical binary
721 | −2,304 B (−0.01%) | −0.01% ±0.1 |
723 | −7,040 B (−0.03%) | −0.15% ±0.4 |
727 | −256 B (−0.01%) | −1.25% ±0.8 | noise / layout effect, not repeatable
729 | −576 B (−0.01%) | +0.09% ±0.1 |
731 | identical binary
734 | −2,496 B (−0.07%) | −2.96% ±0.3 | ✅ real gain, repeatable, attributed to a hot func getting inlined
735 | −704 B (−0.01%) | −0.00% ±1.1 |
736 | −7,040 B (−0.22%) | +0.05% ±0.1 |
737 | −1,728 B (−0.02%) | +0.10% ±0.1 |
748 | −128 B (−0.01%) | −1.50% ±0.4 | noise / layout effect, not repeatable
750 | identical binary
753 | −4,032 B (−0.03%) | −1.01% ±0.2 | noise / layout effect, not repeatable
766 | +40,128 B (+0.06%) | −0.08% ±0.1 |
767 | −1,152 B (−0.03%) | +0.20% ±0.5 |
772 | −2,304 B (−0.05%) | +0.09% ±0.3 |
777 | identical binary
782 | identical binary
```
(2) On top of SPEC, we have a separate large C++-heavy benchmark that shows significant gains. The gains are showing across the board there (one of the main patterns are locally used lambdas in templated code that is in .cpp files).
https://github.com/llvm/llvm-project/pull/238529
More information about the cfe-commits
mailing list