[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
Tue Oct 8 18:21:04 PDT 2024
jhuber6 wrote:
> I'm confused about the unnecessary code. The writer's pretty small, even including the parts that are only used for the function pointer side. Could it be that the linking is slow? The proposed solution makes everything header-only, making it one large `.o` file whereas currently the writer and converter are separate objects.
Yes, the link step is very slow on AMDGPU and NVPTX as they're very sensitive to large SCC's in the optimizer (people love to put quadratic optimizations in there). Checking the IR before and after this patch, it's 7500 lines of IR versus 4500 respectively with a 2.5s link time versus a 0.5s link time.
That being said, I definitely see your concern because the CPU `libllvmlibc.a` went from 2.8 MB to 4.6 MB before and after. I'm going to guess like 95% of that is the long double table.
https://github.com/llvm/llvm-project/pull/111559
More information about the libc-commits
mailing list