Issue 202616
Summary [Meta] Reduce LLVM tool binary size without removing functionality
Labels new issue
Assignees
Reporter dzbarsky
    This issue tracks a workstream to reduce the size of LLVM tool binaries without removing tools, targets, features, or supported behavior.

The patches are intended to remain independently reviewable and performance-neutral. The main techniques include:

- packing generated tables and core data layouts where field ranges permit narrower representations;
- pooling repeated strings, masks, descriptors, instruction metadata, and generated table rows;
- outlining duplicate template and AST visitor implementations;
- retaining direct or constant-time lookup behavior where it matters;
- measuring affected standalone tools as well as the downstream all-tools multicall binary;
- adding compile-time assertions for core type layouts and narrowed field limits;
- validating with existing LLVM tests, byte-for-byte output comparisons, exhaustive generated-table reconstruction where applicable, and focused performance benchmarks.

On a downstream Darwin arm64 release build, the cumulative work completed so far reduces the all-tools multicall binary from 187,395,664 bytes to 161,283,216 bytes, a reduction of 26,112,448 bytes (about 13.9%). Individual upstream pull requests are measured independently against appropriate baselines; their reported deltas should not be summed directly because composition, alignment, and linker folding affect the aggregate result.

This issue tracks the independently reviewable patches in that workstream and future opportunities discovered while profiling generated code and metadata. A categorized checklist will be maintained here as draft pull requests are published for review.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to