aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2016-01-20 10:53:56 -0800
committerRichard Henderson <rth@gcc.gnu.org>2016-01-20 10:53:56 -0800
commitb1de98e3d9e015c9260f44a8474001d822a0304d (patch)
treeee02bbe4cd51bf787e15f581e6326d4124f85230 /gcc/tree.c
parent7e10bcfa3c30f11136b60b5f6d25acb17afdd57f (diff)
downloadgcc-b1de98e3d9e015c9260f44a8474001d822a0304d.zip
gcc-b1de98e3d9e015c9260f44a8474001d822a0304d.tar.gz
gcc-b1de98e3d9e015c9260f44a8474001d822a0304d.tar.bz2
re PR target/69343 (Bootstrap failure on s390{,x}-linux)
PR bootstrap/69343 PR bootstrap/69339 PR tree-opt/68964 Revert: gcc/ * tree.c (tm_define_builtin): New. (find_tm_vector_type): New. (build_tm_vector_builtins): New. (build_common_builtin_nodes): Call it. libitm/ * Makefile.am (libitm_la_SOURCES) [ARCH_AARCH64]: Add vect128.cc (libitm_la_SOURCES) [ARCH_ARM]: Add neon.cc (libitm_la_SOURCES) [ARCH_PPC]: Add vect128.cc (libitm_la_SOURCES) [ARCH_S390]: Add vect128.cc * configure.ac (ARCH_AARCH64): New conditional. (ARCH_PPC, ARCH_S390): Likewise. * Makefile.in, configure: Rebuild. * libitm.h (_ITM_TYPE_M128): Always define. * vect64.cc: Split ... * vect128.cc: ... out of... * config/x86/x86_sse.cc: ... here. * config/arm/neon.cc: New file. From-SVN: r232631
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c138
1 files changed, 0 insertions, 138 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 4e54a7e..8fef0d1 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -10332,143 +10332,6 @@ local_define_builtin (const char *name, tree type, enum built_in_function code,
set_builtin_decl (code, decl, true);
}
-/* A subroutine of build_tm_vector_builtins. Define a builtin with
- all of the appropriate attributes. */
-static void
-tm_define_builtin (const char *name, tree type, built_in_function code,
- tree decl_attrs, tree type_attrs)
-{
- tree decl = add_builtin_function (name, type, code, BUILT_IN_NORMAL,
- name + strlen ("__builtin_"), decl_attrs);
- decl_attributes (&TREE_TYPE (decl), type_attrs, ATTR_FLAG_BUILT_IN);
- set_builtin_decl (code, decl, true);
-}
-
-/* A subroutine of build_tm_vector_builtins. Find a supported vector
- type VECTOR_BITS wide with inner mode ELEM_MODE. */
-static tree
-find_tm_vector_type (unsigned vector_bits, machine_mode elem_mode)
-{
- unsigned elem_bits = GET_MODE_BITSIZE (elem_mode);
- unsigned nunits = vector_bits / elem_bits;
-
- gcc_assert (elem_bits * nunits == vector_bits);
-
- machine_mode vector_mode = mode_for_vector (elem_mode, nunits);
- if (!VECTOR_MODE_P (vector_mode)
- || !targetm.vector_mode_supported_p (vector_mode))
- return NULL_TREE;
-
- tree innertype = lang_hooks.types.type_for_mode (elem_mode, 0);
- return build_vector_type_for_mode (innertype, vector_mode);
-}
-
-/* A subroutine of build_common_builtin_nodes. Define TM builtins for
- vector types. This is done after the target hook, so that the target
- has a chance to override these. */
-static void
-build_tm_vector_builtins (void)
-{
- tree vtype, pvtype, ftype, decl;
- tree attrs_load, attrs_type_load;
- tree attrs_store, attrs_type_store;
- tree attrs_log, attrs_type_log;
-
- /* Do nothing if TM is turned off, either with switch or
- not enabled in the language. */
- if (!flag_tm || !builtin_decl_explicit_p (BUILT_IN_TM_LOAD_1))
- return;
-
- /* Use whatever attributes a normal TM load has. */
- decl = builtin_decl_explicit (BUILT_IN_TM_LOAD_1);
- attrs_load = DECL_ATTRIBUTES (decl);
- attrs_type_load = TYPE_ATTRIBUTES (TREE_TYPE (decl));
- /* Use whatever attributes a normal TM store has. */
- decl = builtin_decl_explicit (BUILT_IN_TM_STORE_1);
- attrs_store = DECL_ATTRIBUTES (decl);
- attrs_type_store = TYPE_ATTRIBUTES (TREE_TYPE (decl));
- /* Use whatever attributes a normal TM log has. */
- decl = builtin_decl_explicit (BUILT_IN_TM_LOG);
- attrs_log = DECL_ATTRIBUTES (decl);
- attrs_type_log = TYPE_ATTRIBUTES (TREE_TYPE (decl));
-
- /* By default, 64 bit vectors go through the long long helpers. */
-
- /* If a 128-bit vector is supported, declare those builtins. */
- if (!builtin_decl_explicit_p (BUILT_IN_TM_STORE_M128)
- && ((vtype = find_tm_vector_type (128, SImode))
- || (vtype = find_tm_vector_type (128, SFmode))))
- {
- pvtype = build_pointer_type (vtype);
-
- ftype = build_function_type_list (void_type_node, pvtype, vtype, NULL);
- tm_define_builtin ("__builtin__ITM_WM128", ftype,
- BUILT_IN_TM_STORE_M128,
- attrs_store, attrs_type_store);
- tm_define_builtin ("__builtin__ITM_WaRM128", ftype,
- BUILT_IN_TM_STORE_WAR_M128,
- attrs_store, attrs_type_store);
- tm_define_builtin ("__builtin__ITM_WaWM128", ftype,
- BUILT_IN_TM_STORE_WAW_M128,
- attrs_store, attrs_type_store);
-
- ftype = build_function_type_list (vtype, pvtype, NULL);
- tm_define_builtin ("__builtin__ITM_RM128", ftype,
- BUILT_IN_TM_LOAD_M128,
- attrs_load, attrs_type_load);
- tm_define_builtin ("__builtin__ITM_RaRM128", ftype,
- BUILT_IN_TM_LOAD_RAR_M128,
- attrs_load, attrs_type_load);
- tm_define_builtin ("__builtin__ITM_RaWM128", ftype,
- BUILT_IN_TM_LOAD_RAW_M128,
- attrs_load, attrs_type_load);
- tm_define_builtin ("__builtin__ITM_RfWM128", ftype,
- BUILT_IN_TM_LOAD_RFW_M128,
- attrs_load, attrs_type_load);
-
- ftype = build_function_type_list (void_type_node, pvtype, NULL);
- tm_define_builtin ("__builtin__ITM_LM128", ftype,
- BUILT_IN_TM_LOG_M128, attrs_log, attrs_type_log);
- }
-
- /* If a 256-bit vector is supported, declare those builtins. */
- if (!builtin_decl_explicit_p (BUILT_IN_TM_STORE_M256)
- && ((vtype = find_tm_vector_type (256, SImode))
- || (vtype = find_tm_vector_type (256, SFmode))))
- {
- pvtype = build_pointer_type (vtype);
-
- ftype = build_function_type_list (void_type_node, pvtype, vtype, NULL);
- tm_define_builtin ("__builtin__ITM_WM256", ftype,
- BUILT_IN_TM_STORE_M256,
- attrs_store, attrs_type_store);
- tm_define_builtin ("__builtin__ITM_WaRM256", ftype,
- BUILT_IN_TM_STORE_WAR_M256,
- attrs_store, attrs_type_store);
- tm_define_builtin ("__builtin__ITM_WaWM256", ftype,
- BUILT_IN_TM_STORE_WAW_M256,
- attrs_store, attrs_type_store);
-
- ftype = build_function_type_list (vtype, pvtype, NULL);
- tm_define_builtin ("__builtin__ITM_RM256", ftype,
- BUILT_IN_TM_LOAD_M256,
- attrs_load, attrs_type_load);
- tm_define_builtin ("__builtin__ITM_RaRM256", ftype,
- BUILT_IN_TM_LOAD_RAR_M256,
- attrs_load, attrs_type_load);
- tm_define_builtin ("__builtin__ITM_RaWM256", ftype,
- BUILT_IN_TM_LOAD_RAW_M256,
- attrs_load, attrs_type_load);
- tm_define_builtin ("__builtin__ITM_RfWM256", ftype,
- BUILT_IN_TM_LOAD_RFW_M256,
- attrs_load, attrs_type_load);
-
- ftype = build_function_type_list (void_type_node, pvtype, NULL);
- tm_define_builtin ("__builtin__ITM_LM256", ftype,
- BUILT_IN_TM_LOG_M256, attrs_log, attrs_type_log);
- }
-}
-
/* Call this function after instantiating all builtins that the language
front end cares about. This will build the rest of the builtins
and internal functions that are relied upon by the tree optimizers and
@@ -10707,7 +10570,6 @@ build_common_builtin_nodes (void)
}
}
- build_tm_vector_builtins ();
init_internal_fns ();
}