From d5ebecb32a3c36f66f18e96ba655ff1e14a8895a Mon Sep 17 00:00:00 2001
From: "Peter W. Draper" <p.w.draper@durham.ac.uk>
Date: Mon, 14 Nov 2016 15:36:31 +0000
Subject: [PATCH] Add -funroll-loops as a standard GCC optimization

SWIFT is faster with this
---
 m4/ax_cc_maxopt.m4 | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/m4/ax_cc_maxopt.m4 b/m4/ax_cc_maxopt.m4
index d5b87c903c..93d5d6dcd7 100644
--- a/m4/ax_cc_maxopt.m4
+++ b/m4/ax_cc_maxopt.m4
@@ -160,6 +160,9 @@ if test "$ac_test_CFLAGS" != "set"; then
      # note that we enable "unsafe" fp optimization with other compilers, too
      AX_CHECK_COMPILE_FLAG(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
 
+     # not all codes will benefit from this.
+     AX_CHECK_COMPILE_FLAG(-funroll-loops, CFLAGS="$CFLAGS -funroll-loops")
+
      AX_GCC_ARCHFLAG($acx_maxopt_portable)
      ;;
 
-- 
GitLab