[libc-commits] [libc] [libc] Template the writing mode for the writer class (PR #111559)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Wed Oct 9 13:45:58 PDT 2024
jhuber6 wrote:
Just for a simple call to `sprintf`, this patch has
VGPRs: 63
ScratchSize [bytes/lane]: 160
Dynamic Stack: False
Occupancy [waves/SIMD]: 16
Time to link 0.416s total
A version where I just deleted all the code associated with the other modes
VGPRs: 87
ScratchSize [bytes/lane]: 272
Dynamic Stack: False
Occupancy [waves/SIMD]: 10
Time to link 1.720s total
So this patch definitely does something to improve it, likely just running more optimizations on the conversion code. It's definitely unfortunate that it creates so much bloat because the tables are huge. The issue is that we're using templates on all the conversion functions, this is only necessary because it contains a writer which needs to know which callback to use. I wonder if there's some way to avoid the template directly on the conversion part, or to pull out part of it into a common implementation function.
https://github.com/llvm/llvm-project/pull/111559
More information about the libc-commits
mailing list