[llvm] [FuncSpec] Update MinFunctionSize logic (PR #112711)

Hari Limaye via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 17 07:08:27 PDT 2024


hazzlim wrote:

Reduces the O3 (non-LTO) compile-time of CTMark, measured by the metric of instruction count, when `SpecializeLiteralConstant` is enabled.

```
Benchmark        |  Specs  | Change  |
-----------------+---------+---------+
ClamAV           | 2 -> 2  | -0.01%  |
7zip             | 0 -> 0  |  0.00%  |
kimwitu++        | 0 -> 0  | -0.01%  |
tramp3d-v4       | 0 -> 0  |  0.00%  |
sqlite3          | 0 -> 0  |  0.00%  |
mafft            | 0 -> 0  |  0.00%  |
SPASS            | 1 -> 0  | -0.43%  |
lencod           | 3 -> 0  | -0.39%  |
consumer-typeset | 0 -> 0  | -0.02%  |
Bullet           | 0 -> 0  |  0.00%  |
-----------------+---------+---------+
GEOMEAN          |         | -0.09%  |
```

It has no impact on Release-LTOg builds (either with or without `SpecializeLiteralConstant`), as no specializations are performed.

This change is intended to allow us to enable `SpecializeLiteralConstant` by default, without impacting compile-time. 

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


More information about the llvm-commits mailing list