Simplify the range reduction steps by choosing the reduction constants
carefully so that the reduced arguments v = r*m_x - 1 and v^2 are exact in double
precision, even without FMA instructions, and -2^-8 <= v < 2^-7. This allows the
polynomial evaluations to be parallelized more efficiently.
Reviewed By: zimmermann6
Differential Revision: https://reviews.llvm.org/D147676
Fixes#59277 - The main part of that bug has already been addressed. This commit
just adds documentation.
Reviewed By: jeffbailey
Differential Revision: https://reviews.llvm.org/D146115
* Add various options so that it uses the build lld and compiler-rt
* Add instructions on how to use the newly built libc
* Remove trailing comments in code-block for cut and pastability
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D145878
The entrypoint has been added to the various entrypoint lists. The libc
code style doc has been updated with information on how errno should be
set from the libc runtime code.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D145179
Add bazel targets and unit tests for single precision exponential,
logarithm, trigonometric, inverse trig, hyperbolic, and inverse hyperbolic
functions.
Reviewed By: sivachandra
Differential Revision: https://reviews.llvm.org/D143275
These were using ” ("right double quotation mark") instead of
the usual ". This means CMake took the value literally and you
got:
```
CMake Error at CMakeLists.txt:139 (MESSAGE):
”libc” isn't a known project:
bolt;clang;clang-tools-extra;compiler-rt;cross-project-tests;libc;libclc;lld;lldb;mlir;openmp;polly;pstl;flang.
Did you mean to enable it as a runtime in LLVM_ENABLE_RUNTIMES?
```
`="libc"` works fine.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D143254
This is the first of patches doing similar cleanup. A section in the
code style doc has been added explaining where and how LIBC_INLINE is to
be used.
Reviewed By: jeffbailey, lntue
Differential Revision: https://reviews.llvm.org/D142434
Implement double precision log10 function correctly rounded for all
rounding modes. This implementation currently needs FMA instructions for
correctness.
Use 2 passes:
Fast pass:
- 1 step range reduction with a lookup table of `2^7 = 128` elements to reduce the ranges to `[-2^-7, 2^-7]`.
- Use a degree-7 minimax polynomial generated by Sollya, evaluated using a mixed of double-double and double precisions.
- Apply Ziv's test for accuracy.
Accurate pass:
- Apply 5 more range reduction steps to reduce the ranges further to [-2^-27, 2^-27].
- Use a degree-4 minimax polynomial generated by Sollya, evaluated using 192-bit precisions.
- By the result of Lefevre (add quote), this is more than enough for correct rounding to all rounding modes.
In progress: Adding detail documentations about the algorithm.
Depend on: https://reviews.llvm.org/D136799
Reviewed By: zimmermann6
Differential Revision: https://reviews.llvm.org/D139846
One should be able to do a cross build of the libc now. For example, using
clang on a x86_64 linux host, one can build for an aarch64 linux target by
specifying -DLIBC_TARGET_TRIPLE=aarch64-linux-gnu.
Follow up changes will add a baremetal config and also appropriate
documentation about cross compiling the libc for CPU targets.
Reviewed By: jhuber6
Differential Revision: https://reviews.llvm.org/D140351
This patch introduces documentation for the new GPU mode added in
D138608. The documentation includes instructions for building and using
the library, along with a description of the supported functions and
headers.
Reviewed By: sivachandra, lntue, michaelrj
Differential Revision: https://reviews.llvm.org/D138856
Implement gettimeofday per
.../onlinepubs/9699919799/functions/gettimeofday.html.
This call clock_gettime to implement gettimeofday function.
Tested:
Limited unit test: This makes a call and checks that no error was
returned. Used nanosleep for 100 microseconds and verfified it
returns a value that elapses more than 100 microseconds and less
than 300 microseconds.
Co-authored-by: Jeff Bailey <jeffbailey@google.com>
Differential Revision: https://reviews.llvm.org/D137881
The difftime function computes the difference between two calendar
times: time1 - time0 as per as per 7.27.2.2 section in
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2478.pdf.
double difftime(time_t time1, time_t time0);
Tested:
Unit tests
Co-authored-by: Jeff Bailey <jeffbailey@google.com>
Reviewed By: jeffbailey
Differential Revision: https://reviews.llvm.org/D136631
Switch from green checkmarks to the following legend:
X = x86_64
A = aarch64
a = arm32
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D136020
* Make consistent heading names
* Factor out |check| into an include for reuse
* Use it everywhere (No more YES or UTF-8)
* Remove unneeded summary from pages. People know why they're there.
* Ensure source location headers everywhere.
Differential Revision: https://reviews.llvm.org/D136016