This is an archive of the discontinued LLVM Phabricator instance.

[libc] add performance options for string to float
ClosedPublic

Authored by michaelrj on Oct 21 2022, 1:59 PM.

Details

Summary

This allows the client to set compile flags to disable the passes that
the string to float function uses. A client may be willing to trade off
performance for a reduction in code size, and this allows for that
fine-tuning.

Diff Detail

Event Timeline

michaelrj created this revision.Oct 21 2022, 1:59 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 21 2022, 1:59 PM
michaelrj requested review of this revision.Oct 21 2022, 1:59 PM
sivachandra accepted this revision.Oct 24 2022, 9:35 AM
sivachandra added inline comments.
libc/src/__support/str_to_float.h
214–215

Why did this and the above changes, which look like just formatting changes, happen?

610

Why should this be a conditional also?

This revision is now accepted and ready to land.Oct 24 2022, 9:35 AM
michaelrj marked an inline comment as done.Oct 24 2022, 10:15 AM
michaelrj added inline comments.
libc/src/__support/str_to_float.h
214–215

Previous patches must've forgotten to format the file. I didn't touch these manually, they came from running clang-format.

610

It's mostly there for my own performance testing, but could also be used for cases where speed is preferred over accuracy.

This revision was landed with ongoing or failed builds.Oct 24 2022, 11:36 AM
This revision was automatically updated to reflect the committed changes.
michaelrj marked an inline comment as done.