[libc-commits] [libc] fbaaa16 - [libc] Add no_sanitize("address") attribute to the getMPFRMatcher function.

Siva Chandra via libc-commits libc-commits at lists.llvm.org
Tue May 5 13:37:07 PDT 2020


I submitted this without review to unblock the asan bot. Feel free to
suggest other ways to improve the run time.


On Tue, May 5, 2020 at 1:31 PM Siva Chandra Reddy via libc-commits <
libc-commits at lists.llvm.org> wrote:

>
> Author: Siva Chandra Reddy
> Date: 2020-05-05T13:30:30-07:00
> New Revision: fbaaa16802d7b2fc096c8ed5fa23e0cad56807a2
>
> URL:
> https://github.com/llvm/llvm-project/commit/fbaaa16802d7b2fc096c8ed5fa23e0cad56807a2
> DIFF:
> https://github.com/llvm/llvm-project/commit/fbaaa16802d7b2fc096c8ed5fa23e0cad56807a2.diff
>
> LOG: [libc] Add no_sanitize("address") attribute to the getMPFRMatcher
> function.
>
> This dramtically reduces the run time of tests. For example,
> sincosf_test takes over 25 minutes without this attribute but only 8
> seconds with this attribute.
>
> Added:
>
>
> Modified:
>     libc/utils/MPFRWrapper/MPFRUtils.h
>
> Removed:
>
>
>
>
> ################################################################################
> diff  --git a/libc/utils/MPFRWrapper/MPFRUtils.h
> b/libc/utils/MPFRWrapper/MPFRUtils.h
> index 31afd39b2895..6cdba34882d5 100644
> --- a/libc/utils/MPFRWrapper/MPFRUtils.h
> +++ b/libc/utils/MPFRWrapper/MPFRUtils.h
> @@ -73,6 +73,7 @@ template <typename T> class MPFRMatcher : public
> testing::Matcher<T> {
>  } // namespace internal
>
>  template <typename T>
> +__attribute__((no_sanitize("address")))
>  internal::MPFRMatcher<T> getMPFRMatcher(Operation op, T input, Tolerance
> t) {
>    static_assert(
>        __llvm_libc::cpp::IsFloatingPointType<T>::Value,
>
>
>
> _______________________________________________
> libc-commits mailing list
> libc-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/libc-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200505/c9aad508/attachment.html>


More information about the libc-commits mailing list