String to float uses the Eisel-Lemire algorithm for better performance
in most cases, however this requires a very large table. Some
configurations, such as embedded devices, don't care about speed as much
as code size. This patch adds a flag to disable the Eisel-Lemire
algorithm as well as other code size savings for string to float.
Details
- Reviewers
sivachandra lntue
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
The flag name is TBD, I picked LIBC_SIZE because it would be obvious what it was being used for, but it doesn't seem like a good long-term solution.
Could I have instead a custom entrypoints.txt file with an adapted symbols list for my embedded target? Then I can mix and match..
In src/stdlib maybe, add a README.md which describes the new knob this patch is adding.
libc/src/__support/str_to_float.h | ||
---|---|---|
81 | Use a more specific flag name. Also, instead of excluding large blocks of code, move this to a separate header file and conditionally include it. | |
592–613 | Can this block be moved in to a function by itself and invoked conditionally? | |
libc/test/src/__support/str_to_float_test.cpp | ||
17 | Instead of conditional exclusion, move them to a more focused test. |
Use a more specific flag name. Also, instead of excluding large blocks of code, move this to a separate header file and conditionally include it.