[clang] [llvm] [Support] Make format_object non-virtual (PR #206319)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Sun Jun 28 12:07:52 PDT 2026
MaskRay wrote:
Nerd sniped here.... Nice work. Compiled llvm/tools/llvm-readobj/ELFDumper.cpp twice with `-O3 -DNDEBUG -fno-rtti -ffunction-sections -fdata-sections -fPIC`
| Metric | Before | After | Δ |
|---|---|---|---|
| `format_object<…>` vtables | 20 | 0 | −20 |
| `.data.rel.ro` from those vtables | 640 B | 0 B | −640 B |
| `size(1)` data section | 15720 | 15080 | −640 B (confirms) |
| Relocations in `.data.rel.ro` | 1600 | 1560 | −40 |
| Total static relocations | 32027 | 31995 | −32 (net) |
| `.text` | 1432521 | 1432510 | −11 B (flat) |
| `.o` on disk | 2,740,784 | 2,735,312 | −5,472 B |
https://github.com/llvm/llvm-project/pull/206319
More information about the cfe-commits
mailing list