summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorshyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-15 02:35:19 +0000
committershyouhei <shyouhei@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-15 02:35:19 +0000
commitdf9a70900a7380bc9b42b12ab90cf182988bcd45 (patch)
treec0a4bf7a1b4a3819490ec9ef85296298578a1685 /configure.ac
parent39cfa67b4f56e0c79afb352b1e9bf5c914b774ca (diff)
__builtin_alloca_with_align for optimal memory access
ALLOCA_N takes type arugment. It is natural that the returned value to be used as an array of type, thus type-aligned. Luckily GCC has a builtin to tell compiler such alignment info. This should generate beter instructions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61830 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac1
1 files changed, 1 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e5be5a778e..93341fc777 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2493,6 +2493,7 @@ AC_CACHE_CHECK([for $1], AS_TR_SH(rb_cv_builtin_$1),
AS_IF([test "${AS_TR_SH(rb_cv_builtin_$1)}" != no], [
AC_DEFINE(AS_TR_CPP(HAVE_BUILTIN_$1))
])])
+RUBY_CHECK_BUILTIN_FUNC(__builtin_alloca_with_align, [__builtin_alloca_with_align(1, 4096)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_assume_aligned, [__builtin_assume_aligned((void*)32, 32)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap16, [__builtin_bswap16(0)])
RUBY_CHECK_BUILTIN_FUNC(__builtin_bswap32, [__builtin_bswap32(0)])