Commit 98fb00bc authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'autotools-update' into 'master'

Autotools update

Adds `--disable-vec` option to add the following flags:

  - GCC: ` -fno-tree-vectorize`
  - ICC: `-no-vec -no-simd`
  - CLANG: `-fno-vectorize -fno-slp-vectorize"`

There is no `--enable-vec`, that is a noop.


See merge request !108
parents 769c0ddd 8ed2f29f
......@@ -216,6 +216,32 @@ if test "$enable_san" = "yes"; then
fi
fi
# Disable vectorisation for known compilers. This switches off optimizations
# that could be enabled above, so in general should be appended. Slightly odd
# implementation as want to describe as --disable-vec, but macro is enable
# (there is no enable action).
AC_ARG_ENABLE([vec],
[AS_HELP_STRING([--disable-vec],
[Disable vectorization]
)],
[enable_vec="$enableval"],
[enable_vec="yes"]
)
if test "$enable_vec" = "no"; then
if test "$ax_cv_c_compiler_vendor" = "intel"; then
CFLAGS="$CFLAGS -no-vec -no-simd"
AC_MSG_RESULT([disabled Intel vectorization])
elif test "$ax_cv_c_compiler_vendor" = "gnu"; then
CFLAGS="$CFLAGS -fno-tree-vectorize"
AC_MSG_RESULT([disabled GCC vectorization])
elif test "$ax_cv_c_compiler_vendor" = "clang"; then
CFLAGS="$CFLAGS -fno-vectorize -fno-slp-vectorize"
AC_MSG_RESULT([disabled clang vectorization])
else
AC_MSG_WARN([Do not know how to disable vectorization for this compiler])
fi
fi
# Autoconf stuff.
AC_PROG_INSTALL
AC_PROG_MAKE_SET
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment