[libc-commits] [PATCH] D115608: [libc] Add documentation about how to add a math function to LLVM-libc.
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Thu Dec 16 00:12:15 PST 2021
sivachandra added inline comments.
================
Comment at: libc/src/math/docs/add_math_function.md:28
+added to the following locations:
+
+- Add `add_math_entrypoint_object(func)` to:
----------------
In the below example, put `func` in angle brackets like `<func>` to indicate that it is the variable.
================
Comment at: libc/src/math/docs/add_math_function.md:70
+there are two special macros `ASSERT_MPFR_MATCH` and `EXPECT_MPFR_MATCH` to
+compare your outputs with the corresponding MPFR function. In order for your new function to be supported by these two macros, the following files will need to
+be updated:
----------------
Line length.
================
Comment at: libc/src/math/docs/add_math_function.md:116
+
+Performance tests compare your function's implementation with the default
+implementation (glibc).
----------------
s/default implementation (glibc)/system libc implementation (which very often is glibc).
================
Comment at: libc/src/math/docs/add_math_function.md:121
+```
+ libc/test/src/math/differential_testing/func_perf.cpp
+```
----------------
s/`func_perf.cpp`/`<func>_perf.cpp`
================
Comment at: libc/src/math/docs/add_math_function.md:152
+
+- Build only `libm`:
+```
----------------
We don't do `libm` anymore.
================
Comment at: libc/src/math/docs/add_math_function.md:163
+- Build and Run a specific unit test:
+```
+ $ ninja libc.test.src.math.func_test
----------------
Replace `func_test` with `<func>_test` below.
================
Comment at: libc/src/math/docs/add_math_function.md:170
+```
+ $ ninja libc.test.src.math.exhaustive.func_test
+```
----------------
This does not run the test.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D115608/new/
https://reviews.llvm.org/D115608
More information about the libc-commits
mailing list