From 85c2e6110c9a01ec817c30f1b7e20549d7229987 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Thu, 20 Jun 2013 19:40:55 -0500 Subject: Fix loop construction to functions calls Check wheter the compiler has the option -fno-tree-loop-distribute-patterns to inhibit loop transformation to library calls and uses it on memset and memmove default implementation to avoid recursive calls. --- benchtests/bench-memmove.c | 1 + benchtests/bench-memset.c | 1 + 2 files changed, 2 insertions(+) (limited to 'benchtests') diff --git a/benchtests/bench-memmove.c b/benchtests/bench-memmove.c index dccde5d14e..8925606af8 100644 --- a/benchtests/bench-memmove.c +++ b/benchtests/bench-memmove.c @@ -46,6 +46,7 @@ IMPL (memmove, 1) #endif char * +inhibit_loop_to_libcall simple_memmove (char *dst, const char *src, size_t n) { char *ret = dst; diff --git a/benchtests/bench-memset.c b/benchtests/bench-memset.c index 92e34f0d61..ea29cf37fc 100644 --- a/benchtests/bench-memset.c +++ b/benchtests/bench-memset.c @@ -63,6 +63,7 @@ builtin_memset (char *s, int c, size_t n) #endif char * +inhibit_loop_to_libcall simple_memset (char *s, int c, size_t n) { char *r = s, *end = s + n; -- cgit v1.2.1