[lld] [RISCV][LLD] Add RISCV zcmt optimise in linker relaxation (PR #77884)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 12 00:00:43 PST 2024


MaskRay wrote:

> Code size reduction | 0.14% | 0.08% | 0.15% | 0.22% | 0.19% | 0.38%

Thanks for the work measuring the impact. Global pointer relaxation seems to have a saving larger than this and needed a lot of discussions whether it was justified. The zcmt numbers seem smaller while the implementation is much heavier in assembler/linker and table jump seems to get questions on hardware side whether the little code size saving justifies probably significant performance overhead. I also heard that zcmt is incompatible with another extension. If the number is thus small, honestly I'd like to see real commitment from hardware vendors given the drawbacks, very small saving, and the large implementation complexity.

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


More information about the llvm-commits mailing list