diff options
author | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-08 01:31:43 +0000 |
---|---|---|
committer | aldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-08 01:31:43 +0000 |
commit | 54f3f029d816c6d1626310649adfda740e203f7b (patch) | |
tree | 2385720eb068f83c3bcfa0ac48ca6e2a6eef55d8 /gcc | |
parent | 7451993548db0d3b9c654e9a80e954cf497b79c3 (diff) | |
download | gcc-54f3f029d816c6d1626310649adfda740e203f7b.tar.gz |
* Fix leading tabs and trailing whitespace throughout entire
branch.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/transactional-memory@181146 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
54 files changed, 663 insertions, 663 deletions
diff --git a/gcc/ChangeLog.tm b/gcc/ChangeLog.tm index 259574ea04e..4ac30eb4b7f 100644 --- a/gcc/ChangeLog.tm +++ b/gcc/ChangeLog.tm @@ -47,7 +47,7 @@ 2011-11-05 Aldy Hernandez <aldyh@redhat.com> - * trans-mem.c (ipa_tm_insert_gettmclone_call): Remove call to + * trans-mem.c (ipa_tm_insert_gettmclone_call): Remove call to gimple_call_set_noinline_p. * gimple.h (enum gf_mask): Remove GF_CALL_NOINLINE. (gimple_call_noinline_p): Remove. @@ -238,7 +238,7 @@ * cp/semantics.c (begin_transaction_stmt): Add flags parameter. * cp/cp-tree.h: Same. * cp/pt.c (tsubst_expr): Same. - + * testsuite/c-c++-common/tm/*: Adjust for new syntax. * testsuite/g++.dg/tm/*: Same. * testsuite/gcc.dg/tm/*: Same. @@ -333,7 +333,7 @@ 2011-02-03 Andrew MacLeod <amacleod@redhat.com> PR/46567 - * trans-mem.c (ipa_tm_propagate_irr): Don't reprocess blocks + * trans-mem.c (ipa_tm_propagate_irr): Don't reprocess blocks already in the old irrevocable list. 2011-02-03 Aldy Hernandez <aldyh@redhat.com> @@ -386,10 +386,10 @@ 2011-01-28 Andrew MacLeod <amacleod@redhat.com> - PR/46567 + PR/46567 * gimple-pretty-print (dump_gimple_call): Don't check in_transaction. * trans-mem.c (examine_call_tm): Remove gimple_call_set_in_transaction. - (get_tm_region_blocks): Add new parameter for returning all blocks in + (get_tm_region_blocks): Add new parameter for returning all blocks in transactions. (execute_tm_mark, expand_regions_1, execute_tm_memopt): Add extra parameter to call. @@ -494,14 +494,14 @@ 2010-12-13 Aldy Hernandez <aldyh@redhat.com> PR/45940 - * tree.h: Remove prototypes for is_tm_callable, is_tm_irrevocable. + * tree.h: Remove prototypes for is_tm_callable, is_tm_irrevocable. (is_tm_safe_or_pure): New. - * trans-mem.c (is_tm_irrevocable): Make static. - (is_tm_callable): Same. - (diagnose_tm_1): Use is_tm_safe_or_pure. - (ipa_tm_note_irrevocable): Same. - (ipa_tm_mayenterirr_function): Same. - (ipa_tm_execute): Same. + * trans-mem.c (is_tm_irrevocable): Make static. + (is_tm_callable): Same. + (diagnose_tm_1): Use is_tm_safe_or_pure. + (ipa_tm_note_irrevocable): Same. + (ipa_tm_mayenterirr_function): Same. + (ipa_tm_execute): Same. (diagnose_tm_blocks): Change is_tm_safe to is_tm_safe_or_pure. * integrate.c (function_attribute_inlinable_p): Do not inline TM pure functions. @@ -1273,7 +1273,7 @@ ipa_tm_transform_tm_atomic. * gimple.h: Rename GTMA_MUST_CALL_IRREVOKABLE into GTMA_DOES_GO_IRREVOKABLE. - + 2009-07-23 Aldy Hernandez <aldyh@redhat.com> * gimple-pretty-print.c (dump_gimple_tm_atomic_subcode): Add space @@ -1601,7 +1601,7 @@ ipa_tm_scan_irr_block, ipa_tm_scan_irr_blocks, ipa_tm_propagate_irr, ipa_tm_decrement_clone_counts, ipa_tm_scan_irr_function, ipa_tm_region_init, ipa_tm_mark_for_rename, ipa_tm_insert_irr_call, - ipa_tm_transform_calls, ipa_tm_transform_tm_atomic, + ipa_tm_transform_calls, ipa_tm_transform_tm_atomic, ipa_tm_transform_clone): New. (ipa_tm_create_version): Don't use cgraph_function_versioning. (ipa_tm_execute): Rewrite. @@ -1771,7 +1771,7 @@ ADDR_EXPR. (add_tm_call_ops): New. (maybe_add_call_clobbered_vops): Use it. - (add_all_call_clobber_ops): Split out from ... + (add_all_call_clobber_ops): Split out from ... (get_asm_expr_operands): ... here. (parse_ssa_operands): Convert to switch. * tree.def (TM_LOAD, TM_STORE): Remove. @@ -1836,7 +1836,7 @@ (dump_gimple_assign): Handle TM_LOAD/STORE. (dump_gimple_tm_atomic): Dump the subcode. * gimple.h (GTMA_HAVE_ABORT, GTMA_HAVE_LOAD, GTMA_HAVE_STORE, - GTMA_HAVE_CALL_TM, GTMA_HAVE_CALL_IRREVOKABLE, + GTMA_HAVE_CALL_TM, GTMA_HAVE_CALL_IRREVOKABLE, GTMA_MUST_CALL_IRREVOKABLE, GTMA_HAVE_CALL_INDIRECT): New. (gimple_tm_atomic_subcode, gimple_tm_atomic_set_subcode): New. * gtm-low.c (struct ltm_state, add_stmt_to_transaction, @@ -1880,7 +1880,7 @@ * c-pragma.h (PRAGMA_GTM_ATOMIC): Remove. (enum pragma_gtm_clause): Remove. (c_finish_tm_abort): Remove. - (prepare_tm_clone): Match Intel's transaction suffix. Remove + (prepare_tm_clone): Match Intel's transaction suffix. Remove code to add an explicit handle. * defaults.h (TINYSTM_VERSION_0_9_5, GTM_EXPL_HANDLE, GTM_IMPL_HANDLE, TANGER): Remove. @@ -1936,7 +1936,7 @@ (walk_gimple_stmt): Add GTM codes. (gimple_rhs_class_table): Make GTM_LOAD/STORE be GIMPLE_SINGLE_RHS. * gimple.def (GIMPLE_GTM_TXN, GIMPLE_GTM_RETURN, GIMPLE_GTM_ABORT): New. - * gimple.h (struct gimple_statement_seq): Rename from + * gimple.h (struct gimple_statement_seq): Rename from gimple_statement_omp. Update all users. (is_gimple_gtm): New. * gtm-low.c (new_gtm_region): Remove type code. @@ -1948,12 +1948,12 @@ (requires_barrier): Merge requires_read_barrier and requires_write_barrier; rewrite to match memory variables only. (get_real_stm_decl, get_uint_stm_decl, insert_temporary, - may_repair_rhs, compensate_for_taking_the_address, - compose_stm_store_call, compose_stm_load_call, + may_repair_rhs, compensate_for_taking_the_address, + compose_stm_store_call, compose_stm_load_call, insert_rhs_stm_call, replace_lhs, maybe_replace_rhs_stmt, replace_txn_mod_stmt, build_txn_call_expr, replace_txn_stmt, - setup_recover_bb, setup_begin_bb, expand_gtm_abort, - maybe_insert_stm_new, insert_stm_init_thread, + setup_recover_bb, setup_begin_bb, expand_gtm_abort, + maybe_insert_stm_new, insert_stm_init_thread, maybe_insert_stm_init_thread, insert_stm_exit_thread, maybe_insert_stm_exit_thread, expand_gtm_txn_marker, expand_gtm_return, insert_stm_init, insert_stm_exit, diff --git a/gcc/builtin-attrs.def b/gcc/builtin-attrs.def index b053c2b2219..619794e85c8 100644 --- a/gcc/builtin-attrs.def +++ b/gcc/builtin-attrs.def @@ -244,10 +244,10 @@ DEF_ATTR_TREE_LIST (ATTR_TM_CONST_NOTHROW_LIST, /* Same attributes used for BUILT_IN_MALLOC except with TM_PURE thrown in. */ DEF_ATTR_TREE_LIST (ATTR_TMPURE_MALLOC_NOTHROW_LIST, - ATTR_TM_TMPURE, ATTR_NULL, ATTR_MALLOC_NOTHROW_LIST) + ATTR_TM_TMPURE, ATTR_NULL, ATTR_MALLOC_NOTHROW_LIST) /* Same attributes used for BUILT_IN_FREE except with TM_PURE thrown in. */ DEF_ATTR_TREE_LIST (ATTR_TMPURE_NOTHROW_LIST, - ATTR_TM_TMPURE, ATTR_NULL, ATTR_NOTHROW_LIST) + ATTR_TM_TMPURE, ATTR_NULL, ATTR_NOTHROW_LIST) /* Construct a tree for a format_arg attribute. */ #define DEF_FORMAT_ARG_ATTRIBUTE(FA) \ diff --git a/gcc/builtin-types.def b/gcc/builtin-types.def index 2f4f5077513..d6d48c7c9fc 100644 --- a/gcc/builtin-types.def +++ b/gcc/builtin-types.def @@ -492,8 +492,8 @@ DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VPTR_I2, BT_VOID, BT_VOLATILE_PTR, BT_I2) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VPTR_I4, BT_VOID, BT_VOLATILE_PTR, BT_I4) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VPTR_I8, BT_VOID, BT_VOLATILE_PTR, BT_I8) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VPTR_FLOAT, BT_VOID, BT_VOLATILE_PTR, BT_FLOAT) -DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VPTR_DOUBLE, BT_VOID, - BT_VOLATILE_PTR, BT_DOUBLE) +DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VPTR_DOUBLE, BT_VOID, + BT_VOLATILE_PTR, BT_DOUBLE) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VPTR_LDOUBLE, BT_VOID, BT_VOLATILE_PTR, BT_LONGDOUBLE) DEF_FUNCTION_TYPE_2 (BT_FN_VOID_VPTR_SIZE, BT_VOID, diff --git a/gcc/builtins.def b/gcc/builtins.def index 38bdafaea16..616fca73597 100644 --- a/gcc/builtins.def +++ b/gcc/builtins.def @@ -147,7 +147,7 @@ along with GCC; see the file COPYING3. If not see #undef DEF_TM_BUILTIN #define DEF_TM_BUILTIN(ENUM, NAME, TYPE, ATTRS) \ DEF_BUILTIN (ENUM, "__builtin_" NAME, BUILT_IN_NORMAL, TYPE, TYPE, \ - false, true, true, ATTRS, false, flag_tm) + false, true, true, ATTRS, false, flag_tm) /* Define an attribute list for math functions that are normally "impure" because some of them may write into global memory for diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c index 157fdb3bf99..32daa73f90f 100644 --- a/gcc/c-family/c-common.c +++ b/gcc/c-family/c-common.c @@ -671,19 +671,19 @@ const struct attribute_spec c_common_attribute_table[] = { "pure", 0, 0, true, false, false, handle_pure_attribute, false }, { "transaction_callable", 0, 0, false, true, false, - handle_tm_attribute, false }, + handle_tm_attribute, false }, { "transaction_unsafe", 0, 0, false, true, false, - handle_tm_attribute, false }, + handle_tm_attribute, false }, { "transaction_safe", 0, 0, false, true, false, - handle_tm_attribute, false }, + handle_tm_attribute, false }, { "transaction_may_cancel_outer", 0, 0, false, true, false, - handle_tm_attribute, false }, + handle_tm_attribute, false }, /* ??? These two attributes didn't make the transition from the Intel language document to the multi-vendor language document. */ { "transaction_pure", 0, 0, false, true, false, - handle_tm_attribute, false }, + handle_tm_attribute, false }, { "transaction_wrap", 1, 1, true, false, false, - handle_tm_wrap_attribute, false }, + handle_tm_wrap_attribute, false }, /* For internal use (marking of builtins) only. The name contains space to prevent its usage in source code. */ { "no vops", 0, 0, true, false, false, @@ -728,7 +728,7 @@ const struct attribute_spec c_common_attribute_table[] = /* For internal use only. The leading '*' both prevents its usage in source code and signals that it may be overridden by machine tables. */ { "*tm regparm", 0, 0, false, true, true, - ignore_attribute, false }, + ignore_attribute, false }, { "no_split_stack", 0, 0, true, false, false, handle_no_split_stack_attribute, false }, /* For internal use (marking of builtins and runtime functions) only. @@ -7414,7 +7414,7 @@ find_tm_attribute (tree list) } return NULL_TREE; } - + /* Handle the TM attributes; arguments as in struct attribute_spec.handler. Here we accept only function types, and verify that none of the other function TM attributes are also applied. */ @@ -7507,7 +7507,7 @@ handle_tm_wrap_attribute (tree *node, tree name, tree args, { if (lang_hooks.types_compatible_p (TREE_TYPE (decl), TREE_TYPE (wrap_decl))) - record_tm_replacement (wrap_decl, decl); + record_tm_replacement (wrap_decl, decl); else error ("%qD is not compatible with %qD", wrap_decl, decl); } diff --git a/gcc/c-parser.c b/gcc/c-parser.c index a44923d0bc1..25a4741a1b6 100644 --- a/gcc/c-parser.c +++ b/gcc/c-parser.c @@ -10513,7 +10513,7 @@ c_parser_omp_threadprivate (c_parser *parser) } /* Parse a transaction attribute (GCC Extension). - + transaction-attribute: attributes [ [ any-word ] ] @@ -10580,7 +10580,7 @@ c_parser_transaction (c_parser *parser, enum rid keyword) { attrs = c_parser_transaction_attributes (parser); if (attrs) - this_in |= parse_tm_stmt_attr (attrs, TM_STMT_ATTR_OUTER); + this_in |= parse_tm_stmt_attr (attrs, TM_STMT_ATTR_OUTER); } /* Keep track if we're in the lexical scope of an outer transaction. */ @@ -10594,9 +10594,9 @@ c_parser_transaction (c_parser *parser, enum rid keyword) stmt = c_finish_transaction (loc, stmt, this_in); else error_at (loc, (keyword == RID_TRANSACTION_ATOMIC ? - "%<__transaction_atomic%> without transactional memory support enabled" - : "%<__transaction_relaxed %> " - "without transactional memory support enabled")); + "%<__transaction_atomic%> without transactional memory support enabled" + : "%<__transaction_relaxed %> " + "without transactional memory support enabled")); return stmt; } @@ -10629,7 +10629,7 @@ c_parser_transaction_expression (c_parser *parser, enum rid keyword) { attrs = c_parser_transaction_attributes (parser); if (attrs) - this_in |= parse_tm_stmt_attr (attrs, 0); + this_in |= parse_tm_stmt_attr (attrs, 0); } parser->in_transaction = this_in; @@ -10654,9 +10654,9 @@ c_parser_transaction_expression (c_parser *parser, enum rid keyword) if (!flag_tm) error_at (loc, (keyword == RID_TRANSACTION_ATOMIC ? - "%<__transaction_atomic%> without transactional memory support enabled" - : "%<__transaction_relaxed %> " - "without transactional memory support enabled")); + "%<__transaction_atomic%> without transactional memory support enabled" + : "%<__transaction_relaxed %> " + "without transactional memory support enabled")); return ret; } @@ -10709,7 +10709,7 @@ c_parser_transaction_cancel(c_parser *parser) else if (parser->in_transaction == 0) { error_at (loc, "%<__transaction_cancel%> not within " - "%<__transaction_atomic%>"); + "%<__transaction_atomic%>"); goto ret_error; } diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 334ed222aaf..b7d99c803ab 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -20828,11 +20828,11 @@ cp_parser_function_definition_after_declarator (cp_parser* parser, function-body. */ if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TRANSACTION_ATOMIC)) ctor_initializer_p = cp_parser_function_transaction (parser, - RID_TRANSACTION_ATOMIC); + RID_TRANSACTION_ATOMIC); else if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TRANSACTION_RELAXED)) ctor_initializer_p = cp_parser_function_transaction (parser, - RID_TRANSACTION_RELAXED); + RID_TRANSACTION_RELAXED); else if (cp_lexer_next_token_is_keyword (parser->lexer, RID_TRY)) ctor_initializer_p = cp_parser_function_try_block (parser); else @@ -26560,7 +26560,7 @@ cp_parser_omp_construct (cp_parser *parser, cp_token *pragma_tok) implemented properly. */ static tree -cp_parser_txn_attribute_opt (cp_parser *parser) +cp_parser_txn_attribute_opt (cp_parser *parser) { cp_token *token; tree attr_name, attr = NULL; @@ -26617,7 +26617,7 @@ cp_parser_transaction (cp_parser *parser, enum rid keyword) || keyword == RID_TRANSACTION_RELAXED); token = cp_parser_require_keyword (parser, keyword, (keyword == RID_TRANSACTION_ATOMIC ? RT_TRANSACTION_ATOMIC - : RT_TRANSACTION_RELAXED)); + : RT_TRANSACTION_RELAXED)); gcc_assert (token != NULL); if (keyword == RID_TRANSACTION_RELAXED) @@ -26626,7 +26626,7 @@ cp_parser_transaction (cp_parser *parser, enum rid keyword) { attrs = cp_parser_txn_attribute_opt (parser); if (attrs) - this_in |= parse_tm_stmt_attr (attrs, TM_STMT_ATTR_OUTER); + this_in |= parse_tm_stmt_attr (attrs, TM_STMT_ATTR_OUTER); } /* Keep track if we're in the lexical scope of an outer transaction. */ @@ -26666,13 +26666,13 @@ cp_parser_transaction_expression (cp_parser *parser, enum rid keyword) if (!flag_tm) error (keyword == RID_TRANSACTION_RELAXED ? G_("%<__transaction_relaxed%> without transactional memory " - "support enabled") + "support enabled") : G_("%<__transaction_atomic%> without transactional memory " - "support enabled")); + "support enabled")); token = cp_parser_require_keyword (parser, keyword, (keyword == RID_TRANSACTION_ATOMIC ? RT_TRANSACTION_ATOMIC - : RT_TRANSACTION_RELAXED)); + : RT_TRANSACTION_RELAXED)); gcc_assert (token != NULL); if (keyword == RID_TRANSACTION_RELAXED) @@ -26701,7 +26701,7 @@ cp_parser_transaction_expression (cp_parser *parser, enum rid keyword) function-transaction-block: __transaction_atomic txn-attribute[opt] ctor-initializer[opt] - function-body + function-body __transaction_atomic txn-attribute[opt] function-try-block __transaction_relaxed ctor-initializer[opt] function-body __transaction_relaxed function-try-block @@ -26720,16 +26720,16 @@ cp_parser_function_transaction (cp_parser *parser, enum rid keyword) || keyword == RID_TRANSACTION_RELAXED); token = cp_parser_require_keyword (parser, keyword, (keyword == RID_TRANSACTION_ATOMIC ? RT_TRANSACTION_ATOMIC - : RT_TRANSACTION_RELAXED)); + : RT_TRANSACTION_RELAXED)); gcc_assert (token != NULL); - + if (keyword == RID_TRANSACTION_RELAXED) new_in |= TM_STMT_ATTR_RELAXED; else { attrs = cp_parser_txn_attribute_opt (parser); if (attrs) - new_in |= parse_tm_stmt_attr (attrs, TM_STMT_ATTR_OUTER); + new_in |= parse_tm_stmt_attr (attrs, TM_STMT_ATTR_OUTER); } stmt = begin_transaction_stmt (token->location, &compound_stmt, new_in); diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c index e691825ccb0..3196d123ce3 100644 --- a/gcc/cp/pt.c +++ b/gcc/cp/pt.c @@ -12954,9 +12954,9 @@ tsubst_expr (tree t, tree args, tsubst_flags_t complain, tree in_decl, case TRANSACTION_EXPR: { - int flags = 0; - flags |= (TRANSACTION_EXPR_OUTER (t) ? TM_STMT_ATTR_OUTER : 0); - flags |= (TRANSACTION_EXPR_RELAXED (t) ? TM_STMT_ATTR_RELAXED : 0); + int flags = 0; + flags |= (TRANSACTION_EXPR_OUTER (t) ? TM_STMT_ATTR_OUTER : 0); + flags |= (TRANSACTION_EXPR_RELAXED (t) ? TM_STMT_ATTR_RELAXED : 0); if (TRANSACTION_EXPR_IS_STMT (t)) { diff --git a/gcc/gimple-pretty-print.c b/gcc/gimple-pretty-print.c index a7779a1bd68..df703b4ce75 100644 --- a/gcc/gimple-pretty-print.c +++ b/gcc/gimple-pretty-print.c @@ -218,9 +218,9 @@ dump_gimple_fmt (pretty_printer *buffer, int spc, int flags, newline_and_indent (buffer, spc); break; - case 'x': - pp_scalar (buffer, "%x", va_arg (args, int)); - break; + case 'x': + pp_scalar (buffer, "%x", va_arg (args, int)); + break; case '+': spc += 2; @@ -1012,12 +1012,12 @@ dump_gimple_eh_else (pretty_printer *buffer, gimple gs, int spc, int flags) { if (flags & TDF_RAW) dump_gimple_fmt (buffer, spc, flags, - "%G <%+N_BODY <%S>%nE_BODY <%S>%->", gs, - gimple_eh_else_n_body (gs), gimple_eh_else_e_body (gs)); + "%G <%+N_BODY <%S>%nE_BODY <%S>%->", gs, + gimple_eh_else_n_body (gs), gimple_eh_else_e_body (gs)); else dump_gimple_fmt (buffer, spc, flags, - "<<<if_normal_exit>>>%+{%S}%-<<<else_eh_exit>>>%+{%S}", - gimple_eh_else_n_body (gs), gimple_eh_else_e_body (gs)); + "<<<if_normal_exit>>>%+{%S}%-<<<else_eh_exit>>>%+{%S}", + gimple_eh_else_n_body (gs), gimple_eh_else_e_body (gs)); } diff --git a/gcc/gimple.c b/gcc/gimple.c index 7bcaa06cf90..e803f56d0a3 100644 --- a/gcc/gimple.c +++ b/gcc/gimple.c @@ -2393,7 +2393,7 @@ gimple_copy (gimple stmt) gimple_omp_set_body (copy, new_seq); break; - case GIMPLE_TRANSACTION: + case GIMPLE_TRANSACTION: new_seq = gimple_seq_copy (gimple_transaction_body (stmt)); gimple_transaction_set_body (copy, new_seq); break; diff --git a/gcc/gimple.h b/gcc/gimple.h index cfe7bca3754..4b78ff5270d 100644 --- a/gcc/gimple.h +++ b/gcc/gimple.h @@ -4640,7 +4640,7 @@ gimple_omp_continue_set_control_use (gimple g, tree use) /* Return the body for the GIMPLE_TRANSACTION statement GS. */ -static inline gimple_seq +static inline gimple_seq gimple_transaction_body (gimple gs) { GIMPLE_CHECK (gs, GIMPLE_TRANSACTION); diff --git a/gcc/gimplify.c b/gcc/gimplify.c index f38ab424758..99e0d0dad90 100644 --- a/gcc/gimplify.c +++ b/gcc/gimplify.c @@ -7306,9 +7306,9 @@ gimplify_expr (tree *expr_p, gimple_seq *pre_p, gimple_seq *post_p, ret = gimplify_omp_atomic (expr_p, pre_p); break; - case TRANSACTION_EXPR: - ret = gimplify_transaction (expr_p, pre_p); - break; + case TRANSACTION_EXPR: + ret = gimplify_transaction (expr_p, pre_p); + break; case TRUTH_AND_EXPR: case TRUTH_OR_EXPR: diff --git a/gcc/gtm-builtins.def b/gcc/gtm-builtins.def index 4bdd10e0e39..9fcbdb0cc36 100644 --- a/gcc/gtm-builtins.def +++ b/gcc/gtm-builtins.def @@ -24,29 +24,29 @@ DEF_TM_BUILTIN (BUILT_IN_TM_GETTMCLONE_SAFE, "_ITM_getTMCloneSafe", /* Memory allocation builtins. */ DEF_TM_BUILTIN (BUILT_IN_TM_MALLOC, "_ITM_malloc", - BT_FN_PTR_SIZE, ATTR_TMPURE_MALLOC_NOTHROW_LIST) + BT_FN_PTR_SIZE, ATTR_TMPURE_MALLOC_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_CALLOC, "_ITM_calloc", - BT_FN_PTR_SIZE_SIZE, ATTR_TMPURE_MALLOC_NOTHROW_LIST) + BT_FN_PTR_SIZE_SIZE, ATTR_TMPURE_MALLOC_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_FREE, "_ITM_free", - BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LIST) + BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LIST) /* Logging builtins. */ DEF_TM_BUILTIN (BUILT_IN_TM_LOG_1, "_ITM_LU1", - BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) + BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_LOG_2, "_ITM_LU2", - BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) + BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_LOG_4, "_ITM_LU4", - BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) + BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_LOG_8, "_ITM_LU8", - BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) + BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_LOG_FLOAT, "_ITM_LF", - BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) + BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_LOG_DOUBLE, "_ITM_LD", - BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) + BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_LOG_LDOUBLE, "_ITM_LE", - BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) + BT_FN_VOID_VPTR, ATTR_TM_TMPURE_NOTHROW_LIST) DEF_TM_BUILTIN (BUILT_IN_TM_LOG, "_ITM_LB", - BT_FN_VOID_VPTR_SIZE, ATTR_TM_TMPURE_NOTHROW_LIST) + BT_FN_VOID_VPTR_SIZE, ATTR_TM_TMPURE_NOTHROW_LIST) /* These stubs should get defined in the backend if applicable. */ DEF_BUILTIN_STUB (BUILT_IN_TM_LOG_M64, "__builtin__ITM_LM64") diff --git a/gcc/testsuite/c-c++-common/tm/malloc.c b/gcc/testsuite/c-c++-common/tm/malloc.c index 4ae82e9904c..de7a766e36c 100644 --- a/gcc/testsuite/c-c++-common/tm/malloc.c +++ b/gcc/testsuite/c-c++-common/tm/malloc.c @@ -9,9 +9,9 @@ void foobar(void) { char *p, *q; __transaction_atomic { - p = (char *)malloc(123); - q = (char *)calloc(555,1); - free(q); + p = (char *)malloc(123); + q = (char *)calloc(555,1); + free(q); free(p); } z = (char *)malloc (666); diff --git a/gcc/testsuite/c-c++-common/tm/safe-2.c b/gcc/testsuite/c-c++-common/tm/safe-2.c index b6d048651e4..a6729ba428b 100644 --- a/gcc/testsuite/c-c++-common/tm/safe-2.c +++ b/gcc/testsuite/c-c++-common/tm/safe-2.c @@ -19,9 +19,9 @@ f(void) __transaction_atomic [[outer]] { __transaction_atomic { __transaction_atomic { - __transaction_atomic { - mco(); - } + __transaction_atomic { + mco(); + } } } } @@ -34,9 +34,9 @@ g(void) __transaction_atomic { __transaction_atomic { __transaction_atomic { - __transaction_atomic { - mco(); - } + __transaction_atomic { + mco(); + } } } } diff --git a/gcc/testsuite/g++.dg/tm/20100727.C b/gcc/testsuite/g++.dg/tm/20100727.C index e99151c9aef..bda2df0607c 100644 --- a/gcc/testsuite/g++.dg/tm/20100727.C +++ b/gcc/testsuite/g++.dg/tm/20100727.C @@ -99,7 +99,7 @@ template < typename _Iterator > class reverse_iterator:public iterator < typenam reference operator* () const { _Iterator __tmp = current; - return *--__tmp; + return *--__tmp; } pointer operator-> () const { @@ -653,7 +653,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) struct _List_impl:public _Node_alloc_type { _List_node_base _M_node; - _List_impl ():_Node_alloc_type (), _M_node () + _List_impl ():_Node_alloc_type (), _M_node () { } _List_impl (const _Node_alloc_type & __a):_Node_alloc_type (__a), _M_node () diff --git a/gcc/testsuite/g++.dg/tm/pr45940-2.C b/gcc/testsuite/g++.dg/tm/pr45940-2.C index e7407167f95..ab10c34baaa 100644 --- a/gcc/testsuite/g++.dg/tm/pr45940-2.C +++ b/gcc/testsuite/g++.dg/tm/pr45940-2.C @@ -11,13 +11,13 @@ inline int atomic_exchange_and_add(int dv ) class sp_counted_base { -public: +public: __attribute__((transaction_safe)) void release() - { - if( atomic_exchange_and_add(-1 ) == 1 ) - { - } + { + if( atomic_exchange_and_add(-1 ) == 1 ) + { + } } }; diff --git a/gcc/testsuite/g++.dg/tm/pr45940-3.C b/gcc/testsuite/g++.dg/tm/pr45940-3.C index e89b5a2ec5c..c8caee6c8b9 100644 --- a/gcc/testsuite/g++.dg/tm/pr45940-3.C +++ b/gcc/testsuite/g++.dg/tm/pr45940-3.C @@ -16,17 +16,17 @@ class sp_counted_base { protected: int use_count_; // #shared -public: +public: __attribute__((transaction_safe)) virtual void dispose() = 0; // nothrow __attribute__((transaction_safe)) void release() // nothrow - { - if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) - { - dispose(); - } + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + } } }; @@ -51,8 +51,8 @@ public: } __attribute__((transaction_safe)) ~shared_count() // nothrow - { - if( pi_ != 0 ) pi_->release(); + { + if( pi_ != 0 ) pi_->release(); } }; diff --git a/gcc/testsuite/g++.dg/tm/pr45940-4.C b/gcc/testsuite/g++.dg/tm/pr45940-4.C index 02bb9b1aee9..d1cb8d55ae6 100644 --- a/gcc/testsuite/g++.dg/tm/pr45940-4.C +++ b/gcc/testsuite/g++.dg/tm/pr45940-4.C @@ -16,17 +16,17 @@ class sp_counted_base { protected: int use_count_; // #shared -public: +public: __attribute__((transaction_safe)) virtual void dispose() = 0; // nothrow __attribute__((transaction_safe)) void release() // nothrow - { - if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) - { - dispose(); - } + { + if( atomic_exchange_and_add( &use_count_, -1 ) == 1 ) + { + dispose(); + } } }; @@ -51,8 +51,8 @@ public: } __attribute__((transaction_safe)) ~shared_count() // nothrow - { - if( pi_ != 0 ) pi_->release(); + { + if( pi_ != 0 ) pi_->release(); } }; diff --git a/gcc/testsuite/g++.dg/tm/pr45940.C b/gcc/testsuite/g++.dg/tm/pr45940.C index f9573f41d7a..3e9a2c3f8da 100644 --- a/gcc/testsuite/g++.dg/tm/pr45940.C +++ b/gcc/testsuite/g++.dg/tm/pr45940.C @@ -11,13 +11,13 @@ inline int atomic_exchange_and_add(int dv ) class sp_counted_base { -public: +public: __attribute__((transaction_safe)) void release() - { - if( atomic_exchange_and_add(-1 ) == 1 ) - { - } + { + if( atomic_exchange_and_add(-1 ) == 1 ) + { + } } }; diff --git a/gcc/testsuite/g++.dg/tm/pr46269.C b/gcc/testsuite/g++.dg/tm/pr46269.C index fdc3b73716c..b4b13af5bf1 100644 --- a/gcc/testsuite/g++.dg/tm/pr46269.C +++ b/gcc/testsuite/g++.dg/tm/pr46269.C @@ -2,7 +2,7 @@ // { dg-options "-fgnu-tm" } static inline void atomic_exchange_and_add() -{ +{ __asm__ (""); } @@ -10,20 +10,20 @@ template<class T> class shared_ptr { public: shared_ptr( T * p ) - { + { atomic_exchange_and_add(); } }; class BuildingCompletedEvent -{ +{ public: __attribute__((transaction_callable)) void updateBuildingSite(void); __attribute__((transaction_pure)) BuildingCompletedEvent(); }; void BuildingCompletedEvent::updateBuildingSite(void) -{ +{ shared_ptr<BuildingCompletedEvent> event(new BuildingCompletedEvent()); } diff --git a/gcc/testsuite/g++.dg/tm/pr46270.C b/gcc/testsuite/g++.dg/tm/pr46270.C index d7c97f84489..291e620a387 100644 --- a/gcc/testsuite/g++.dg/tm/pr46270.C +++ b/gcc/testsuite/g++.dg/tm/pr46270.C @@ -20,7 +20,7 @@ static void *buildProjectSyncStepConcurrently(int id, int localTeam) __transaction_relaxed { std::list<std::list<Game::BuildProject>::iterator>::iterator it = erasableBuildProjects.begin(); - game.buildProjects.erase( (std::list<Game::BuildProject> + game.buildProjects.erase( (std::list<Game::BuildProject> ::iterator) *it); } return 0; diff --git a/gcc/testsuite/g++.dg/tm/pr46300.C b/gcc/testsuite/g++.dg/tm/pr46300.C index c67ae51e36c..7b3c613c3f5 100644 --- a/gcc/testsuite/g++.dg/tm/pr46300.C +++ b/gcc/testsuite/g++.dg/tm/pr46300.C @@ -3,6 +3,6 @@ void foo(){ __transaction_atomic { - throw 5; + throw 5; } } diff --git a/gcc/testsuite/g++.dg/tm/pr46567.C b/gcc/testsuite/g++.dg/tm/pr46567.C index e1d1fb9e3e7..2f0ef93f2d4 100644 --- a/gcc/testsuite/g++.dg/tm/pr46567.C +++ b/gcc/testsuite/g++.dg/tm/pr46567.C @@ -1,6 +1,6 @@ // { dg-do compile } // { dg-options "-fgnu-tm -O2" } - + typedef __PTRDIFF_TYPE__ ptrdiff_t; typedef __SIZE_TYPE__ size_t; namespace std __attribute__ ((__visibility__ ("default"))) { @@ -39,7 +39,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { void __throw_system_error(int) __attribute__((__noreturn__)); } - + namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator, typename _Container> class __normal_iterator; @@ -211,7 +211,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { }; template<typename _Iterator, typename _Container> struct __is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, - _Container> > + _Container> > { enum { __value = 1 }; typedef __true_type __type; @@ -277,7 +277,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef __false_type __type; }; } - + namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<bool, typename> struct __enable_if @@ -396,7 +396,7 @@ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { typedef __typeof__(__type1() + __type2() + __type3() + __type4()) __type; }; } - + namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _Value> struct __numeric_traits_integer @@ -437,14 +437,14 @@ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { __numeric_traits_floating<_Value> >::__type { }; } - - + + namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> inline void swap(_Tp& __a, _Tp& __b) { - + _Tp __tmp = (__a); __a = (__b); __b = (__tmp); @@ -470,7 +470,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) { } template<class _U1, class _U2> - pair(const pair<_U1, _U2>& __p) + pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) { } }; @@ -504,8 +504,8 @@ namespace std __attribute__ ((__visibility__ ("default"))) { make_pair(_T1 __x, _T2 __y) { return pair<_T1, _T2>(__x, __y); } } - - + + namespace std __attribute__ ((__visibility__ ("default"))) { struct input_iterator_tag { }; struct output_iterator_tag { }; @@ -513,7 +513,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct bidirectional_iterator_tag : public forward_iterator_tag { }; struct random_access_iterator_tag : public bidirectional_iterator_tag { }; template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, - typename _Pointer = _Tp*, typename _Reference = _Tp&> + typename _Pointer = _Tp*, typename _Reference = _Tp&> struct iterator { typedef _Category iterator_category; @@ -554,14 +554,14 @@ namespace std __attribute__ ((__visibility__ ("default"))) { __iterator_category(const _Iter&) { return typename iterator_traits<_Iter>::iterator_category(); } } - + namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _InputIterator> inline typename iterator_traits<_InputIterator>::difference_type __distance(_InputIterator __first, _InputIterator __last, - input_iterator_tag) + input_iterator_tag) { - + typename iterator_traits<_InputIterator>::difference_type __n = 0; while (__first != __last) { @@ -573,9 +573,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _RandomAccessIterator> inline typename iterator_traits<_RandomAccessIterator>::difference_type __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, - random_access_iterator_tag) + random_access_iterator_tag) { - + return __last - __first; } template<typename _InputIterator> @@ -583,13 +583,13 @@ namespace std __attribute__ ((__visibility__ ("default"))) { distance(_InputIterator __first, _InputIterator __last) { return std::__distance(__first, __last, - std::__iterator_category(__first)); + std::__iterator_category(__first)); } template<typename _InputIterator, typename _Distance> inline void __advance(_InputIterator& __i, _Distance __n, input_iterator_tag) { - + while (__n--) ++__i; } @@ -598,20 +598,20 @@ namespace std __attribute__ ((__visibility__ ("default"))) { __advance(_BidirectionalIterator& __i, _Distance __n, bidirectional_iterator_tag) { - + if (__n > 0) - while (__n--) + while (__n--) ++__i; else - while (__n++) + while (__n++) --__i; } template<typename _RandomAccessIterator, typename _Distance> inline void __advance(_RandomAccessIterator& __i, _Distance __n, - random_access_iterator_tag) + random_access_iterator_tag) { - + __i += __n; } template<typename _InputIterator, typename _Distance> @@ -626,17 +626,17 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator> class reverse_iterator : public iterator<typename iterator_traits<_Iterator>::iterator_category, - typename iterator_traits<_Iterator>::value_type, - typename iterator_traits<_Iterator>::difference_type, - typename iterator_traits<_Iterator>::pointer, - typename iterator_traits<_Iterator>::reference> + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> { protected: _Iterator current; public: typedef _Iterator iterator_type; typedef typename iterator_traits<_Iterator>::difference_type - difference_type; + difference_type; typedef typename iterator_traits<_Iterator>::reference reference; typedef typename iterator_traits<_Iterator>::pointer pointer; public: @@ -646,7 +646,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } template<typename _Iter> - reverse_iterator(const reverse_iterator<_Iter>& __x) + reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } iterator_type base() const @@ -711,7 +711,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator> inline bool operator==(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) + const reverse_iterator<_Iterator>& __y) { return __x.base() == __y.base(); } template<typename _Iterator> inline bool @@ -721,7 +721,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator> inline bool operator!=(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) + const reverse_iterator<_Iterator>& __y) { return !(__x == __y); } template<typename _Iterator> inline bool @@ -731,12 +731,12 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator> inline bool operator<=(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) + const reverse_iterator<_Iterator>& __y) { return !(__y < __x); } template<typename _Iterator> inline bool operator>=(const reverse_iterator<_Iterator>& __x, - const reverse_iterator<_Iterator>& __y) + const reverse_iterator<_Iterator>& __y) { return !(__x < __y); } template<typename _Iterator> inline typename reverse_iterator<_Iterator>::difference_type @@ -751,7 +751,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _IteratorL, typename _IteratorR> inline bool operator==(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) + const reverse_iterator<_IteratorR>& __y) { return __x.base() == __y.base(); } template<typename _IteratorL, typename _IteratorR> inline bool @@ -761,7 +761,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _IteratorL, typename _IteratorR> inline bool operator!=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) + const reverse_iterator<_IteratorR>& __y) { return !(__x == __y); } template<typename _IteratorL, typename _IteratorR> inline bool @@ -771,12 +771,12 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _IteratorL, typename _IteratorR> inline bool operator<=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) + const reverse_iterator<_IteratorR>& __y) { return !(__y < __x); } template<typename _IteratorL, typename _IteratorR> inline bool operator>=(const reverse_iterator<_IteratorL>& __x, - const reverse_iterator<_IteratorR>& __y) + const reverse_iterator<_IteratorR>& __y) { return !(__x < __y); } template<typename _IteratorL, typename _IteratorR> inline typename reverse_iterator<_IteratorL>::difference_type @@ -889,21 +889,21 @@ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { public: typedef _Iterator iterator_type; typedef typename iterator_traits<_Iterator>::iterator_category - iterator_category; + iterator_category; typedef typename iterator_traits<_Iterator>::value_type value_type; typedef typename iterator_traits<_Iterator>::difference_type - difference_type; + difference_type; typedef typename iterator_traits<_Iterator>::reference reference; typedef typename iterator_traits<_Iterator>::pointer pointer; __normal_iterator() : _M_current(_Iterator()) { } explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { } template<typename _Iter> - __normal_iterator(const __normal_iterator<_Iter, + __normal_iterator(const __normal_iterator<_Iter, typename __enable_if< - (std::__are_same<_Iter, typename _Container::pointer>::__value), - _Container>::__type>& __i) - : _M_current(__i.base()) { } + (std::__are_same<_Iter, typename _Container::pointer>::__value), + _Container>::__type>& __i) + : _M_current(__i.base()) { } reference operator*() const { return *_M_current; } @@ -950,22 +950,22 @@ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator==(const __normal_iterator<_IteratorL, _Container>& __lhs, - const __normal_iterator<_IteratorR, _Container>& __rhs) + const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator==(const __normal_iterator<_Iterator, _Container>& __lhs, - const __normal_iterator<_Iterator, _Container>& __rhs) + const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() == __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs, - const __normal_iterator<_IteratorR, _Container>& __rhs) + const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator!=(const __normal_iterator<_Iterator, _Container>& __lhs, - const __normal_iterator<_Iterator, _Container>& __rhs) + const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() != __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool @@ -990,22 +990,22 @@ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs, - const __normal_iterator<_IteratorR, _Container>& __rhs) + const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator<=(const __normal_iterator<_Iterator, _Container>& __lhs, - const __normal_iterator<_Iterator, _Container>& __rhs) + const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() <= __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline bool operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs, - const __normal_iterator<_IteratorR, _Container>& __rhs) + const __normal_iterator<_IteratorR, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } template<typename _Iterator, typename _Container> inline bool operator>=(const __normal_iterator<_Iterator, _Container>& __lhs, - const __normal_iterator<_Iterator, _Container>& __rhs) + const __normal_iterator<_Iterator, _Container>& __rhs) { return __lhs.base() >= __rhs.base(); } template<typename _IteratorL, typename _IteratorR, typename _Container> inline typename __normal_iterator<_IteratorL, _Container>::difference_type @@ -1036,25 +1036,25 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __iter_swap { template<typename _ForwardIterator1, typename _ForwardIterator2> - static void - iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) - { - typedef typename iterator_traits<_ForwardIterator1>::value_type - _ValueType1; - _ValueType1 __tmp = (*__a); - *__a = (*__b); - *__b = (__tmp); + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + typedef typename iterator_traits<_ForwardIterator1>::value_type + _ValueType1; + _ValueType1 __tmp = (*__a); + *__a = (*__b); + *__b = (__tmp); } }; template<> struct __iter_swap<true> { template<typename _ForwardIterator1, typename _ForwardIterator2> - static void - iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) - { - swap(*__a, *__b); - } + static void + iter_swap(_ForwardIterator1 __a, _ForwardIterator2 __b) + { + swap(*__a, *__b); + } }; template<typename _ForwardIterator1, typename _ForwardIterator2> inline void @@ -1064,10 +1064,10 @@ namespace std __attribute__ ((__visibility__ ("default"))) { _ValueType1; typedef typename iterator_traits<_ForwardIterator2>::value_type _ValueType2; - - - - + + + + typedef typename iterator_traits<_ForwardIterator1>::reference _ReferenceType1; typedef typename iterator_traits<_ForwardIterator2>::reference @@ -1082,8 +1082,8 @@ namespace std __attribute__ ((__visibility__ ("default"))) { swap_ranges(_ForwardIterator1 __first1, _ForwardIterator1 __last1, _ForwardIterator2 __first2) { - - + + ; for (; __first1 != __last1; ++__first1, ++__first2) std::iter_swap(__first1, __first2); @@ -1093,7 +1093,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { inline const _Tp& min(const _Tp& __a, const _Tp& __b) { - + if (__b < __a) return __b; return __a; @@ -1102,7 +1102,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { inline const _Tp& max(const _Tp& __a, const _Tp& __b) { - + if (__a < __b) return __b; return __a; @@ -1157,9 +1157,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __copy_move { template<typename _II, typename _OI> - static _OI - __copy_m(_II __first, _II __last, _OI __result) - { + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { for (; __first != __last; ++__result, ++__first) *__result = *__first; return __result; @@ -1169,9 +1169,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __copy_move<false, false, random_access_iterator_tag> { template<typename _II, typename _OI> - static _OI - __copy_m(_II __first, _II __last, _OI __result) - { + static _OI + __copy_m(_II __first, _II __last, _OI __result) + { typedef typename iterator_traits<_II>::difference_type _Distance; for(_Distance __n = __last - __first; __n > 0; --__n) { @@ -1186,9 +1186,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __copy_move<_IsMove, true, random_access_iterator_tag> { template<typename _Tp> - static _Tp* - __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) - { + static _Tp* + __copy_m(const _Tp* __first, const _Tp* __last, _Tp* __result) + { __builtin_memmove(__result, __first, sizeof(_Tp) * (__last - __first)); return __result + (__last - __first); @@ -1202,11 +1202,11 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef typename iterator_traits<_OI>::value_type _ValueTypeO; typedef typename iterator_traits<_II>::iterator_category _Category; const bool __simple = (__is_pod(_ValueTypeI) - && __is_pointer<_II>::__value - && __is_pointer<_OI>::__value - && __are_same<_ValueTypeI, _ValueTypeO>::__value); + && __is_pointer<_II>::__value + && __is_pointer<_OI>::__value + && __are_same<_ValueTypeI, _ValueTypeO>::__value); return std::__copy_move<_IsMove, __simple, - _Category>::__copy_m(__first, __last, __result); + _Category>::__copy_m(__first, __last, __result); } template<typename _CharT> struct char_traits; @@ -1226,7 +1226,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { ostreambuf_iterator<_CharT, char_traits<_CharT> >); template<bool _IsMove, typename _CharT> typename __gnu_cxx::__enable_if<__is_char<_CharT>::__value, - _CharT*>::__type + _CharT*>::__type __copy_move_a2(istreambuf_iterator<_CharT, char_traits<_CharT> >, istreambuf_iterator<_CharT, char_traits<_CharT> >, _CharT*); template<bool _IsMove, typename _II, typename _OI> @@ -1242,20 +1242,20 @@ namespace std __attribute__ ((__visibility__ ("default"))) { inline _OI copy(_II __first, _II __last, _OI __result) { - - + + ; return (std::__copy_move_a2<__is_move_iterator<_II>::__value> (std::__miter_base<_II>::__b(__first), - std::__miter_base<_II>::__b(__last), __result)); + std::__miter_base<_II>::__b(__last), __result)); } template<bool, bool, typename> struct __copy_move_backward { template<typename _BI1, typename _BI2> - static _BI2 - __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) - { + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { while (__first != __last) *--__result = *--__last; return __result; @@ -1265,9 +1265,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __copy_move_backward<false, false, random_access_iterator_tag> { template<typename _BI1, typename _BI2> - static _BI2 - __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) - { + static _BI2 + __copy_move_b(_BI1 __first, _BI1 __last, _BI2 __result) + { typename iterator_traits<_BI1>::difference_type __n; for (__n = __last - __first; __n > 0; --__n) *--__result = *--__last; @@ -1278,9 +1278,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __copy_move_backward<_IsMove, true, random_access_iterator_tag> { template<typename _Tp> - static _Tp* - __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) - { + static _Tp* + __copy_move_b(const _Tp* __first, const _Tp* __last, _Tp* __result) + { const ptrdiff_t _Num = __last - __first; __builtin_memmove(__result - _Num, __first, sizeof(_Tp) * _Num); return __result - _Num; @@ -1294,13 +1294,13 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef typename iterator_traits<_BI2>::value_type _ValueType2; typedef typename iterator_traits<_BI1>::iterator_category _Category; const bool __simple = (__is_pod(_ValueType1) - && __is_pointer<_BI1>::__value - && __is_pointer<_BI2>::__value - && __are_same<_ValueType1, _ValueType2>::__value); + && __is_pointer<_BI1>::__value + && __is_pointer<_BI2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); return std::__copy_move_backward<_IsMove, __simple, - _Category>::__copy_move_b(__first, - __last, - __result); + _Category>::__copy_move_b(__first, + __last, + __result); } template<bool _IsMove, typename _BI1, typename _BI2> inline _BI2 @@ -1315,13 +1315,13 @@ namespace std __attribute__ ((__visibility__ ("default"))) { inline _BI2 copy_backward(_BI1 __first, _BI1 __last, _BI2 __result) { - - - + + + ; return (std::__copy_move_backward_a2<__is_move_iterator<_BI1>::__value> (std::__miter_base<_BI1>::__b(__first), - std::__miter_base<_BI1>::__b(__last), __result)); + std::__miter_base<_BI1>::__b(__last), __result)); } template<typename _ForwardIterator, typename _Tp> inline typename @@ -1349,13 +1349,13 @@ namespace std __attribute__ ((__visibility__ ("default"))) { { const _Tp __tmp = __c; __builtin_memset(__first, static_cast<unsigned char>(__tmp), - __last - __first); + __last - __first); } template<typename _ForwardIterator, typename _Tp> inline void fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value) { - + ; std::__fill_a(std::__niter_base<_ForwardIterator>::__b(__first), std::__niter_base<_ForwardIterator>::__b(__last), __value); @@ -1391,7 +1391,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { inline _OI fill_n(_OI __first, _Size __n, const _Tp& __value) { - + return _OI(std::__fill_n_a(std::__niter_base<_OI>::__b(__first), __n, __value)); } @@ -1399,9 +1399,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __equal { template<typename _II1, typename _II2> - static bool - equal(_II1 __first1, _II1 __last1, _II2 __first2) - { + static bool + equal(_II1 __first1, _II1 __last1, _II2 __first2) + { for (; __first1 != __last1; ++__first1, ++__first2) if (!(*__first1 == *__first2)) return false; @@ -1412,9 +1412,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __equal<true> { template<typename _Tp> - static bool - equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) - { + static bool + equal(const _Tp* __first1, const _Tp* __last1, const _Tp* __first2) + { return !__builtin_memcmp(__first1, __first2, sizeof(_Tp) * (__last1 - __first1)); } @@ -1426,31 +1426,31 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; const bool __simple = (__is_integer<_ValueType1>::__value - && __is_pointer<_II1>::__value - && __is_pointer<_II2>::__value - && __are_same<_ValueType1, _ValueType2>::__value); + && __is_pointer<_II1>::__value + && __is_pointer<_II2>::__value + && __are_same<_ValueType1, _ValueType2>::__value); return std::__equal<__simple>::equal(__first1, __last1, __first2); } template<typename, typename> struct __lc_rai { template<typename _II1, typename _II2> - static _II1 - __newlast1(_II1, _II1 __last1, _II2, _II2) - { return __last1; } + static _II1 + __newlast1(_II1, _II1 __last1, _II2, _II2) + { return __last1; } template<typename _II> - static bool - __cnd2(_II __first, _II __last) - { return __first != __last; } + static bool + __cnd2(_II __first, _II __last) + { return __first != __last; } }; template<> struct __lc_rai<random_access_iterator_tag, random_access_iterator_tag> { template<typename _RAI1, typename _RAI2> - static _RAI1 - __newlast1(_RAI1 __first1, _RAI1 __last1, + static _RAI1 + __newlast1(_RAI1 __first1, _RAI1 __last1, _RAI2 __first2, _RAI2 __last2) - { + { const typename iterator_traits<_RAI1>::difference_type __diff1 = __last1 - __first1; const typename iterator_traits<_RAI2>::difference_type @@ -1458,15 +1458,15 @@ namespace std __attribute__ ((__visibility__ ("default"))) { return __diff2 < __diff1 ? __first1 + __diff2 : __last1; } template<typename _RAI> - static bool - __cnd2(_RAI, _RAI) - { return true; } + static bool + __cnd2(_RAI, _RAI) + { return true; } }; template<bool _BoolType> struct __lexicographical_compare { template<typename _II1, typename _II2> - static bool __lc(_II1, _II1, _II2, _II2); + static bool __lc(_II1, _II1, _II2, _II2); }; template<bool _BoolType> template<typename _II1, typename _II2> @@ -1493,8 +1493,8 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct __lexicographical_compare<true> { template<typename _Tp, typename _Up> - static bool - __lc(const _Tp* __first1, const _Tp* __last1, + static bool + __lc(const _Tp* __first1, const _Tp* __last1, const _Up* __first2, const _Up* __last2) { const size_t __len1 = __last1 - __first1; @@ -1518,7 +1518,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { && __is_pointer<_II1>::__value && __is_pointer<_II2>::__value); return std::__lexicographical_compare<__simple>::__lc(__first1, __last1, - __first2, __last2); + __first2, __last2); } } namespace std __attribute__ ((__visibility__ ("default"))) { @@ -1526,21 +1526,21 @@ namespace std __attribute__ ((__visibility__ ("default"))) { inline bool equal(_II1 __first1, _II1 __last1, _II2 __first2) { - - - + + + ; return std::__equal_aux(std::__niter_base<_II1>::__b(__first1), - std::__niter_base<_II1>::__b(__last1), - std::__niter_base<_II2>::__b(__first2)); + std::__niter_base<_II1>::__b(__last1), + std::__niter_base<_II2>::__b(__first2)); } template<typename _IIter1, typename _IIter2, typename _BinaryPredicate> inline bool equal(_IIter1 __first1, _IIter1 __last1, _IIter2 __first2, _BinaryPredicate __binary_pred) { - - + + ; for (; __first1 != __last1; ++__first1, ++__first2) if (!bool(__binary_pred(*__first1, *__first2))) @@ -1554,10 +1554,10 @@ namespace std __attribute__ ((__visibility__ ("default"))) { { typedef typename iterator_traits<_II1>::value_type _ValueType1; typedef typename iterator_traits<_II2>::value_type _ValueType2; - - - - + + + + ; ; return std::__lexicographical_compare_aux @@ -1574,8 +1574,8 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef typename iterator_traits<_II1>::iterator_category _Category1; typedef typename iterator_traits<_II2>::iterator_category _Category2; typedef std::__lc_rai<_Category1, _Category2> __rai_type; - - + + ; ; __last1 = __rai_type::__newlast1(__first1, __last1, __first2, __last2); @@ -1594,15 +1594,15 @@ namespace std __attribute__ ((__visibility__ ("default"))) { mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2) { - - - + + + ; while (__first1 != __last1 && *__first1 == *__first2) - { + { ++__first1; ++__first2; - } + } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } template<typename _InputIterator1, typename _InputIterator2, @@ -1611,18 +1611,18 @@ namespace std __attribute__ ((__visibility__ ("default"))) { mismatch(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _BinaryPredicate __binary_pred) { - - + + ; while (__first1 != __last1 && bool(__binary_pred(*__first1, *__first2))) - { + { ++__first1; ++__first2; - } + } return pair<_InputIterator1, _InputIterator2>(__first1, __first2); } } - + extern "C++" { namespace std { @@ -1695,12 +1695,12 @@ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { typedef const _Tp& const_reference; typedef _Tp value_type; template<typename _Tp1> - struct rebind - { typedef new_allocator<_Tp1> other; }; + struct rebind + { typedef new_allocator<_Tp1> other; }; new_allocator() throw() { } new_allocator(const new_allocator&) throw() { } template<typename _Tp1> - new_allocator(const new_allocator<_Tp1>&) throw() { } + new_allocator(const new_allocator<_Tp1>&) throw() { } ~new_allocator() throw() { } pointer address(reference __x) const { return &__x; } @@ -1747,8 +1747,8 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef const void* const_pointer; typedef void value_type; template<typename _Tp1> - struct rebind - { typedef allocator<_Tp1> other; }; + struct rebind + { typedef allocator<_Tp1> other; }; }; template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> @@ -1762,13 +1762,13 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef const _Tp& const_reference; typedef _Tp value_type; template<typename _Tp1> - struct rebind - { typedef allocator<_Tp1> other; }; + struct rebind + { typedef allocator<_Tp1> other; }; allocator() throw() { } allocator(const allocator& __a) throw() : __gnu_cxx::new_allocator<_Tp>(__a) { } template<typename _Tp1> - allocator(const allocator<_Tp1>&) throw() { } + allocator(const allocator<_Tp1>&) throw() { } ~allocator() throw() { } }; template<typename _T1, typename _T2> @@ -1955,19 +1955,19 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Val> inline bool operator==(const _List_iterator<_Val>& __x, - const _List_const_iterator<_Val>& __y) + const _List_const_iterator<_Val>& __y) { return __x._M_node == __y._M_node; } template<typename _Val> inline bool operator!=(const _List_iterator<_Val>& __x, - const _List_const_iterator<_Val>& __y) + const _List_const_iterator<_Val>& __y) { return __x._M_node != __y._M_node; } template<typename _Tp, typename _Alloc> class _List_base { protected: typedef typename _Alloc::template rebind<_List_node<_Tp> >::other - _Node_alloc_type; + _Node_alloc_type; typedef typename _Alloc::template rebind<_Tp>::other _Tp_alloc_type; struct _List_impl : public _Node_alloc_type @@ -2014,16 +2014,16 @@ namespace std __attribute__ ((__visibility__ ("default"))) { void _M_init() { - this->_M_impl._M_node._M_next = &this->_M_impl._M_node; - this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; + this->_M_impl._M_node._M_next = &this->_M_impl._M_node; + this->_M_impl._M_node._M_prev = &this->_M_impl._M_node; } }; template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class list : protected _List_base<_Tp, _Alloc> { typedef typename _Alloc::value_type _Alloc_value_type; - - + + typedef _List_base<_Tp, _Alloc> _Base; typedef typename _Base::_Tp_alloc_type _Tp_alloc_type; public: @@ -2076,10 +2076,10 @@ namespace std __attribute__ ((__visibility__ ("default"))) { : _Base(__x._M_get_Node_allocator()) { _M_initialize_dispatch(__x.begin(), __x.end(), __false_type()); } template<typename _InputIterator> - list(_InputIterator __first, _InputIterator __last, + list(_InputIterator __first, _InputIterator __last, const allocator_type& __a = allocator_type()) - : _Base(__a) - { + : _Base(__a) + { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_initialize_dispatch(__first, __last, _Integral()); } @@ -2089,9 +2089,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { assign(size_type __n, const value_type& __val) { _M_fill_assign(__n, __val); } template<typename _InputIterator> - void - assign(_InputIterator __first, _InputIterator __last) - { + void + assign(_InputIterator __first, _InputIterator __last) + { typedef typename std::__is_integer<_InputIterator>::__type _Integral; _M_assign_dispatch(__first, __last, _Integral()); } @@ -2174,10 +2174,10 @@ namespace std __attribute__ ((__visibility__ ("default"))) { splice(__position, __tmp); } template<typename _InputIterator> - void - insert(iterator __position, _InputIterator __first, - _InputIterator __last) - { + void + insert(iterator __position, _InputIterator __first, + _InputIterator __last) + { list __tmp(__first, __last, _M_get_Node_allocator()); splice(__position, __tmp); } @@ -2200,8 +2200,8 @@ namespace std __attribute__ ((__visibility__ ("default"))) { void clear() { - _Base::_M_clear(); - _Base::_M_init(); + _Base::_M_clear(); + _Base::_M_init(); } void splice(iterator __position, list& __x) @@ -2237,36 +2237,36 @@ namespace std __attribute__ ((__visibility__ ("default"))) { void remove(const _Tp& __value); template<typename _Predicate> - void - remove_if(_Predicate); + void + remove_if(_Predicate); void unique(); template<typename _BinaryPredicate> - void - unique(_BinaryPredicate); + void + unique(_BinaryPredicate); void merge(list& __x); template<typename _StrictWeakOrdering> - void - merge(list&, _StrictWeakOrdering); + void + merge(list&, _StrictWeakOrdering); void reverse() { this->_M_impl._M_node.reverse(); } void sort(); template<typename _StrictWeakOrdering> - void - sort(_StrictWeakOrdering); + void + sort(_StrictWeakOrdering); protected: template<typename _Integer> - void - _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) - { _M_fill_initialize(static_cast<size_type>(__n), __x); } + void + _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) + { _M_fill_initialize(static_cast<size_type>(__n), __x); } template<typename _InputIterator> - void - _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, - __false_type) - { + void + _M_initialize_dispatch(_InputIterator __first, _InputIterator __last, + __false_type) + { for (; __first != __last; ++__first) push_back(*__first); } @@ -2277,12 +2277,12 @@ namespace std __attribute__ ((__visibility__ ("default"))) { push_back(__x); } template<typename _Integer> - void - _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) - { _M_fill_assign(__n, __val); } + void + _M_assign_dispatch(_Integer __n, _Integer __val, __true_type) + { _M_fill_assign(__n, __val); } template<typename _InputIterator> - void - _M_assign_dispatch(_InputIterator __first, _InputIterator __last, + void + _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type); void _M_fill_assign(size_type __n, const value_type& __val); @@ -2292,16 +2292,16 @@ namespace std __attribute__ ((__visibility__ ("default"))) { void _M_insert(iterator __position, const value_type& __x) { - _Node* __tmp = _M_create_node(__x); - __tmp->hook(__position._M_node); + _Node* __tmp = _M_create_node(__x); + __tmp->hook(__position._M_node); } void _M_erase(iterator __position) { - __position._M_node->unhook(); - _Node* __n = static_cast<_Node*>(__position._M_node); + __position._M_node->unhook(); + _Node* __n = static_cast<_Node*>(__position._M_node); _M_get_Tp_allocator().destroy(&__n->_M_data); - _M_put_node(__n); + _M_put_node(__n); } void _M_check_equal_allocators(list& __x) @@ -2395,11 +2395,11 @@ namespace std __attribute__ ((__visibility__ ("default"))) { iterator __i = begin(); size_type __len = 0; for (; __i != end() && __len < __new_size; ++__i, ++__len) - ; + ; if (__len == __new_size) - erase(__i, end()); + erase(__i, end()); else - insert(end(), __new_size - __len, __x); + insert(end(), __new_size - __len, __x); } template<typename _Tp, typename _Alloc> list<_Tp, _Alloc>& @@ -2413,7 +2413,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { const_iterator __first2 = __x.begin(); const_iterator __last2 = __x.end(); for (; __first1 != __last1 && __first2 != __last2; - ++__first1, ++__first2) + ++__first1, ++__first2) *__first1 = *__first2; if (__first2 == __last2) erase(__first1, __last1); @@ -2429,11 +2429,11 @@ namespace std __attribute__ ((__visibility__ ("default"))) { { iterator __i = begin(); for (; __i != end() && __n > 0; ++__i, --__n) - *__i = __val; + *__i = __val; if (__n > 0) - insert(end(), __n, __val); + insert(end(), __n, __val); else - erase(__i, end()); + erase(__i, end()); } template<typename _Tp, typename _Alloc> template <typename _InputIterator> @@ -2442,15 +2442,15 @@ namespace std __attribute__ ((__visibility__ ("default"))) { _M_assign_dispatch(_InputIterator __first2, _InputIterator __last2, __false_type) { - iterator __first1 = begin(); - iterator __last1 = end(); - for (; __first1 != __last1 && __first2 != __last2; + iterator __first1 = begin(); + iterator __last1 = end(); + for (; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2) - *__first1 = *__first2; - if (__first2 == __last2) - erase(__first1, __last1); - else - insert(__last1, __first2, __last2); + *__first1 = *__first2; + if (__first2 == __last2) + erase(__first1, __last1); + else + insert(__last1, __first2, __last2); } template<typename _Tp, typename _Alloc> void @@ -2554,11 +2554,11 @@ namespace std __attribute__ ((__visibility__ ("default"))) { if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) { - list __carry; - list __tmp[64]; - list * __fill = &__tmp[0]; - list * __counter; - do + list __carry; + list __tmp[64]; + list * __fill = &__tmp[0]; + list * __counter; + do { __carry.splice(__carry.begin(), *this, begin()); for(__counter = &__tmp[0]; @@ -2573,9 +2573,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { ++__fill; } while ( !empty() ); - for (__counter = &__tmp[1]; __counter != __fill; ++__counter) - __counter->merge(*(__counter - 1)); - swap( *(__fill - 1) ); + for (__counter = &__tmp[1]; __counter != __fill; ++__counter) + __counter->merge(*(__counter - 1)); + swap( *(__fill - 1) ); } } template<typename _Tp, typename _Alloc> @@ -2584,9 +2584,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { list<_Tp, _Alloc>:: remove_if(_Predicate __pred) { - iterator __first = begin(); - iterator __last = end(); - while (__first != __last) + iterator __first = begin(); + iterator __last = end(); + while (__first != __last) { iterator __next = __first; ++__next; @@ -2601,12 +2601,12 @@ namespace std __attribute__ ((__visibility__ ("default"))) { list<_Tp, _Alloc>:: unique(_BinaryPredicate __binary_pred) { - iterator __first = begin(); - iterator __last = end(); - if (__first == __last) + iterator __first = begin(); + iterator __last = end(); + if (__first == __last) return; - iterator __next = __first; - while (++__next != __last) + iterator __next = __first; + while (++__next != __last) { if (__binary_pred(*__first, *__next)) _M_erase(__next); @@ -2653,24 +2653,24 @@ extern void foobarit(void); class Game { public: - struct BuildProject - { - int posX; - }; - std::list<BuildProject> buildProjects; + struct BuildProject + { + int posX; + }; + std::list<BuildProject> buildProjects; }; static Game game; static std::list<std::list<Game::BuildProject>::iterator> erasableBuildProjects; void *buildProjectSyncStepConcurrently(int id, int localTeam) { - __transaction_relaxed { - std::list<std::list<Game::BuildProject>::iterator>::iterator it + __transaction_relaxed { + std::list<std::list<Game::BuildProject>::iterator>::iterator it = erasableBuildProjects.begin(); foobarit(); - game.buildProjects.erase( (std::list<Game::BuildProject> + game.buildProjects.erase( (std::list<Game::BuildProject> ::iterator) *it); - } - return 0; + } + return 0; } diff --git a/gcc/testsuite/g++.dg/tm/pr46646.C b/gcc/testsuite/g++.dg/tm/pr46646.C index e39366a1f96..9431615b0fb 100644 --- a/gcc/testsuite/g++.dg/tm/pr46646.C +++ b/gcc/testsuite/g++.dg/tm/pr46646.C @@ -15,8 +15,8 @@ namespace std __attribute__ ((__visibility__ ("default"))) { : first(__a), second(__b) { } }; } - - + + typedef long int ptrdiff_t; typedef __SIZE_TYPE__ size_t; namespace std __attribute__ ((__visibility__ ("default"))) { @@ -30,7 +30,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { struct bidirectional_iterator_tag : public forward_iterator_tag { }; struct random_access_iterator_tag : public bidirectional_iterator_tag { }; template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t, - typename _Pointer = _Tp*, typename _Reference = _Tp&> + typename _Pointer = _Tp*, typename _Reference = _Tp&> struct iterator { typedef _Category iterator_category; @@ -75,10 +75,10 @@ namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Iterator> class reverse_iterator : public iterator<typename iterator_traits<_Iterator>::iterator_category, - typename iterator_traits<_Iterator>::value_type, - typename iterator_traits<_Iterator>::difference_type, - typename iterator_traits<_Iterator>::pointer, - typename iterator_traits<_Iterator>::reference> + typename iterator_traits<_Iterator>::value_type, + typename iterator_traits<_Iterator>::difference_type, + typename iterator_traits<_Iterator>::pointer, + typename iterator_traits<_Iterator>::reference> { protected: _Iterator current; @@ -94,7 +94,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { reverse_iterator(const reverse_iterator& __x) : current(__x.current) { } template<typename _Iter> - reverse_iterator(const reverse_iterator<_Iter>& __x) + reverse_iterator(const reverse_iterator<_Iter>& __x) : current(__x.base()) { } iterator_type base() const @@ -157,9 +157,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { { return *(*this + __n); } }; } - - - + + + extern "C++" { namespace std { @@ -251,14 +251,14 @@ namespace std __attribute__ ((__visibility__ ("default"))) { void __throw_bad_function_call() __attribute__((__noreturn__)); } - - + + namespace std __attribute__ ((__visibility__ ("default"))) { template<typename _Tp> inline void swap(_Tp& __a, _Tp& __b) { - + _Tp __tmp = (__a); __a = (__b); __b = (__tmp); @@ -286,12 +286,12 @@ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) { typedef const _Tp& const_reference; typedef _Tp value_type; template<typename _Tp1> - struct rebind - { typedef new_allocator<_Tp1> other; }; + struct rebind + { typedef new_allocator<_Tp1> other; }; new_allocator() throw() { } new_allocator(const new_allocator&) throw() { } template<typename _Tp1> - new_allocator(const new_allocator<_Tp1>&) throw() { } + new_allocator(const new_allocator<_Tp1>&) throw() { } ~new_allocator() throw() { } pointer address(reference __x) const { return &__x; } @@ -340,8 +340,8 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef const void* const_pointer; typedef void value_type; template<typename _Tp1> - struct rebind - { typedef allocator<_Tp1> other; }; + struct rebind + { typedef allocator<_Tp1> other; }; }; template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> @@ -355,13 +355,13 @@ namespace std __attribute__ ((__visibility__ ("default"))) { typedef const _Tp& const_reference; typedef _Tp value_type; template<typename _Tp1> - struct rebind - { typedef allocator<_Tp1> other; }; + struct rebind + { typedef allocator<_Tp1> other; }; allocator() throw() { } allocator(const allocator& __a) throw() : __gnu_cxx::new_allocator<_Tp>(__a) { } template<typename _Tp1> - allocator(const allocator<_Tp1>&) throw() { } + allocator(const allocator<_Tp1>&) throw() { } ~allocator() throw() { } }; template<typename _T1, typename _T2> @@ -629,18 +629,18 @@ namespace std __attribute__ ((__visibility__ ("default"))) { }; void _Rb_tree_insert_and_rebalance(const bool __insert_left, - _Rb_tree_node_base* __x, - _Rb_tree_node_base* __p, - _Rb_tree_node_base& __header) throw (); + _Rb_tree_node_base* __x, + _Rb_tree_node_base* __p, + _Rb_tree_node_base& __header) throw (); _Rb_tree_node_base* _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* const __z, - _Rb_tree_node_base& __header) throw (); + _Rb_tree_node_base& __header) throw (); template<typename _Key, typename _Val, typename _KeyOfValue, - typename _Compare, typename _Alloc = allocator<_Val> > + typename _Compare, typename _Alloc = allocator<_Val> > class _Rb_tree { typedef typename _Alloc::template rebind<_Rb_tree_node<_Val> >::other - _Node_allocator; + _Node_allocator; protected: typedef _Rb_tree_node_base* _Base_ptr; typedef const _Rb_tree_node_base* _Const_Base_ptr; @@ -695,9 +695,9 @@ namespace std __attribute__ ((__visibility__ ("default"))) { } protected: template<typename _Key_compare, - bool _Is_pod_comparator = __is_pod(_Key_compare)> - struct _Rb_tree_impl : public _Node_allocator - { + bool _Is_pod_comparator = __is_pod(_Key_compare)> + struct _Rb_tree_impl : public _Node_allocator + { _Key_compare _M_key_compare; _Rb_tree_node_base _M_header; size_type _M_node_count; @@ -799,7 +799,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { begin() const { return const_iterator(static_cast<_Const_Link_type> - (this->_M_impl._M_header._M_left)); + (this->_M_impl._M_header._M_left)); } iterator end() @@ -808,13 +808,13 @@ namespace std __attribute__ ((__visibility__ ("default"))) { end() const { return const_iterator(static_cast<_Const_Link_type> - (&this->_M_impl._M_header)); + (&this->_M_impl._M_header)); } pair<iterator, bool> _M_insert_unique(const value_type& __x); }; template<typename _Key, typename _Val, typename _KeyOfValue, - typename _Compare, typename _Alloc> + typename _Compare, typename _Alloc> typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: _M_insert_(_Const_Base_ptr __x, _Const_Base_ptr __p, const _Val& __v) @@ -823,7 +823,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { return iterator(__z); } template<typename _Key, typename _Val, typename _KeyOfValue, - typename _Compare, typename _Alloc> + typename _Compare, typename _Alloc> pair<typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator, bool> _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>:: @@ -849,7 +849,7 @@ namespace std __attribute__ ((__visibility__ ("default"))) { private: typedef typename _Alloc::template rebind<_Key>::other _Key_alloc_type; typedef _Rb_tree<key_type, value_type, _Identity<value_type>, - key_compare, _Key_alloc_type> _Rep_type; + key_compare, _Key_alloc_type> _Rep_type; _Rep_type _M_t; public: typedef typename _Key_alloc_type::pointer pointer; diff --git a/gcc/testsuite/g++.dg/tm/pr46714.C b/gcc/testsuite/g++.dg/tm/pr46714.C index bdd910e5a80..130b58cdd99 100644 --- a/gcc/testsuite/g++.dg/tm/pr46714.C +++ b/gcc/testsuite/g++.dg/tm/pr46714.C @@ -2,9 +2,9 @@ // { dg-options "-fgnu-tm -O" } static int asdf __attribute__ ((__weakref__("funky"))); - + class Building -{ +{ public: __attribute__((transaction_safe)) ~Building(void); }; diff --git a/gcc/testsuite/g++.dg/tm/pr46941.C b/gcc/testsuite/g++.dg/tm/pr46941.C index 1ba662f54d8..eac54383138 100644 --- a/gcc/testsuite/g++.dg/tm/pr46941.C +++ b/gcc/testsuite/g++.dg/tm/pr46941.C @@ -2,31 +2,31 @@ // { dg-options "-fgnu-tm" } class Obj -{ +{ int dummy; }; __attribute__((transaction_safe)) Obj* allocate() -{ +{ return new Obj; } __attribute__((transaction_safe)) void deallocate(Obj * o) -{ +{ delete o; } __attribute__((transaction_safe)) Obj* allocatearray() -{ +{ return new Obj[2]; } __attribute__((transaction_safe)) void deallocatearray(Obj *o[]) -{ +{ delete [] o; } diff --git a/gcc/testsuite/g++.dg/tm/pr47530.C b/gcc/testsuite/g++.dg/tm/pr47530.C index 9ea2cd16cd8..8e7e27297ce 100644 --- a/gcc/testsuite/g++.dg/tm/pr47530.C +++ b/gcc/testsuite/g++.dg/tm/pr47530.C @@ -12,32 +12,32 @@ namespace bench int data; public: - __attribute__((transaction_safe)) + __attribute__((transaction_safe)) LLNode(int val, LLNode* m_next) - { + { data = val; next = m_next; - } - __attribute__((transaction_safe)) + } + __attribute__((transaction_safe)) ~LLNode(){} - __attribute__((transaction_safe)) + __attribute__((transaction_safe)) int get_val() {return data;} - __attribute__((transaction_safe)) + __attribute__((transaction_safe)) LLNode* get_next() {return next;} __attribute__((transaction_safe)) void set_val(int val) {data = val;} - __attribute__((transaction_safe)) + __attribute__((transaction_safe)) void set_next(LLNode* n) {next = n;} - __attribute__((transaction_safe)) + __attribute__((transaction_safe)) void *operator new(size_t size); }; - class LinkedList + class LinkedList { LLNode* head; public: - LinkedList(); - void insert(int val); + LinkedList(); + void insert(int val); }; } @@ -70,7 +70,7 @@ void LinkedList::insert(int val) LLNode* tmp = new LLNode(val,curr); prev->set_next(tmp); } - } + } } // Make sure we don't do tail optimization on the commit. diff --git a/gcc/testsuite/g++.dg/tm/pr47573.C b/gcc/testsuite/g++.dg/tm/pr47573.C index 3db13e425f6..239d9222e8e 100644 --- a/gcc/testsuite/g++.dg/tm/pr47573.C +++ b/gcc/testsuite/g++.dg/tm/pr47573.C @@ -3,23 +3,23 @@ template<typename _Tp> class allocator { - public: - allocator() { } + public: + allocator() { } }; extern template class allocator<char>; template<typename _Alloc = allocator<char> > class basic_string { - public: - _Alloc _M_dataplus; + public: + _Alloc _M_dataplus; - __attribute__((transaction_safe)) - basic_string() : _M_dataplus(_Alloc()) - { - } + __attribute__((transaction_safe)) + basic_string() : _M_dataplus(_Alloc()) + { + } }; int getStringHeight() { - basic_string<> tmp; + basic_string<> tmp; } diff --git a/gcc/testsuite/g++.dg/tm/pr47746.C b/gcc/testsuite/g++.dg/tm/pr47746.C index 0c4316b0af0..7cd9e1006d1 100644 --- a/gcc/testsuite/g++.dg/tm/pr47746.C +++ b/gcc/testsuite/g++.dg/tm/pr47746.C @@ -3,25 +3,25 @@ class InputStream { - public: - virtual unsigned int readUint32 () = 0; + public: + virtual unsigned int readUint32 () = 0; }; class Building { - public: - __attribute__((transaction_safe)) Building (InputStream *stream); - __attribute__((transaction_safe)) void freeGradients (); - void load (InputStream *stream); + public: + __attribute__((transaction_safe)) Building (InputStream *stream); + __attribute__((transaction_safe)) void freeGradients (); + void load (InputStream *stream); }; Building::Building (InputStream *stream) { - load(stream); + load(stream); } void Building::load (InputStream *stream) { - int j = (int)stream->readUint32 (); - freeGradients (); + int j = (int)stream->readUint32 (); + freeGradients (); } diff --git a/gcc/testsuite/g++.dg/tm/tm.exp b/gcc/testsuite/g++.dg/tm/tm.exp index 50a870802ad..56d0f7d3f08 100644 --- a/gcc/testsuite/g++.dg/tm/tm.exp +++ b/gcc/testsuite/g++.dg/tm/tm.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. diff --git a/gcc/testsuite/gcc.dg/tm/20091013.c b/gcc/testsuite/gcc.dg/tm/20091013.c index 945ec126bb6..d9b3b0ed3bc 100644 --- a/gcc/testsuite/gcc.dg/tm/20091013.c +++ b/gcc/testsuite/gcc.dg/tm/20091013.c @@ -8,6 +8,6 @@ f() { __transaction_relaxed { for (i=0; i < 10; ++i) - ringo(g); + ringo(g); } } diff --git a/gcc/testsuite/gcc.dg/tm/20100524-2.c b/gcc/testsuite/gcc.dg/tm/20100524-2.c index 3349838c1cf..a3578cb2797 100644 --- a/gcc/testsuite/gcc.dg/tm/20100524-2.c +++ b/gcc/testsuite/gcc.dg/tm/20100524-2.c @@ -2,7 +2,7 @@ /* { dg-options "-fgnu-tm -O0" } */ typedef struct { - int value[5]; + int value[5]; } type_t; __attribute__((transaction_safe)) @@ -11,10 +11,10 @@ type_t func_move (); __attribute__((transaction_safe)) type_t func_push (int type) { - type_t trace; + type_t trace; - if (type == 9) - trace = func_move(); + if (type == 9) + trace = func_move(); - return trace; + return trace; } diff --git a/gcc/testsuite/gcc.dg/tm/20100609.c b/gcc/testsuite/gcc.dg/tm/20100609.c index 91223e9623d..760f81ec6dd 100644 --- a/gcc/testsuite/gcc.dg/tm/20100609.c +++ b/gcc/testsuite/gcc.dg/tm/20100609.c @@ -8,7 +8,7 @@ int later; void MyFunc() { __transaction_relaxed { - funcNoReturn(); - later=8; + funcNoReturn(); + later=8; } } diff --git a/gcc/testsuite/gcc.dg/tm/20100610.c b/gcc/testsuite/gcc.dg/tm/20100610.c index b49b424d8df..0985b9ebc23 100644 --- a/gcc/testsuite/gcc.dg/tm/20100610.c +++ b/gcc/testsuite/gcc.dg/tm/20100610.c @@ -38,32 +38,32 @@ calculateCircumCircle (element_t* elementPtr) coordinate_t* circumCenterPtr = &elementPtr->circumCenter; ((void) (0)); if (numCoordinate == 2) { - circumCenterPtr->x = (coordinates[0].x + coordinates[1].x) / 2.0; - circumCenterPtr->y = (coordinates[0].y + coordinates[1].y) / 2.0; + circumCenterPtr->x = (coordinates[0].x + coordinates[1].x) / 2.0; + circumCenterPtr->y = (coordinates[0].y + coordinates[1].y) / 2.0; } else { - double ax = coordinates[0].x; - double ay = coordinates[0].y; - double bx = coordinates[1].x; - double by = coordinates[1].y; - double cx = coordinates[2].x; - double cy = coordinates[2].y; - double bxDelta = bx - ax; - double byDelta = by - ay; - double cxDelta = cx - ax; - double cyDelta = cy - ay; - double bDistance2 = (bxDelta * bxDelta) + (byDelta * byDelta); - double cDistance2 = (cxDelta * cxDelta) + (cyDelta * cyDelta); - double xNumerator = (byDelta * cDistance2) - (cyDelta * bDistance2); - double yNumerator = (bxDelta * cDistance2) - (cxDelta * bDistance2); - double denominator = 2 * ((bxDelta * cyDelta) - (cxDelta * byDelta)); - double rx = ax - (xNumerator / denominator); - double ry = ay + (yNumerator / denominator); - circumCenterPtr->x = rx; - circumCenterPtr->y = ry; + double ax = coordinates[0].x; + double ay = coordinates[0].y; + double bx = coordinates[1].x; + double by = coordinates[1].y; + double cx = coordinates[2].x; + double cy = coordinates[2].y; + double bxDelta = bx - ax; + double byDelta = by - ay; + double cxDelta = cx - ax; + double cyDelta = cy - ay; + double bDistance2 = (bxDelta * bxDelta) + (byDelta * byDelta); + double cDistance2 = (cxDelta * cxDelta) + (cyDelta * cyDelta); + double xNumerator = (byDelta * cDistance2) - (cyDelta * bDistance2); + double yNumerator = (bxDelta * cDistance2) - (cxDelta * bDistance2); + double denominator = 2 * ((bxDelta * cyDelta) - (cxDelta * byDelta)); + double rx = ax - (xNumerator / denominator); + double ry = ay + (yNumerator / denominator); + circumCenterPtr->x = rx; + circumCenterPtr->y = ry; } elementPtr->circumRadius = coordinate_distance(circumCenterPtr, - &coordinates[0]); + &coordinates[0]); } element_t* @@ -72,7 +72,7 @@ element_alloc (coordinate_t* coordinates, long numCoordinate) element_t* elementPtr; elementPtr = (element_t*)xmalloc(sizeof(element_t)); if (elementPtr) { - calculateCircumCircle(elementPtr); + calculateCircumCircle(elementPtr); } return elementPtr; } @@ -84,7 +84,7 @@ TMelement_alloc (coordinate_t* coordinates, long numCoordinate) element_t* elementPtr; elementPtr = (element_t*)xmalloc(sizeof(element_t)); if (elementPtr) { - calculateCircumCircle(elementPtr); + calculateCircumCircle(elementPtr); } return elementPtr; } diff --git a/gcc/testsuite/gcc.dg/tm/20100615-2.c b/gcc/testsuite/gcc.dg/tm/20100615-2.c index 7b5826ef155..4341e7d35ea 100644 --- a/gcc/testsuite/gcc.dg/tm/20100615-2.c +++ b/gcc/testsuite/gcc.dg/tm/20100615-2.c @@ -4,16 +4,16 @@ __attribute__((transaction_safe)) void Info_RemoveKey (char *s) { - char *o = 0; - while (1) - { - s++; - while (*s) - { - if (!*s) - return; - *o++ = *s++; - } - *o = 0; - } + char *o = 0; + while (1) + { + s++; + while (*s) + { + if (!*s) + return; + *o++ = *s++; + } + *o = 0; + } } diff --git a/gcc/testsuite/gcc.dg/tm/debug-1.c b/gcc/testsuite/gcc.dg/tm/debug-1.c index 94e1b3bb882..fae5d6bed42 100644 --- a/gcc/testsuite/gcc.dg/tm/debug-1.c +++ b/gcc/testsuite/gcc.dg/tm/debug-1.c @@ -10,9 +10,9 @@ testing(){ } main() { - b = 9898; + b = 9898; __transaction_relaxed { - z = c; + z = c; a = 888; testing(); } diff --git a/gcc/testsuite/gcc.dg/tm/memopt-1.c b/gcc/testsuite/gcc.dg/tm/memopt-1.c index 06d4f64a388..5388a81e282 100644 --- a/gcc/testsuite/gcc.dg/tm/memopt-1.c +++ b/gcc/testsuite/gcc.dg/tm/memopt-1.c @@ -16,7 +16,7 @@ f() xxx=8; yyy=9; for (i=0; i < 10; ++i) - ringo(g); + ringo(g); bye: ringo(g); } diff --git a/gcc/testsuite/gcc.dg/tm/memset.c b/gcc/testsuite/gcc.dg/tm/memset.c index 59a1c40d651..3b73ec6ee74 100644 --- a/gcc/testsuite/gcc.dg/tm/memset.c +++ b/gcc/testsuite/gcc.dg/tm/memset.c @@ -5,20 +5,20 @@ extern void *memset (void *, int, __SIZE_TYPE__); char array[4] = "aaaa"; -__attribute__((transaction_safe)) -void *my_memset() -{ +__attribute__((transaction_safe)) +void *my_memset() +{ return memset(array,'b',4); -} +} + - -int main() -{ +int main() +{ - __transaction_atomic { - my_memset(); - } - return 0; + __transaction_atomic { + my_memset(); + } + return 0; } /* { dg-final { scan-assembler "_ITM_memsetW" } } */ diff --git a/gcc/testsuite/gcc.dg/tm/nested-1.c b/gcc/testsuite/gcc.dg/tm/nested-1.c index cf500d1fc64..afadb83c183 100644 --- a/gcc/testsuite/gcc.dg/tm/nested-1.c +++ b/gcc/testsuite/gcc.dg/tm/nested-1.c @@ -7,20 +7,20 @@ void bar(void) __transaction_atomic { if (foo(1)) __transaction_atomic { - if (foo(2)) - __transaction_atomic { - if (foo(3)) - __transaction_atomic { - if (foo(4)) - foo(5); - else - __transaction_cancel; - } - else - __transaction_cancel; - } - else - __transaction_cancel; + if (foo(2)) + __transaction_atomic { + if (foo(3)) + __transaction_atomic { + if (foo(4)) + foo(5); + else + __transaction_cancel; + } + else + __transaction_cancel; + } + else + __transaction_cancel; } else __transaction_cancel; diff --git a/gcc/testsuite/gcc.dg/tm/pr46567-2.c b/gcc/testsuite/gcc.dg/tm/pr46567-2.c index c3376fc8e60..bfe0078bfdb 100644 --- a/gcc/testsuite/gcc.dg/tm/pr46567-2.c +++ b/gcc/testsuite/gcc.dg/tm/pr46567-2.c @@ -11,8 +11,8 @@ void SeqfileGetLine() __attribute__((transaction_callable)) void readLoop() { - SeqfileGetLine(); - if (global) - funky(); + SeqfileGetLine(); + if (global) + funky(); } diff --git a/gcc/testsuite/gcc.dg/tm/pr46567.c b/gcc/testsuite/gcc.dg/tm/pr46567.c index 56d70b467d1..bcc59adf509 100644 --- a/gcc/testsuite/gcc.dg/tm/pr46567.c +++ b/gcc/testsuite/gcc.dg/tm/pr46567.c @@ -1,4 +1,4 @@ -__attribute__((transaction_callable)) +__attribute__((transaction_callable)) static void SeqfileGetLine () { SSIGetFilePosition (); @@ -10,9 +10,9 @@ static void readLoop (int addfirst) if (!addfirst) { if (!addfirst) - { - SSIGetFilePosition (); - } + { + SSIGetFilePosition (); + } SeqfileGetLine (); } } diff --git a/gcc/testsuite/gcc.dg/tm/pr47520.c b/gcc/testsuite/gcc.dg/tm/pr47520.c index 8741bf16eda..80b976bd4cb 100644 --- a/gcc/testsuite/gcc.dg/tm/pr47520.c +++ b/gcc/testsuite/gcc.dg/tm/pr47520.c @@ -3,27 +3,27 @@ struct ReadSeqVars { - int format; - char *ss; + int format; + char *ss; }; void rms_feof(struct ReadSeqVars *); __attribute__((transaction_callable)) int ReadSeq(struct ReadSeqVars *V) { - if (V->format > 1) - { - if ((V->format != 2) && (V->ss != (void*)0) ) - { - V->format = 3; - } - } - else - { - int i = 0; - for (i = 0; i < 1; i++) - { - } - rms_feof(V); - } + if (V->format > 1) + { + if ((V->format != 2) && (V->ss != (void*)0) ) + { + V->format = 3; + } + } + else + { + int i = 0; + for (i = 0; i < 1; i++) + { + } + rms_feof(V); + } } diff --git a/gcc/testsuite/gcc.dg/tm/pr47905.c b/gcc/testsuite/gcc.dg/tm/pr47905.c index 362ed487bb6..c4b254930c1 100644 --- a/gcc/testsuite/gcc.dg/tm/pr47905.c +++ b/gcc/testsuite/gcc.dg/tm/pr47905.c @@ -6,9 +6,9 @@ void funcB(); void *thread() { - __transaction_relaxed - { - funcA(); - }; - funcB(); + __transaction_relaxed + { + funcA(); + }; + funcB(); } diff --git a/gcc/testsuite/gcc.dg/tm/props-2.c b/gcc/testsuite/gcc.dg/tm/props-2.c index 9c97e3b83e7..56a3ffa1367 100644 --- a/gcc/testsuite/gcc.dg/tm/props-2.c +++ b/gcc/testsuite/gcc.dg/tm/props-2.c @@ -10,9 +10,9 @@ extern crap() __attribute__((transaction_unsafe)); foo(){ __transaction_relaxed { - global++; - crap(); - george++; + global++; + crap(); + george++; } } diff --git a/gcc/testsuite/gcc.dg/tm/tm.exp b/gcc/testsuite/gcc.dg/tm/tm.exp index 5137597afe2..5480090fd3b 100644 --- a/gcc/testsuite/gcc.dg/tm/tm.exp +++ b/gcc/testsuite/gcc.dg/tm/tm.exp @@ -4,12 +4,12 @@ # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. -# +# # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with GCC; see the file COPYING3. If not see # <http://www.gnu.org/licenses/>. @@ -30,10 +30,10 @@ dg-init # Run the tests that are shared with C++ testing. dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/tm/*c]] \ - "" $DEFAULT_CFLAGS + "" $DEFAULT_CFLAGS # Run the C-only tests. dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \ - "" $DEFAULT_CFLAGS + "" $DEFAULT_CFLAGS # All done. dg-finish diff --git a/gcc/testsuite/gcc.dg/tm/vector-1.c b/gcc/testsuite/gcc.dg/tm/vector-1.c index 927cca7db96..2dc43b0a517 100644 --- a/gcc/testsuite/gcc.dg/tm/vector-1.c +++ b/gcc/testsuite/gcc.dg/tm/vector-1.c @@ -9,7 +9,7 @@ void ** newElements; __attribute__((transaction_safe)) long TMqueue_push (void** queuePtr) -{ +{ long src; for (src = 1; src < 9; src++) { newElements[src+1] = queuePtr[src]; diff --git a/gcc/testsuite/gcc.dg/tm/wrap-3.c b/gcc/testsuite/gcc.dg/tm/wrap-3.c index 8be40406b51..0734436809f 100644 --- a/gcc/testsuite/gcc.dg/tm/wrap-3.c +++ b/gcc/testsuite/gcc.dg/tm/wrap-3.c @@ -5,7 +5,7 @@ void free (void *); void wrapper (void *) __attribute__((transaction_wrap (free))); void *p; -void foo() +void foo() { __transaction_relaxed { free (p); } } diff --git a/gcc/trans-mem.c b/gcc/trans-mem.c index 8b47e2519fc..3c0bd600943 100644 --- a/gcc/trans-mem.c +++ b/gcc/trans-mem.c @@ -68,7 +68,7 @@ trivially replaced with a GIMPLE_TRANSACTION node. During pass_lower_tm, we examine the body of transactions looking - for aborts. Transactions that do not contain an abort may be + for aborts. Transactions that do not contain an abort may be merged into an outer transaction. We also add a TRY-FINALLY node to arrange for the transaction to be committed on any exit. @@ -112,7 +112,7 @@ During pass_ipa_tm, we examine all GIMPLE_TRANSACTION blocks in all functions and mark functions for cloning. - At the end of gimple optimization, before exiting SSA form, + At the end of gimple optimization, before exiting SSA form, pass_tm_edges replaces statements that perform transactional memory operations with the appropriate TM builtins, and swap out function calls with their transactional clones. At this @@ -124,9 +124,9 @@ if (x & abort_transaction) goto over; local = local + 1; - t0 = __builtin___tm_load (global); + t0 = __builtin___tm_load (global); t1 = t0 + 1; - __builtin___tm_store (&global, t1); + __builtin___tm_store (&global, t1); if (t1 == 10) __builtin___tm_abort (); __builtin___tm_commit (); @@ -621,7 +621,7 @@ diagnose_tm_1 (gimple_stmt_iterator *gsi, bool *handled_ops_p, is_safe = true; else if (is_tm_callable (fn) || is_tm_irrevocable (fn)) { - /* A function explicitly marked transaction_callable as + /* A function explicitly marked transaction_callable as opposed to transaction_safe is being defined to be unsafe as part of its ABI, regardless of its contents. */ is_safe = false; @@ -679,7 +679,7 @@ diagnose_tm_1 (gimple_stmt_iterator *gsi, bool *handled_ops_p, error_at (gimple_location (stmt), "asm not allowed in atomic transaction"); else if (d->func_flags & DIAG_TM_SAFE) - error_at (gimple_location (stmt), + error_at (gimple_location (stmt), "asm not allowed in %<transaction_safe%> function"); else d->saw_unsafe = true; @@ -809,7 +809,7 @@ struct gimple_opt_pass pass_diagnose_tm_blocks = struct large { int x[1000]; }; struct large lala = { 0 }; __transaction { - lala.x[i] = 123; + lala.x[i] = 123; ... } @@ -818,16 +818,16 @@ struct gimple_opt_pass pass_diagnose_tm_blocks = lala = { 0 }; trxn = _ITM_startTransaction (); if (trxn & a_saveLiveVariables) - tmp_lala1 = lala.x[i]; + tmp_lala1 = lala.x[i]; else if (a & a_restoreLiveVariables) - lala.x[i] = tmp_lala1; + lala.x[i] = tmp_lala1; or use the logging functions: lala = { 0 }; trxn = _ITM_startTransaction (); _ITM_LU4 (&lala.x[i]); - + Obviously, if we use _ITM_L* to log, we prefer to call _ITM_L* as far up the dominator tree to shadow all of the writes to a given location (thus reducing the total number of logging calls), but not @@ -1805,7 +1805,7 @@ tm_region_init_1 (struct tm_region *region, basic_block bb) || (!region->irr_blocks && !region->exit_blocks)) return region; - /* Check to see if this is the end of a region by seeing if it + /* Check to see if this is the end of a region by seeing if it contains a call to __builtin_tm_commit{,_eh}. Note that the outermost region for DECL_IS_TM_CLONE need not collect this. */ for (gsi = gsi_last_bb (bb); !gsi_end_p (gsi); gsi_prev (&gsi)) @@ -1866,24 +1866,24 @@ tm_region_init (struct tm_region *region) g = last_stmt (bb); old_region = region; if (g && gimple_code (g) == GIMPLE_TRANSACTION) - region = tm_region_init_0 (region, bb, g); + region = tm_region_init_0 (region, bb, g); /* Process subsequent blocks. */ FOR_EACH_EDGE (e, ei, bb->succs) - if (!bitmap_bit_p (visited_blocks, e->dest->index)) - { - bitmap_set_bit (visited_blocks, e->dest->index); - VEC_safe_push (basic_block, heap, queue, e->dest); - gcc_assert (!e->dest->aux); /* FIXME: Remove me. */ - - /* If the current block started a new region, make sure that only - the entry block of the new region is associated with this region. - Other successors are still part of the old region. */ - if (old_region != region && e->dest != region->entry_block) - e->dest->aux = old_region; - else - e->dest->aux = region; - } + if (!bitmap_bit_p (visited_blocks, e->dest->index)) + { + bitmap_set_bit (visited_blocks, e->dest->index); + VEC_safe_push (basic_block, heap, queue, e->dest); + gcc_assert (!e->dest->aux); /* FIXME: Remove me. */ + + /* If the current block started a new region, make sure that only + the entry block of the new region is associated with this region. + Other successors are still part of the old region. */ + if (old_region != region && e->dest != region->entry_block) + e->dest->aux = old_region; + else + e->dest->aux = region; + } } while (!VEC_empty (basic_block, queue)); VEC_free (basic_block, heap, queue); @@ -2120,7 +2120,7 @@ build_tm_store (location_t loc, tree lhs, tree rhs, gimple_stmt_iterator *gsi) gcall = gimple_build_call (fn, 2, t, rhs); gimple_set_location (gcall, loc); gsi_insert_before (gsi, gcall, GSI_SAME_STMT); - + return gcall; } @@ -2234,7 +2234,7 @@ expand_call_tm (struct tm_region *region, return false; else transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE); - + return false; } @@ -2338,7 +2338,7 @@ expand_block_tm (struct tm_region *region, basic_block bb) break; } if (!gsi_end_p (gsi)) - gsi_next (&gsi); + gsi_next (&gsi); } } @@ -2479,7 +2479,7 @@ make_tm_edge (gimple stmt, basic_block bb, struct tm_region *region) struct_ptr_eq, ggc_free); dummy.stmt = stmt; - dummy.label_or_list = gimple_block_label (region->entry_block); + dummy.label_or_list = gimple_block_label (region->entry_block); slot = htab_find_slot (cfun->gimple_df->tm_restart, &dummy, INSERT); n = (struct tm_restart_node *) *slot; if (n == NULL) @@ -2488,7 +2488,7 @@ make_tm_edge (gimple stmt, basic_block bb, struct tm_region *region) *n = dummy; } else - { + { tree old = n->label_or_list; if (TREE_CODE (old) == LABEL_DECL) old = tree_cons (NULL, old, NULL); @@ -3027,7 +3027,7 @@ tm_memopt_compute_available (struct tm_region *region, list if they were not already on the list. So the size is bounded by the number of basic blocks in the region. */ qlen = VEC_length (basic_block, blocks) - 1; - qin = qout = worklist = + qin = qout = worklist = XNEWVEC (basic_block, qlen); /* Put every block in the region on the worklist. */ @@ -3114,7 +3114,7 @@ tm_memopt_compute_antic (struct tm_region *region, /* Allocate a worklist array/queue. Entries are only added to the list if they were not already on the list. So the size is bounded by the number of basic blocks in the region. */ - qin = qout = worklist = + qin = qout = worklist = XNEWVEC (basic_block, VEC_length (basic_block, blocks)); for (qlen = 0, i = VEC_length (basic_block, blocks) - 1; i >= 0; --i) @@ -3276,7 +3276,7 @@ tm_memopt_transform_blocks (VEC (basic_block, heap) *blocks) bitmap_set_bit (store_avail, loc); } } - } + } } } @@ -3347,8 +3347,8 @@ execute_tm_memopt (void) /* Save all BBs for the current region. */ bbs = get_tm_region_blocks (region->entry_block, region->exit_blocks, - region->irr_blocks, - NULL, + region->irr_blocks, + NULL, false); /* Collect all the memory operations. */ @@ -3404,7 +3404,7 @@ struct gimple_opt_pass pass_tm_memopt = /* Interprocedual analysis for the creation of transactional clones. The aim of this pass is to find which functions are referenced in a non-irrevocable transaction context, and for those over which - we have control (or user directive), create a version of the + we have control (or user directive), create a version of the function which uses only the transactional interface to reference protected memories. This analysis proceeds in several steps: @@ -3434,7 +3434,7 @@ struct gimple_opt_pass pass_tm_memopt = (c) If we reach the entry block for a possible transactional clone, then the transactional clone is irrevocable, and - we should not create the clone after all. Push all + we should not create the clone after all. Push all callers onto the worklist. (d) Place tm_irrevocable calls at the beginning of the relevant @@ -3457,7 +3457,7 @@ struct tm_ipa_cg_data /* The tm regions in the normal function. */ struct tm_region *all_tm_regions; - /* The blocks of the normal/clone functions that contain irrevocable + /* The blocks of the normal/clone functions that contain irrevocable calls, or blocks that are post-dominated by irrevocable calls. */ bitmap irrevocable_blocks_normal; bitmap irrevocable_blocks_clone; @@ -3509,7 +3509,7 @@ get_cg_data (struct cgraph_node *node) return d; } -/* Add NODE to the end of QUEUE, unless IN_QUEUE_P indicates that +/* Add NODE to the end of QUEUE, unless IN_QUEUE_P indicates that it is already present. */ static void @@ -3595,7 +3595,7 @@ ipa_tm_scan_calls_transaction (struct tm_ipa_cg_data *d, and push the destinations into the callee queue. */ static void -ipa_tm_scan_calls_clone (struct cgraph_node *node, +ipa_tm_scan_calls_clone (struct cgraph_node *node, cgraph_node_queue *callees_p) { struct function *fn = DECL_STRUCT_FUNCTION (node->decl); @@ -3689,7 +3689,7 @@ ipa_tm_scan_irr_block (basic_block bb) case GIMPLE_ASM: /* ??? The Approved Method of indicating that an inline assembly statement is not relevant to the transaction - is to wrap it in a __tm_waiver block. This is not + is to wrap it in a __tm_waiver block. This is not yet implemented, so we can't check for it. */ return true; @@ -3707,7 +3707,7 @@ ipa_tm_scan_irr_block (basic_block bb) static bool ipa_tm_scan_irr_blocks (VEC (basic_block, heap) **pqueue, bitmap new_irr, - bitmap old_irr, bitmap exit_blocks) + bitmap old_irr, bitmap exit_blocks) { bool any_new_irr = false; edge e; @@ -3790,7 +3790,7 @@ ipa_tm_propagate_irr (basic_block entry_block, bitmap new_irr, { /* Add block to new_irr if it hasn't already been processed. */ if (!old_irr || !bitmap_bit_p (old_irr, bb->index)) - { + { bitmap_set_bit (new_irr, bb->index); this_irr = true; } @@ -3979,7 +3979,7 @@ ipa_tm_mayenterirr_function (struct cgraph_node *node) if (d->is_irrevocable) return true; - /* If there are any blocks marked irrevocable, then the function + /* If there are any blocks marked irrevocable, then the function as a whole may enter irrevocable. */ if (d->irrevocable_blocks_clone) return true; @@ -4000,7 +4000,7 @@ ipa_tm_mayenterirr_function (struct cgraph_node *node) return false; } -/* Diagnose calls from transaction_safe functions to unmarked +/* Diagnose calls from transaction_safe functions to unmarked functions that are determined to not be safe. */ static void @@ -4283,7 +4283,7 @@ ipa_tm_insert_irr_call (struct cgraph_node *node, struct tm_region *region, transaction_subcode_ior (region, GTMA_MAY_ENTER_IRREVOCABLE); g = gimple_build_call (builtin_decl_explicit (BUILT_IN_TM_IRREVOCABLE), - 1, build_int_cst (NULL_TREE, MODE_SERIALIRREVOCABLE)); + 1, build_int_cst (NULL_TREE, MODE_SERIALIRREVOCABLE)); split_block_after_labels (bb); gsi = gsi_after_labels (bb); @@ -4316,9 +4316,9 @@ ipa_tm_insert_gettmclone_call (struct cgraph_node *node, tree clone = get_tm_clone_pair (fndecl); /* By transforming the call into a TM_GETTMCLONE, we are - technically taking the address of the original function and - its clone. Explain this so inlining will know this function - is needed. */ + technically taking the address of the original function and + its clone. Explain this so inlining will know this function + is needed. */ cgraph_mark_address_taken_node (cgraph_get_node (fndecl)); if (clone) cgraph_mark_address_taken_node (cgraph_get_node (clone)); @@ -4420,7 +4420,7 @@ ipa_tm_transform_calls_redirect (struct cgraph_node *node, return; /* Fixup recursive calls inside clones. */ - /* ??? Why did cgraph_copy_node_for_versioning update the call edges + /* ??? Why did cgraph_copy_node_for_versioning update the call edges for recursion but not update the call statements themselves? */ if (e->caller == e->callee && decl_is_tm_clone (current_function_decl)) { @@ -4680,7 +4680,7 @@ ipa_tm_execute (void) (ipa_tm_scan_irr_function) and mark the irrevocable blocks. */ if (node->local.tm_may_enter_irr) { - maybe_push_queue (node, &irr_worklist, &d->in_worklist); + maybe_push_queue (node, &irr_worklist, &d->in_worklist); d->want_irr_scan_normal = true; } } diff --git a/gcc/tree-eh.c b/gcc/tree-eh.c index 16f1adbe7ce..440ac0f4082 100644 --- a/gcc/tree-eh.c +++ b/gcc/tree-eh.c @@ -1099,9 +1099,9 @@ lower_try_finally_onedest (struct leh_state *state, struct leh_tf_state *tf) if (x) { if (tf->may_throw) - finally = gimple_eh_else_e_body (x); + finally = gimple_eh_else_e_body (x); else - finally = gimple_eh_else_n_body (x); + finally = gimple_eh_else_n_body (x); } lower_eh_constructs_1 (state, finally); @@ -1205,9 +1205,9 @@ lower_try_finally_copy (struct leh_state *state, struct leh_tf_state *tf) /* We don't need to copy the EH path of EH_ELSE, since it is only emitted once. */ if (eh_else) - seq = gimple_eh_else_e_body (eh_else); + seq = gimple_eh_else_e_body (eh_else); else - seq = lower_try_finally_dup_block (finally, state); + seq = lower_try_finally_dup_block (finally, state); lower_eh_constructs_1 (state, seq); emit_post_landing_pad (&eh_seq, tf->region); diff --git a/gcc/tree-pretty-print.c b/gcc/tree-pretty-print.c index 4a27526149a..d0546c6c1ca 100644 --- a/gcc/tree-pretty-print.c +++ b/gcc/tree-pretty-print.c @@ -2270,17 +2270,17 @@ dump_generic_node (pretty_printer *buffer, tree node, int spc, int flags, else if (TRANSACTION_EXPR_RELAXED (node)) pp_string (buffer, "__transaction_relaxed"); else - pp_string (buffer, "__transaction_atomic"); + pp_string (buffer, "__transaction_atomic"); if (!(flags & TDF_SLIM) && TRANSACTION_EXPR_BODY (node)) - { - newline_and_indent (buffer, spc); - pp_character (buffer, '{'); - newline_and_indent (buffer, spc + 2); - dump_generic_node (buffer, TRANSACTION_EXPR_BODY (node), + { + newline_and_indent (buffer, spc); + pp_character (buffer, '{'); + newline_and_indent (buffer, spc + 2); + dump_generic_node (buffer, TRANSACTION_EXPR_BODY (node), spc + 2, flags, false); - newline_and_indent (buffer, spc); - pp_character (buffer, '}'); - } + newline_and_indent (buffer, spc); + pp_character (buffer, '}'); + } is_expr = false; break; diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c index 2a46a2b58e6..cd222093579 100644 --- a/gcc/tree-ssa-alias.c +++ b/gcc/tree-ssa-alias.c @@ -1182,8 +1182,8 @@ ref_maybe_used_by_call_p_1 (gimple call, ao_ref *ref) case BUILT_IN_MEMPCPY: case BUILT_IN_STPCPY: case BUILT_IN_STPNCPY: - case BUILT_IN_TM_MEMCPY: - case BUILT_IN_TM_MEMMOVE: + case BUILT_IN_TM_MEMCPY: + case BUILT_IN_TM_MEMMOVE: { ao_ref dref; tree size = NULL_TREE; @@ -1231,29 +1231,29 @@ ref_maybe_used_by_call_p_1 (gimple call, ao_ref *ref) return refs_may_alias_p_1 (&dref, ref, false); } - /* The following functions read memory pointed to by their + /* The following functions read memory pointed to by their first argument. */ CASE_BUILT_IN_TM_LOAD (1): CASE_BUILT_IN_TM_LOAD (2): CASE_BUILT_IN_TM_LOAD (4): CASE_BUILT_IN_TM_LOAD (8): - CASE_BUILT_IN_TM_LOAD (FLOAT): + CASE_BUILT_IN_TM_LOAD (FLOAT): CASE_BUILT_IN_TM_LOAD (DOUBLE): CASE_BUILT_IN_TM_LOAD (LDOUBLE): CASE_BUILT_IN_TM_LOAD (M64): CASE_BUILT_IN_TM_LOAD (M128): CASE_BUILT_IN_TM_LOAD (M256): - case BUILT_IN_TM_LOG: - case BUILT_IN_TM_LOG_1: - case BUILT_IN_TM_LOG_2: - case BUILT_IN_TM_LOG_4: - case BUILT_IN_TM_LOG_8: - case BUILT_IN_TM_LOG_FLOAT: - case BUILT_IN_TM_LOG_DOUBLE: - case BUILT_IN_TM_LOG_LDOUBLE: - case BUILT_IN_TM_LOG_M64: - case BUILT_IN_TM_LOG_M128: - case BUILT_IN_TM_LOG_M256: + case BUILT_IN_TM_LOG: + case BUILT_IN_TM_LOG_1: + case BUILT_IN_TM_LOG_2: + case BUILT_IN_TM_LOG_4: + case BUILT_IN_TM_LOG_8: + case BUILT_IN_TM_LOG_FLOAT: + case BUILT_IN_TM_LOG_DOUBLE: + case BUILT_IN_TM_LOG_LDOUBLE: + case BUILT_IN_TM_LOG_M64: + case BUILT_IN_TM_LOG_M128: + case BUILT_IN_TM_LOG_M256: return ptr_deref_may_alias_ref_p_1 (gimple_call_arg (call, 0), ref); /* These read memory pointed to by the first argument. */ @@ -1278,7 +1278,7 @@ ref_maybe_used_by_call_p_1 (gimple call, ao_ref *ref) case BUILT_IN_STACK_SAVE: case BUILT_IN_STACK_RESTORE: case BUILT_IN_MEMSET: - case BUILT_IN_TM_MEMSET: + case BUILT_IN_TM_MEMSET: case BUILT_IN_MEMSET_CHK: case BUILT_IN_FREXP: case BUILT_IN_FREXPF: @@ -1509,19 +1509,19 @@ call_may_clobber_ref_p_1 (gimple call, ao_ref *ref) case BUILT_IN_STRCAT: case BUILT_IN_STRNCAT: case BUILT_IN_MEMSET: - case BUILT_IN_TM_MEMSET: - CASE_BUILT_IN_TM_STORE (1): - CASE_BUILT_IN_TM_STORE (2): - CASE_BUILT_IN_TM_STORE (4): - CASE_BUILT_IN_TM_STORE (8): - CASE_BUILT_IN_TM_STORE (FLOAT): - CASE_BUILT_IN_TM_STORE (DOUBLE): - CASE_BUILT_IN_TM_STORE (LDOUBLE): - CASE_BUILT_IN_TM_STORE (M64): - CASE_BUILT_IN_TM_STORE (M128): - CASE_BUILT_IN_TM_STORE (M256): - case BUILT_IN_TM_MEMCPY: - case BUILT_IN_TM_MEMMOVE: + case BUILT_IN_TM_MEMSET: + CASE_BUILT_IN_TM_STORE (1): + CASE_BUILT_IN_TM_STORE (2): + CASE_BUILT_IN_TM_STORE (4): + CASE_BUILT_IN_TM_STORE (8): + CASE_BUILT_IN_TM_STORE (FLOAT): + CASE_BUILT_IN_TM_STORE (DOUBLE): + CASE_BUILT_IN_TM_STORE (LDOUBLE): + CASE_BUILT_IN_TM_STORE (M64): + CASE_BUILT_IN_TM_STORE (M128): + CASE_BUILT_IN_TM_STORE (M256): + case BUILT_IN_TM_MEMCPY: + case BUILT_IN_TM_MEMMOVE: { ao_ref dref; tree size = NULL_TREE; diff --git a/gcc/tree-ssa-structalias.c b/gcc/tree-ssa-structalias.c index 61e4f9b4589..fe0c4e9c389 100644 --- a/gcc/tree-ssa-structalias.c +++ b/gcc/tree-ssa-structalias.c @@ -4232,7 +4232,7 @@ find_func_aliases_for_builtin_call (gimple t) CASE_BUILT_IN_TM_LOAD (M64): CASE_BUILT_IN_TM_LOAD (M128): CASE_BUILT_IN_TM_LOAD (M256): - { + { tree dest = gimple_call_lhs (t); tree addr = gimple_call_arg (t, 0); @@ -4243,7 +4243,7 @@ find_func_aliases_for_builtin_call (gimple t) VEC_free (ce_s, heap, lhsc); VEC_free (ce_s, heap, rhsc); return true; - } + } /* Variadic argument handling needs to be handled in IPA mode as well. */ case BUILT_IN_VA_START: diff --git a/gcc/tree.h b/gcc/tree.h index ab20272c2a3..23108018236 100644 --- a/gcc/tree.h +++ b/gcc/tree.h @@ -540,7 +540,7 @@ struct GTY(()) tree_common { ENUMERAL_TYPE TRANSACTION_EXPR_OUTER in - TRANSACTION_EXPR + TRANSACTION_EXPR public_flag: @@ -570,7 +570,7 @@ struct GTY(()) tree_common { OMP_CLAUSE_PRIVATE TRANSACTION_EXPR_RELAXED in - TRANSACTION_EXPR + TRANSACTION_EXPR private_flag: |