[google] Add option to emit mapping between module/function id and function name (issue8211043)
This patch restores part of r196176, which was subsequently reverted due to issues with the other part of that patch that dealt with module info updates. This patch restores the option -femit-function-names to emit to stderr the mapping from module name/function id to function assembler name. This enables mapping the function ids in the gcda dump files to the symbolic function name. This will work for LIPO builds without the other part of that patch, which was needed for FDO builds, and which needs to be revisited and fixed. Tested by bootstrap and regression testing. Ok for google-4_7? 2013-03-30 Teresa Johnson tejohn...@google.com * tree-profile.c (tree_profiling): Optionally call new function emit_function_name. * common.opt (flag_emit_function_names): New flag. * coverage.c (emit_function_name): New function. * coverage.h: Ditto. Index: tree-profile.c === --- tree-profile.c (revision 197266) +++ tree-profile.c (working copy) @@ -1557,6 +1557,9 @@ tree_profiling (void) /* Re-set global shared temporary variable for edge-counters. */ gcov_type_tmp_var = NULL_TREE; + if (flag_emit_function_names) +emit_function_name (); + /* Local pure-const may imply need to fixup the cfg. */ if (execute_fixup_cfg () TODO_cleanup_cfg) cleanup_tree_cfg (); Index: common.opt === --- common.opt (revision 197266) +++ common.opt (working copy) @@ -1775,6 +1775,13 @@ fprofile-generate-sampling Common Var(flag_profile_generate_sampling) Turn on instrumentation sampling with -fprofile-generate with rate set by --param profile-generate-sampling-rate or environment variable GCOV_SAMPLING_RATE +femit-function-names +Common Var(flag_emit_function_names) +Print to stderr the mapping from module name and function id to assembler +function name when -ftest-coverage, -fprofile-generate or -fprofile-use are +active, for use in correlating function ids in gcda files with the function +name. + fprofile-strip= Common Joined RejectNegative Var(profile_base_name_suffix_to_strip) Specify a substring to be stripped from the profile base file name Index: coverage.c === --- coverage.c (revision 197266) +++ coverage.c (working copy) @@ -2085,6 +2085,19 @@ build_cl_args_array_value (tree string_type, VEC(c return; } +/* Emit mapping between module name and function id to the function's + assembler name, for use in correlating function idents in the gcda file + with the function name. */ + +void +emit_function_name (void) +{ + fprintf (stderr, Module %s FuncId %u Name %s\n, + main_input_file_name, + FUNC_DECL_FUNC_ID (cfun), + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl))); +} + /* Returns the type of the module info associated with the current source module being compiled. */ Index: coverage.h === --- coverage.h (revision 197266) +++ coverage.h (working copy) @@ -75,6 +75,8 @@ extern void coverage_dc_end_function (void); is present in the coverage internal data structures. */ extern bool coverage_function_present (unsigned fn_ident); +extern void emit_function_name (void); + /* True if there is PMU data present in this compilation. */ extern bool pmu_data_present (void); -- This patch is available for review at http://codereview.appspot.com/8211043
[PATCH] Avoid warning when unused attribute applied to C++ member variables (issue8212043)
This patch allows the unused attribute to be used without warning on C++ class members, which are of type FIELD_DECL. This is for compatibility with clang, which allows the attribute to be specified on class members and struct fields. It looks like more work would need to be done to implement the actual unused variable detection and warning on FIELD_DECLs, but this change will at least avoid the warning on the code that uses the unused attribute in these cases. The documentation at http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html also doesn't seem to preclude its use on C++ member variables. Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk? 2013-03-30 Teresa Johnson tejohn...@google.com * c-family/c-common.c (handle_unused_attribute): Handle FIELD_DECL for C++ class members. Index: c-family/c-common.c === --- c-family/c-common.c (revision 197266) +++ c-family/c-common.c (working copy) @@ -6753,6 +6753,7 @@ handle_unused_attribute (tree *node, tree name, tr if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == LABEL_DECL || TREE_CODE (decl) == TYPE_DECL) -- This patch is available for review at http://codereview.appspot.com/8212043
Re: [rtl, i386] vec_merge simplification
On Sat, Mar 30, 2013 at 3:47 PM, Marc Glisse marc.gli...@inria.fr wrote: OK, modulo a few nits: Thanks, here is a version taking into account all your comments, and which still passes bootstrap+testsuite on x86_64-linux-gnu. I am not completely sure if there is a point checking !side_effects_p (op1) after rtx_equal_p (op0, op1), but I am still doing it as it seems safe. Uros, are you ok with the testsuite part? 2013-03-30 Marc Glisse marc.gli...@inria.fr gcc/ * simplify-rtx.c (simplify_binary_operation_1) VEC_SELECT: Handle VEC_MERGE. (simplify_ternary_operation) VEC_MERGE: Use unsigned HOST_WIDE_INT for masks. Test for side effects. Handle nested VEC_MERGE. Handle equal arguments. gcc/testsuite/ * gcc.target/i386/merge-1.c: New testcase. * gcc.target/i386/avx2-vpblendd128-1.c: Make it non-trivial. Yes, testsuite changes are also OK. Thanks, Uros.
Re: [PATCH] Avoid warning when unused attribute applied to C++ member variables (issue8212043)
On Sun, Mar 31, 2013 at 12:10 AM, Teresa Johnson tejohn...@google.com wrote: This patch allows the unused attribute to be used without warning on C++ class members, which are of type FIELD_DECL. This is for compatibility with clang, which allows the attribute to be specified on class members and struct fields. It looks like more work would need to be done to implement the actual unused variable detection and warning on FIELD_DECLs, but this change will at least avoid the warning on the code that uses the unused attribute in these cases. The documentation at http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html also doesn't seem to preclude its use on C++ member variables. This also allows it on field in normal C case. As far as I understand they are fields and not variables in the normal programming sense which is why the document does not mention them. Thanks, Andrew Pinski Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk? 2013-03-30 Teresa Johnson tejohn...@google.com * c-family/c-common.c (handle_unused_attribute): Handle FIELD_DECL for C++ class members. Index: c-family/c-common.c === --- c-family/c-common.c (revision 197266) +++ c-family/c-common.c (working copy) @@ -6753,6 +6753,7 @@ handle_unused_attribute (tree *node, tree name, tr if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == LABEL_DECL || TREE_CODE (decl) == TYPE_DECL) -- This patch is available for review at http://codereview.appspot.com/8212043
Google Groups: You've been added to jordanads2029
Jordan Ads jordanads2...@gmail.com has added you to the jordanads2029 group with this message: The group's name, description, and address will automatically be included in the email. Here is the group's description: Jordan Ads for Advertising And Marketing Email: jordanads2...@gmail.com Mob: 00962 795 91 50 90 --- Google Groups Information -- The owner of the group has set your subscription type as Email, meaning that you'll receive a copy of every message posted to the group as they are posted. Visit this group on the web by using this URL: http://groups.google.com/group/jordanads2029?hl=en You can unsubscribe from this group using the following URL: http://groups.google.com/group/jordanads2029/unsub?u=uivg4BQMvcv2GgCYsxiTnlh3japg8Y01R7nSeGUcmuDgBQxq1ghl=en Information About This Message If you feel that this message is abuse, please inform the Google Groups staff by using the URL below. http://groups.google.com/groups/abuse?direct=YQAAANgq7VlJWuQEp7IAAADLADG_0hn_8u22P5ENQ2bHS0wWUEIhl=en
Re: C++ PATCH: use C++ semantics for inline functions (defined in headers)
On Thu, 28 Mar 2013, Gabriel Dos Reis wrote: C++ has a much more predictable semantics for inline functions, so we no longer need to define them (especially in header files) with the 'static' specifier. The upshot is that when the compiler fails to inline a call in a given translation unit, it keeps only one copy in the entire program, instead of multiple copies (as the 'static' specifier would have implied.) With this patch, there is 2K reduction in size for cc1plus. Applying to trunk. Tested on an x86_64-suse-linux. Hi, the size reduction looks nice, should the same be applied throughout the compiler? I didn't check if the cxx-conversion branch already does it. -- Marc Glisse
[C++ Patch] Use DECL_DECLARES_TYPE_P, DECL_DECLARES_FUNCTION_P more
Hi, just more straightforward uses of existing predicates. I'm going to boot test and commit as obvious. Thanks, Paolo. 2013-03-31 Paolo Carlini paolo.carl...@oracle.com * decl2.c (collect_candidates_for_java_method_aliases): Use DECL_CLASS_SCOPE_P. * name-lookup.c (pushtag_1) Use TYPE_FUNCTION_SCOPE_P. (pushdecl_maybe_friend_1): Use DECL_DECLARES_FUNCTION_P. * decl.c (duplicate_decls): Likewise. * parser.c (cp_parser_template_declaration_after_export): Likewise, also DECL_DECLARES_TYPE_P. * pt.c (instantiate_class_template_1): Likewise. * search.c (lookup_field_1): Use DECL_DECLARES_TYPE_P. (lookup_field_r): Likewise. (friend_accessible_p): Use DECL_DECLARES_FUNCTION_P. (lookup_fnfields_slot_nolazy): Likewise. * semantics.c (finish_member_declaration): Likewise. * typeck.c (convert_for_initialization): Use TYPE_REFFN_P. Index: decl.c === --- decl.c (revision 197280) +++ decl.c (working copy) @@ -2063,8 +2063,7 @@ duplicate_decls (tree newdecl, tree olddecl, bool DECL_TEMPLATE_INFO (newdecl) = DECL_TEMPLATE_INFO (olddecl); } /* Only functions have these fields. */ - if (TREE_CODE (newdecl) == FUNCTION_DECL - || DECL_FUNCTION_TEMPLATE_P (newdecl)) + if (DECL_DECLARES_FUNCTION_P (newdecl)) { DECL_NONCONVERTING_P (newdecl) = DECL_NONCONVERTING_P (olddecl); olddecl_friend = DECL_FRIEND_P (olddecl); Index: decl2.c === --- decl2.c (revision 197280) +++ decl2.c (working copy) @@ -3665,8 +3665,7 @@ collect_candidates_for_java_method_aliases (void) { tree fndecl = node-symbol.decl; - if (DECL_CONTEXT (fndecl) - TYPE_P (DECL_CONTEXT (fndecl)) + if (DECL_CLASS_SCOPE_P (fndecl) TYPE_FOR_JAVA (DECL_CONTEXT (fndecl)) TARGET_USE_LOCAL_THUNK_ALIAS_P (fndecl)) { Index: name-lookup.c === --- name-lookup.c (revision 197280) +++ name-lookup.c (working copy) @@ -887,7 +887,7 @@ pushdecl_maybe_friend_1 (tree x, bool is_friend) add_decl_to_level (x, NAMESPACE_LEVEL (CP_DECL_CONTEXT (t))); } - if (TREE_CODE (t) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (t)) + if (DECL_DECLARES_FUNCTION_P (t)) check_default_args (t); if (t != x || DECL_FUNCTION_TEMPLATE_P (t)) @@ -5823,8 +5823,7 @@ pushtag_1 (tree name, tree type, tag_scope scope) convenient way. (It's otherwise tricky to find a member function definition it's only pointed to from within a local class.) */ - if (TYPE_CONTEXT (type) - TREE_CODE (TYPE_CONTEXT (type)) == FUNCTION_DECL) + if (TYPE_FUNCTION_SCOPE_P (type)) { if (processing_template_decl) { Index: parser.c === --- parser.c(revision 197280) +++ parser.c(working copy) @@ -21983,8 +21983,7 @@ cp_parser_template_declaration_after_export (cp_pa decl = finish_member_template_decl (decl); } else if (friend_p decl - (TREE_CODE (decl) == TYPE_DECL - || DECL_TYPE_TEMPLATE_P (decl))) + DECL_DECLARES_TYPE_P (decl)) make_friend_class (current_class_type, TREE_TYPE (decl), /*complain=*/true); } @@ -21998,7 +21997,7 @@ cp_parser_template_declaration_after_export (cp_pa /* Check the template arguments for a literal operator template. */ if (decl - (TREE_CODE (decl) == FUNCTION_DECL || DECL_FUNCTION_TEMPLATE_P (decl)) + DECL_DECLARES_FUNCTION_P (decl) UDLIT_OPER_P (DECL_NAME (decl))) { bool ok = true; @@ -22034,8 +22033,7 @@ cp_parser_template_declaration_after_export (cp_pa (Even though there is no definition, there might be default arguments that need handling.) */ if (member_p decl - (TREE_CODE (decl) == FUNCTION_DECL - || DECL_FUNCTION_TEMPLATE_P (decl))) + DECL_DECLARES_FUNCTION_P (decl)) vec_safe_push (unparsed_funs_with_definitions, decl); } Index: pt.c === --- pt.c(revision 197280) +++ pt.c(working copy) @@ -8786,8 +8786,7 @@ instantiate_class_template_1 (tree type) pushtag (name, newtag, /*tag_scope=*/ts_current); } } - else if (TREE_CODE (t) == FUNCTION_DECL - || DECL_FUNCTION_TEMPLATE_P (t)) + else if (DECL_DECLARES_FUNCTION_P (t)) { /* Build new TYPE_METHODS. */ tree r; Index: search.c
[Fortran-dev][Patch, committed] Add version field, rename size to elem_len
I have committed (Rev.197282) the attached patch as obvious to the Fortran-dev branch. It add the int version field to the array constructor and moved size up, renaming it to elem_len and changing its type to size_t (which is effectively the same). This brings the array descriptor a bit closer to the one of TS29113. Additionally, the patch now sets version to 1 in some (few) cases, e.g. allocatables with SAVE attribute. Tobias PS: The next step is to fix a bunch of test-suite failures; some old, some due to the merge. The next bigger step is to remove offset, to split the dtype - and set version, elem_len, rank and type fields. Index: gcc/fortran/ChangeLog.fortran-dev === --- gcc/fortran/ChangeLog.fortran-dev (Revision 197281) +++ gcc/fortran/ChangeLog.fortran-dev (Arbeitskopie) @@ -1,3 +1,11 @@ +2013-03-31 Tobias Burnus bur...@net-b.de + + * trans-array.c (VERSION_FIELD): New define. + (ELEM_LEN_FIELD): Renamed from SIZE_FIELD, reordered the fields. + (gfc_build_null_descriptor): Also set version field (to 1). + * trans-types.c (gfc_get_array_descriptor_base): Rename size to + elem_len and move up, add version field. + 2012-07-20 Tobias Burnus bur...@net-b.de * trans-expr.c (conv_isocbinding_procedure): For C_F_Pointer, Index: gcc/fortran/trans-array.c === --- gcc/fortran/trans-array.c (Revision 197281) +++ gcc/fortran/trans-array.c (Arbeitskopie) @@ -124,11 +124,12 @@ Don't forget to #undef these! */ #define DATA_FIELD 0 -#define OFFSET_FIELD 1 -#define DTYPE_FIELD 2 -#define SIZE_FIELD 3 -#define DIMENSION_FIELD 4 -#define CAF_TOKEN_FIELD 5 +#define ELEM_LEN_FIELD 1 +#define VERSION_FIELD 2 +#define OFFSET_FIELD 3 +#define DTYPE_FIELD 4 +#define DIMENSION_FIELD 5 +#define CAF_TOKEN_FIELD 6 #define LBOUND_SUBFIELD 0 #define EXTENT_SUBFIELD 1 @@ -487,15 +488,23 @@ { tree field; tree tmp; + vecconstructor_elt, va_gc *init = NULL; gcc_assert (GFC_DESCRIPTOR_TYPE_P (type)); gcc_assert (DATA_FIELD == 0); + + /* Set a NULL data pointer. */ field = TYPE_FIELDS (type); + CONSTRUCTOR_APPEND_ELT (init, field, null_pointer_node); - /* Set a NULL data pointer. */ - tmp = build_constructor_single (type, field, null_pointer_node); + /* Set version to 1. */ + field = gfc_advance_chain (field, VERSION_FIELD); + CONSTRUCTOR_APPEND_ELT (init, field, + build_int_cst (integer_type_node, 1)); + + /* All other fields are ignored. */ + tmp = build_constructor (type, init); TREE_CONSTANT (tmp) = 1; - /* All other fields are ignored. */ return tmp; } @@ -535,9 +544,10 @@ /* Cleanup those #defines. */ #undef DATA_FIELD +#undef ELEM_LEN_FIELD +#undef VERSION_FIELD #undef OFFSET_FIELD #undef DTYPE_FIELD -#undef SIZE_FIELD #undef DIMENSION_FIELD #undef CAF_TOKEN_FIELD #undef STRIDE_SUBFIELD Index: gcc/fortran/trans-types.c === --- gcc/fortran/trans-types.c (Revision 197281) +++ gcc/fortran/trans-types.c (Arbeitskopie) @@ -1725,8 +1725,20 @@ ? prvoid_type_node : ptr_type_node), chain); - /* Add the base component. */ + /* Add the elem_len component. */ decl = gfc_add_field_to_struct_1 (fat_type, +get_identifier (elem_len), +size_type_node, chain); + TREE_NO_WARNING (decl) = 1; + + /* Add the version component. */ + decl = gfc_add_field_to_struct_1 (fat_type, +get_identifier (version), +integer_type_node, chain); + TREE_NO_WARNING (decl) = 1; + + /* Add the offset component. */ + decl = gfc_add_field_to_struct_1 (fat_type, get_identifier (offset), gfc_array_index_type, chain); TREE_NO_WARNING (decl) = 1; @@ -1737,11 +1749,6 @@ gfc_array_index_type, chain); TREE_NO_WARNING (decl) = 1; - /* Add the size component. */ - decl = gfc_add_field_to_struct_1 (fat_type, -get_identifier (size), -gfc_array_index_type, chain); - TREE_NO_WARNING (decl) = 1; /* Build the array type for the stride and bound components. */ Index: libgfortran/ChangeLog.fortran-dev === --- libgfortran/ChangeLog.fortran-dev (Revision 197281) +++ libgfortran/ChangeLog.fortran-dev (Arbeitskopie) @@ -1,3 +1,8 @@ +2013-03-31 Tobias Burnus bur...@net-b.de + + * ISO_Fortran_binding.h (CFI_cdesc_t): Change size to elem_len + and move up, add version field. + 2012-07-15 Tobias Burnus bur...@net-b.de * m4/cshift1.m4 (cshift1): Correctly set stride multiplier. Index: libgfortran/ISO_Fortran_binding.h === --- libgfortran/ISO_Fortran_binding.h (Revision 197281) +++ libgfortran/ISO_Fortran_binding.h (Arbeitskopie) @@ -1,5 +1,5 @@ /* ISO_Fortran_binding.h of GCC's GNU Fortran compiler. - Copyright (C) 2012 Free Software Foundation, Inc.
New German PO file for 'gcc' (version 4.8.0)
Hello, gentle maintainer. This is a message from the Translation Project robot. A revised PO file for textual domain 'gcc' has been submitted by the German team of translators. The file is available at: http://translationproject.org/latest/gcc/de.po (This file, 'gcc-4.8.0.de.po', has just now been sent to you in a separate email.) All other PO files for your package are available in: http://translationproject.org/latest/gcc/ Please consider including all of these in your next release, whether official or a pretest. Whenever you have a new distribution with a new version number ready, containing a newer POT file, please send the URL of that distribution tarball to the address below. The tarball may be just a pretest or a snapshot, it does not even have to compile. It is just used by the translators when they need some extra translation context. The following HTML page has been updated: http://translationproject.org/domain/gcc.html If any question arises, please contact the translation coordinator. Thank you for all your work, The Translation Project robot, in the name of your translation coordinator. coordina...@translationproject.org
[Fortran-dev][Patch, committed] Fix C_F_POINTER
This patch fixes a merge issue (trans-expr.c code was moved to trans-intrinsic.c on the trunk, and the branch was slightly different). One teststuite failure turned out to be due to debugging code on the branch - and I moved to the trunk version. Tobias Index: gcc/fortran/ChangeLog.fortran-dev === --- gcc/fortran/ChangeLog.fortran-dev (Revision 197283) +++ gcc/fortran/ChangeLog.fortran-dev (Arbeitskopie) @@ -1,5 +1,10 @@ 2013-03-31 Tobias Burnus bur...@net-b.de + * trans-intrinsic.c (conv_isocbinding_subroutine): Fix + merge-resolution bug. + +2013-03-31 Tobias Burnus bur...@net-b.de + * trans-array.c (VERSION_FIELD): New define. (ELEM_LEN_FIELD): Renamed from SIZE_FIELD, reordered the fields. (gfc_build_null_descriptor): Also set version field (to 1). Index: gcc/fortran/trans-intrinsic.c === --- gcc/fortran/trans-intrinsic.c (Revision 197283) +++ gcc/fortran/trans-intrinsic.c (Arbeitskopie) @@ -6467,6 +6467,10 @@ conv_isocbinding_subroutine (gfc_code *code) tmp = fold_build2_loc (input_location, TRUNC_DIV_EXPR, gfc_array_index_type, sm, fold_convert (TREE_TYPE (sm), tmp)); + gfc_add_modify (body, offset, + fold_build2_loc (input_location, PLUS_EXPR, + gfc_array_index_type, offset, tmp)); + /* Update stride multiplier. */ gfc_add_modify (body, sm, fold_build2_loc (input_location, MULT_EXPR, Index: gcc/testsuite/ChangeLog.fortran-dev === --- gcc/testsuite/ChangeLog.fortran-dev (Revision 197283) +++ gcc/testsuite/ChangeLog.fortran-dev (Arbeitskopie) @@ -1,3 +1,7 @@ +2013-03-31 Tobias Burnus bur...@net-b.de + + * gfortran.dg/c_f_pointer_tests.f90: Move to trunk version. + 2012-07-20 Tobias Burnus bur...@net-b.de * gfortran.dg/c_f_pointer_tests_3.f90: Update scan-tree-dump Index: gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90 === --- gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90 (Revision 197283) +++ gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90 (Arbeitskopie) @@ -53,22 +53,16 @@ module c_f_pointer_tests shapeArray(1) = arrayLen call c_f_pointer(derivedArray, myF90DerivedArray, shapeArray) -print *, myF90DerivedArray(1) -!end ! upper bound of each dim is arrayLen2 -!shapeArray2(1) = dim1 -!shapeArray2(2) = dim2 -!call c_f_pointer(derived2DArray, derivedArray2D, shapeArray2) -!print *, derivedArray2D(dim1, dim2)%cInt -!print *, derivedArray2D(dim1, dim2)%cDouble -!print *, derivedArray2D(dim1, dim2)%cFloat -!print *, derivedArray2D(dim1, dim2)%cShort +shapeArray2(1) = dim1 +shapeArray2(2) = dim2 +call c_f_pointer(derived2DArray, derivedArray2D, shapeArray2) ! make sure the last element is ok -!if((derivedArray2D(dim1, dim2)%cInt .ne. 4) .or. -! (derivedArray2D(dim1, dim2)%cDouble .ne. 4.0d0) .or. -! (derivedArray2D(dim1, dim2)%cFloat .ne. 4.0) .or. -! (derivedArray2D(dim1, dim2)%cShort .ne. 4)) then -! call abort() -!endif +if((derivedArray2D(dim1, dim2)%cInt .ne. 4) .or. + (derivedArray2D(dim1, dim2)%cDouble .ne. 4.0d0) .or. + (derivedArray2D(dim1, dim2)%cFloat .ne. 4.0) .or. + (derivedArray2D(dim1, dim2)%cShort .ne. 4)) then + call abort() +endif end subroutine testDerivedPtrs end module c_f_pointer_tests
[patch committed] [SH] Fix build failure on sh
Hi, I've committed the attached patch as a followup for the recent JUMP_TABLE_DATA change. Without this, SH fails to build during compiling libgcc. Regards, kaz -- 2013-03-31 Kaz Kojima kkoj...@gcc.gnu.org * config/sh/sh.md (casesi_worker_1): Use next_active_insn instead of next_real_insn. (casesi_worker_2, casesi_shift_media, casesi_load_media): Likewise. --- ORIG/trunk/gcc/config/sh/sh.md 2013-03-14 10:12:08.0 +0900 +++ trunk/gcc/config/sh/sh.md 2013-03-31 09:22:59.0 +0900 @@ -10725,7 +10725,7 @@ label: (clobber (match_scratch:SI 3 =X,1))] TARGET_SH1 { - rtx diff_vec = PATTERN (next_real_insn (operands[2])); + rtx diff_vec = PATTERN (next_active_insn (operands[2])); gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC); @@ -10759,7 +10759,7 @@ label: (clobber (match_operand:SI 4 =X,1))] TARGET_SH2 reload_completed flag_pic { - rtx diff_vec = PATTERN (next_real_insn (operands[2])); + rtx diff_vec = PATTERN (next_active_insn (operands[2])); gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC); switch (GET_MODE (diff_vec)) @@ -10797,7 +10797,7 @@ label: UNSPEC_CASESI)))] TARGET_SHMEDIA { - rtx diff_vec = PATTERN (next_real_insn (operands[2])); + rtx diff_vec = PATTERN (next_active_insn (operands[2])); gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC); @@ -10824,7 +10824,7 @@ label: (label_ref:DI (match_operand 3 ))] UNSPEC_CASESI)))] TARGET_SHMEDIA { - rtx diff_vec = PATTERN (next_real_insn (operands[3])); + rtx diff_vec = PATTERN (next_active_insn (operands[3])); gcc_assert (GET_CODE (diff_vec) == ADDR_DIFF_VEC);
[libstdc++,doc] Link fixes across the board
A dozen changes. There are some more, but it's hard to find those amidst all those changes already made (and the mess that ext/lwg-* is), so I went ahead and committed what I have. Jonathan, Benjamin, it would be great could you regenerate the HTML files in the tree and update onlinedocs/ on gcc.gnu.org. Gerald 2013-03-30 Gerald Pfeifer ger...@pfeifer.com * doc/xml/manual/allocator.xml: Adjust link to Dr.Dobb's article.q * doc/xml/manual/appendix_contributing.xml: Adjust link to GNU Coding Standards. * doc/xml/manual/debug.xml: Adjust link for ThreadSanitizer. * doc/xml/manual/debug_mode.xml: Adjust link for SafeSTL. * doc/xml/manual/documentation_hacking.xml: Adjust Doxygen link. * doc/xml/manual/messages.xml: Adjust link to Java API specs. * doc/xml/manual/policy_data_structures: Remove direct link to IBM Haifa Research Labs. * doc/xml/manual/policy_data_structures_biblio.xml: Adjust links for biblio.maverik_lowerbounds and biblio.nelson96stlpq. * doc/xml/manual/profile_mode.xml: Adjust two links to acm.org papers. * doc/xml/manual/shared_ptr.xml: Use canonical address for www.boost.org. 2013-03-27 Kai Tietz kti...@redhat.com * crossconfig.m4: Add support for cygwin x64 target. Index: doc/xml/manual/allocator.xml === --- doc/xml/manual/allocator.xml(revision 197283) +++ doc/xml/manual/allocator.xml(working copy) @@ -504,7 +504,7 @@ biblioentry title link xmlns:xlink=http://www.w3.org/1999/xlink; - xlink:href=http://www.drdobbs.com/cpp/184403759; + xlink:href=http://www.drdobbs.com/the-standard-librarian-what-are-allocato/184403759; The Standard Librarian: What Are Allocators Good For? /link /title Index: doc/xml/manual/appendix_contributing.xml === --- doc/xml/manual/appendix_contributing.xml(revision 197283) +++ doc/xml/manual/appendix_contributing.xml(working copy) @@ -68,7 +68,7 @@ listitem para Peruse - the link xmlns:xlink=http://www.w3.org/1999/xlink; xlink:href=http://www.gnu.org/prep/standards;GNU + the link xmlns:xlink=http://www.w3.org/1999/xlink; xlink:href=http://www.gnu.org/prep/standards/;GNU Coding Standards/link, and chuckle when you hit the part about quoteUsing Languages Other Than C/quote. /para Index: doc/xml/manual/debug.xml === --- doc/xml/manual/debug.xml(revision 197283) +++ doc/xml/manual/debug.xml(working copy) @@ -234,7 +234,7 @@ xlink:href=http://valgrind.org/docs/manual/hg-manual.html; Helgrind/link, and link xmlns:xlink=http://www.w3.org/1999/xlink; - xlink:href=http://code.google.com/p/data-race-test; + xlink:href=http://code.google.com/p/data-race-test/; ThreadSanitizer/link. /para Index: doc/xml/manual/debug_mode.xml === --- doc/xml/manual/debug_mode.xml (revision 197283) +++ doc/xml/manual/debug_mode.xml (working copy) @@ -856,7 +856,7 @@ supports debugging for programs using libstdc++. The existing implementations include:/para itemizedlist - listitemparalink xmlns:xlink=http://www.w3.org/1999/xlink; xlink:href=http://www.mathcs.sjsu.edu/faculty/horstman/safestl.html;SafeSTL/link: + listitemparalink xmlns:xlink=http://www.w3.org/1999/xlink; xlink:href=http://www.cs.sjsu.edu/faculty/horstman/safestl.html;SafeSTL/link: SafeSTL was the original debugging version of the Standard Template Library (STL), implemented by Cay S. Horstmann on top of the Hewlett-Packard STL. Though it inspired much work in this area, it Index: doc/xml/manual/documentation_hacking.xml === --- doc/xml/manual/documentation_hacking.xml(revision 197283) +++ doc/xml/manual/documentation_hacking.xml(working copy) @@ -443,9 +443,8 @@ para Some commentary to accompany - the first list in the link xmlns:xlink=http://www.w3.org/1999/xlink; xlink:href=http://www.stack.nl/~dimitri/doxygen/docblocks.html;Special - Documentation Blocks/link section of - the Doxygen manual: + the first list in the link xmlns:xlink=http://www.w3.org/1999/xlink; xlink:href=http://www.stack.nl/~dimitri/doxygen/manual/docblocks.html;Special + Documentation Blocks/link section of the Doxygen manual: /para orderedlist inheritnum=ignore continuation=restarts Index: doc/xml/manual/messages.xml === --- doc/xml/manual/messages.xml (revision 197283) +++ doc/xml/manual/messages.xml (working copy) @@ -541,7 +541,7 @@
Constant folding of VEC_COND_EXPR
Hello, this adds constant folding of VEC_COND_EXPR at the tree level by forwarding to the VEC_PERM_EXPR code (a merge is a special case of a permutation). The CONSTRUCTOR case may be unreachable for now (it will probably need an extra piece of code in tree-ssa-forwprop.c), but it seems better to add it at the same time. bootstrap+testsuite on x86_64-linux-gnu. 2013-03-31 Marc Glisse marc.gli...@inria.fr PR tree-optimization/56790 * fold-const.c (fold_ternary_loc) VEC_COND_EXPR: Add constant folding. testsuite/ * g++.dg/ext/pr56790-1.C: New testcase. -- Marc GlisseIndex: gcc/testsuite/g++.dg/ext/pr56790-1.C === --- gcc/testsuite/g++.dg/ext/pr56790-1.C(revision 0) +++ gcc/testsuite/g++.dg/ext/pr56790-1.C(revision 0) @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options -O2 -fdump-tree-ccp1 } */ + +typedef long vec __attribute__ ((vector_size (2 * sizeof (long; + +vec f (void) +{ + vec a = { 5, 7 }; + vec b = { 11, 13 }; + vec m = { -1, 0 }; + return m ? a : b; +} + +/* { dg-final { scan-tree-dump { 5, 13 } ccp1 } } */ +/* { dg-final { scan-tree-dump-not VEC_COND_EXPR ccp1 } } */ +/* { dg-final { cleanup-tree-dump ccp1 } } */ Property changes on: gcc/testsuite/g++.dg/ext/pr56790-1.C ___ Added: svn:keywords + Author Date Id Revision URL Added: svn:eol-style + native Index: gcc/fold-const.c === --- gcc/fold-const.c(revision 197284) +++ gcc/fold-const.c(working copy) @@ -13917,20 +13917,43 @@ fold_ternary_loc (location_t loc, enum t || VOID_TYPE_P (type))) return pedantic_non_lvalue_loc (loc, tem); return NULL_TREE; } else if (TREE_CODE (arg0) == VECTOR_CST) { if (integer_all_onesp (arg0)) return pedantic_omit_one_operand_loc (loc, type, arg1, arg2); if (integer_zerop (arg0)) return pedantic_omit_one_operand_loc (loc, type, arg2, arg1); + + if ((TREE_CODE (arg1) == VECTOR_CST + || TREE_CODE (arg1) == CONSTRUCTOR) + (TREE_CODE (arg2) == VECTOR_CST + || TREE_CODE (arg2) == CONSTRUCTOR)) + { + unsigned int nelts = TYPE_VECTOR_SUBPARTS (type), i; + unsigned char *sel = XALLOCAVEC (unsigned char, nelts); + gcc_assert (nelts == VECTOR_CST_NELTS (arg0)); + for (i = 0; i nelts; i++) + { + tree val = VECTOR_CST_ELT (arg0, i); + if (integer_all_onesp (val)) + sel[i] = i; + else if (integer_zerop (val)) + sel[i] = nelts + i; + else + gcc_unreachable (); + } + tree t = fold_vec_perm (type, arg1, arg2, sel); + if (t != NULL_TREE) + return t; + } } if (operand_equal_p (arg1, op2, 0)) return pedantic_omit_one_operand_loc (loc, type, arg1, arg0); /* If we have A op B ? A : C, we may be able to convert this to a simpler expression, depending on the operation and the values of B and C. Signed zeros prevent all of these transformations, for reasons given above each one.
Re: C++ PATCH: use C++ semantics for inline functions (defined in headers)
Marc Glisse marc.gli...@inria.fr writes: | On Thu, 28 Mar 2013, Gabriel Dos Reis wrote: | | C++ has a much more predictable semantics for inline functions, so we no | longer need to define them (especially in header files) with the | 'static' specifier. The upshot is that when the compiler fails to | inline a call in a given translation unit, it keeps only one copy in the | entire program, instead of multiple copies (as the 'static' specifier | would have implied.) | | With this patch, there is 2K reduction in size for cc1plus. | Applying to trunk. Tested on an x86_64-suse-linux. | | Hi, | | the size reduction looks nice, should the same be applied throughout the | compiler? Yes, ideally this should be done throught the entire compiler, except for the headers/functions that are still shared with the runtime compiled with a C compiler. | I didn't check if the cxx-conversion branch already does it. No, it does not do it -- at least when I checked. -- Gaby
Re: [C++ Patch] Use DECL_DECLARES_TYPE_P, DECL_DECLARES_FUNCTION_P more
On Sun, Mar 31, 2013 at 5:26 AM, Paolo Carlini paolo.carl...@oracle.com wrote: Hi, just more straightforward uses of existing predicates. I'm going to boot test and commit as obvious. Thanks, Paolo. souns good to me.
[wwwdocs] Update Blackfin reference in readings.html
Applied. Gerald Index: readings.html === RCS file: /cvs/gcc/wwwdocs/htdocs/readings.html,v retrieving revision 1.226 diff -u -3 -p -r1.226 readings.html --- readings.html 30 Mar 2013 18:04:28 - 1.226 +++ readings.html 31 Mar 2013 15:16:42 - @@ -87,7 +87,7 @@ names. br /Manufacturer: Analog Devices br /a href=http://blackfin.uclinux.org/gf/;uClinux and GNU toolchains for the Blackfin/a - br /a href=http://www.analog.com/processors/blackfin/index.html;Blackfin Documentation/a + br /a href=http://www.analog.com/en/processors-dsp/blackfin/products/index.html;Blackfin Documentation/a /li lic4x
[wwwdocs,Java] Link maintenance on java/done.html
Applied. www.swarm.org appears very, hmm, shallow these days, but I kept it. iRATE does not seem to have a suitable page any more? Gerald 2013-03-31 Gerald Pfeifer ger...@pfeifer.com * done.html: Remove broken link to iRATE. Adjust link to Swarm. Index: done.html === RCS file: /cvs/gcc/wwwdocs/htdocs/java/done.html,v retrieving revision 1.52 diff -u -3 -p -r1.52 done.html --- done.html 27 Oct 2012 19:35:49 - 1.52 +++ done.html 31 Mar 2013 15:05:51 - @@ -25,7 +25,7 @@ !-- iRate -- tr valign=top -tdba href=http://irate.sourceforge.net/;iRATE radio/a/b/td +tdbiRATE radio/b/td tdiRATE radio is a popular client/server mp3 player/downloader featuring collaborative filtering: you rate the tracks and it uses your ratings and other people's to guess @@ -106,7 +106,7 @@ !-- End PAL -- !-- Swarm -- tr valign=top -tdba href=http://www.swarm.org/wiki/Main_Page;Swarm/a/b/td +tdba href=http://www.swarm.org;Swarm/a/b/td tdSwarm is a fine-grained distributed discrete event simulator. Swarm is mainly used for agent-based
Re: [wwwdocs] Two more broken links in readings.html
On Sun, 31 Mar 2013, minux wrote: the link for CompactRISC CR16CP Architecture on that page is also broken. As TI says document for CR16 is only available to existing customers, i'm afraid we have to remove that link. You mean the fact that the page redirects to the TI home page and after searching a bit, CR16 Datasheets are available only to existing customers. Contact your sales representative. on http://www.ti.com/ww/en/mcu/cop/cop-cp3k-cr16.html was the best? Good point, I have removed the link as well per the patch below. Thanks, Gerald Index: readings.html === RCS file: /cvs/gcc/wwwdocs/htdocs/readings.html,v retrieving revision 1.227 diff -u -3 -p -r1.227 readings.html --- readings.html 31 Mar 2013 15:18:35 - 1.227 +++ readings.html 31 Mar 2013 15:37:16 - @@ -103,8 +103,7 @@ names. liCR16 br /Manufacturer: National Semiconductor - br /Acronym stands for: CompactRISC 16-bit - br /a href=http://www.national.com/en/compactrisc/core_arch.html;CompactRISC CR16CP Architecture/a + br /Acronym stands for: CompactRISC 16-bit br /GDB includes a simulator /li
Re: [google] Add option to emit mapping between module/function id and function name (issue8211043)
ok. thanks, David On Sat, Mar 30, 2013 at 11:44 PM, Teresa Johnson tejohn...@google.com wrote: This patch restores part of r196176, which was subsequently reverted due to issues with the other part of that patch that dealt with module info updates. This patch restores the option -femit-function-names to emit to stderr the mapping from module name/function id to function assembler name. This enables mapping the function ids in the gcda dump files to the symbolic function name. This will work for LIPO builds without the other part of that patch, which was needed for FDO builds, and which needs to be revisited and fixed. Tested by bootstrap and regression testing. Ok for google-4_7? 2013-03-30 Teresa Johnson tejohn...@google.com * tree-profile.c (tree_profiling): Optionally call new function emit_function_name. * common.opt (flag_emit_function_names): New flag. * coverage.c (emit_function_name): New function. * coverage.h: Ditto. Index: tree-profile.c === --- tree-profile.c (revision 197266) +++ tree-profile.c (working copy) @@ -1557,6 +1557,9 @@ tree_profiling (void) /* Re-set global shared temporary variable for edge-counters. */ gcov_type_tmp_var = NULL_TREE; + if (flag_emit_function_names) +emit_function_name (); + /* Local pure-const may imply need to fixup the cfg. */ if (execute_fixup_cfg () TODO_cleanup_cfg) cleanup_tree_cfg (); Index: common.opt === --- common.opt (revision 197266) +++ common.opt (working copy) @@ -1775,6 +1775,13 @@ fprofile-generate-sampling Common Var(flag_profile_generate_sampling) Turn on instrumentation sampling with -fprofile-generate with rate set by --param profile-generate-sampling-rate or environment variable GCOV_SAMPLING_RATE +femit-function-names +Common Var(flag_emit_function_names) +Print to stderr the mapping from module name and function id to assembler +function name when -ftest-coverage, -fprofile-generate or -fprofile-use are +active, for use in correlating function ids in gcda files with the function +name. + fprofile-strip= Common Joined RejectNegative Var(profile_base_name_suffix_to_strip) Specify a substring to be stripped from the profile base file name Index: coverage.c === --- coverage.c (revision 197266) +++ coverage.c (working copy) @@ -2085,6 +2085,19 @@ build_cl_args_array_value (tree string_type, VEC(c return; } +/* Emit mapping between module name and function id to the function's + assembler name, for use in correlating function idents in the gcda file + with the function name. */ + +void +emit_function_name (void) +{ + fprintf (stderr, Module %s FuncId %u Name %s\n, + main_input_file_name, + FUNC_DECL_FUNC_ID (cfun), + IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (current_function_decl))); +} + /* Returns the type of the module info associated with the current source module being compiled. */ Index: coverage.h === --- coverage.h (revision 197266) +++ coverage.h (working copy) @@ -75,6 +75,8 @@ extern void coverage_dc_end_function (void); is present in the coverage internal data structures. */ extern bool coverage_function_present (unsigned fn_ident); +extern void emit_function_name (void); + /* True if there is PMU data present in this compilation. */ extern bool pmu_data_present (void); -- This patch is available for review at http://codereview.appspot.com/8211043
Re: [PATCH] Avoid warning when unused attribute applied to C++ member variables (issue8212043)
On Sun, Mar 31, 2013 at 1:36 AM, Andrew Pinski pins...@gmail.com wrote: On Sun, Mar 31, 2013 at 12:10 AM, Teresa Johnson tejohn...@google.com wrote: This patch allows the unused attribute to be used without warning on C++ class members, which are of type FIELD_DECL. This is for compatibility with clang, which allows the attribute to be specified on class members and struct fields. It looks like more work would need to be done to implement the actual unused variable detection and warning on FIELD_DECLs, but this change will at least avoid the warning on the code that uses the unused attribute in these cases. The documentation at http://gcc.gnu.org/onlinedocs/gcc/Variable-Attributes.html also doesn't seem to preclude its use on C++ member variables. This also allows it on field in normal C case. As far as I understand they are fields and not variables in the normal programming sense which is why the document does not mention them. That's true that this change will also allow the unused attribute on normal C struct fields. I just verified that clang also allows this, and it could potentially be taken advantage of to warn on unused fields as well. Teresa Thanks, Andrew Pinski Bootstrapped and tested on x86-64-unknown-linux-gnu. Ok for trunk? 2013-03-30 Teresa Johnson tejohn...@google.com * c-family/c-common.c (handle_unused_attribute): Handle FIELD_DECL for C++ class members. Index: c-family/c-common.c === --- c-family/c-common.c (revision 197266) +++ c-family/c-common.c (working copy) @@ -6753,6 +6753,7 @@ handle_unused_attribute (tree *node, tree name, tr if (TREE_CODE (decl) == PARM_DECL || TREE_CODE (decl) == VAR_DECL + || TREE_CODE (decl) == FIELD_DECL || TREE_CODE (decl) == FUNCTION_DECL || TREE_CODE (decl) == LABEL_DECL || TREE_CODE (decl) == TYPE_DECL) -- This patch is available for review at http://codereview.appspot.com/8212043 -- Teresa Johnson | Software Engineer | tejohn...@google.com | 408-460-2413
Re: Constant folding of VEC_COND_EXPR
On Sun, Mar 31, 2013 at 6:31 AM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this adds constant folding of VEC_COND_EXPR at the tree level by forwarding to the VEC_PERM_EXPR code (a merge is a special case of a permutation). The CONSTRUCTOR case may be unreachable for now (it will probably need an extra piece of code in tree-ssa-forwprop.c), but it seems better to add it at the same time. bootstrap+testsuite on x86_64-linux-gnu. 2013-03-31 Marc Glisse marc.gli...@inria.fr PR tree-optimization/56790 * fold-const.c (fold_ternary_loc) VEC_COND_EXPR: Add constant folding. testsuite/ * g++.dg/ext/pr56790-1.C: New testcase. -- Marc Glisse Index: gcc/testsuite/g++.dg/ext/pr56790-1.C === --- gcc/testsuite/g++.dg/ext/pr56790-1.C(revision 0) +++ gcc/testsuite/g++.dg/ext/pr56790-1.C(revision 0) @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options -O2 -fdump-tree-ccp1 } */ + +typedef long vec __attribute__ ((vector_size (2 * sizeof (long; + +vec f (void) +{ + vec a = { 5, 7 }; + vec b = { 11, 13 }; + vec m = { -1, 0 }; + return m ? a : b; +} + +/* { dg-final { scan-tree-dump { 5, 13 } ccp1 } } */ +/* { dg-final { scan-tree-dump-not VEC_COND_EXPR ccp1 } } */ +/* { dg-final { cleanup-tree-dump ccp1 } } */ Property changes on: gcc/testsuite/g++.dg/ext/pr56790-1.C ___ Added: svn:keywords + Author Date Id Revision URL Added: svn:eol-style + native Index: gcc/fold-const.c === --- gcc/fold-const.c(revision 197284) +++ gcc/fold-const.c(working copy) @@ -13917,20 +13917,43 @@ fold_ternary_loc (location_t loc, enum t || VOID_TYPE_P (type))) return pedantic_non_lvalue_loc (loc, tem); return NULL_TREE; } else if (TREE_CODE (arg0) == VECTOR_CST) { if (integer_all_onesp (arg0)) return pedantic_omit_one_operand_loc (loc, type, arg1, arg2); if (integer_zerop (arg0)) return pedantic_omit_one_operand_loc (loc, type, arg2, arg1); + + if ((TREE_CODE (arg1) == VECTOR_CST + || TREE_CODE (arg1) == CONSTRUCTOR) + (TREE_CODE (arg2) == VECTOR_CST + || TREE_CODE (arg2) == CONSTRUCTOR)) + { + unsigned int nelts = TYPE_VECTOR_SUBPARTS (type), i; + unsigned char *sel = XALLOCAVEC (unsigned char, nelts); + gcc_assert (nelts == VECTOR_CST_NELTS (arg0)); + for (i = 0; i nelts; i++) + { + tree val = VECTOR_CST_ELT (arg0, i); + if (integer_all_onesp (val)) + sel[i] = i; + else if (integer_zerop (val)) + sel[i] = nelts + i; + else + gcc_unreachable (); I think this gcc_unreachable here is incorrect as it could cause an internal compiler error for target dependent code Try for: typedef long vec __attribute__ ((vector_size (2 * sizeof (long; vec f (void) { vec a = { 5, 7 }; vec b = { 11, 13 }; vec m = { 3, 2 }; return m ? a : b; } I think for the above case we don't want to do any constant folding. Thanks, Andrew Pinski + } + tree t = fold_vec_perm (type, arg1, arg2, sel); + if (t != NULL_TREE) + return t; + } } if (operand_equal_p (arg1, op2, 0)) return pedantic_omit_one_operand_loc (loc, type, arg1, arg0); /* If we have A op B ? A : C, we may be able to convert this to a simpler expression, depending on the operation and the values of B and C. Signed zeros prevent all of these transformations, for reasons given above each one.
[wwwdocs,Ada] Fix four links and adjust one in readings.html
This updates five Ada-related links, four borken ones to adaic.org and the libre.adacore.com that redirects now. Applied. Gerald Index: readings.html === RCS file: /cvs/gcc/wwwdocs/htdocs/readings.html,v retrieving revision 1.228 diff -u -3 -p -r1.228 readings.html --- readings.html 31 Mar 2013 15:37:44 - 1.228 +++ readings.html 31 Mar 2013 17:06:51 - @@ -551,11 +551,11 @@ Intelreg;64 and IA-32 Architectures Sof Reference Manual/a/li lia href=http://www.adaic.org/resources/add_content/standards/05rat/html/Rat-TTL.html;Adanbsp;2005 Rationale/a/li - lia href=http://www.adaic.com/standards/95aarm/html/AA-TTL.html; + lia href=http://www.adaic.org/resources/add_content/standards/95aarm/AARM_HTML/AA-TTL.html; Annotated Adanbsp;95 Reference Manual/a/li - lia href=http://www.adaic.com/standards/95lrm/html/RM-TTL.html; + lia href=http://www.adaic.org/resources/add_content/standards/95lrm/ARM_HTML/RM-TTL.html; Adanbsp;95 Reference Manual/a/li - lia href=http://www.adaic.com/standards/95rat/RAThtml/rat95-copyright.html; + lia href=http://www.adaic.org/resources/add_content/standards/95rat/rat95html/rat95-contents.html; Adanbsp;95 Rationale/a/li lia href=http://archive.adaic.com/standards/83lrm/html/ada_lrm.html; Adanbsp;83 Reference Manual/a/li @@ -578,10 +578,10 @@ Intelreg;64 and IA-32 Architectures Sof liOther resources: ul - lia href=http://libre.adacore.com/libre/;AdaCore mdash; Libre Site/a/li + lia href=http://libre.adacore.com/;AdaCore mdash; Libre Site/a/li lia href=https://www2.adacore.com/gap-static/GNAT_Book/html/;GNAT: The GNU Ada Compiler/a/li - lia href=http://www.adaic.org/docs/95style/html/cover.html;Ada + lia href=http://www.adaic.org/resources/add_content/docs/95style/html/cover.html;Ada Quality amp; Style Guide/a/li lia href=http://www.sigada.org/ada_letters/jun2004/ravenscar_article.pdf;Guide for the use of the Ada Ravenscar Profile in high integrity
Re: Constant folding of VEC_COND_EXPR
On Sun, 31 Mar 2013, Andrew Pinski wrote: On Sun, Mar 31, 2013 at 6:31 AM, Marc Glisse marc.gli...@inria.fr wrote: Hello, this adds constant folding of VEC_COND_EXPR at the tree level by forwarding to the VEC_PERM_EXPR code (a merge is a special case of a permutation). The CONSTRUCTOR case may be unreachable for now (it will probably need an extra piece of code in tree-ssa-forwprop.c), but it seems better to add it at the same time. bootstrap+testsuite on x86_64-linux-gnu. 2013-03-31 Marc Glisse marc.gli...@inria.fr PR tree-optimization/56790 * fold-const.c (fold_ternary_loc) VEC_COND_EXPR: Add constant folding. testsuite/ * g++.dg/ext/pr56790-1.C: New testcase. -- Marc Glisse Index: gcc/testsuite/g++.dg/ext/pr56790-1.C === --- gcc/testsuite/g++.dg/ext/pr56790-1.C(revision 0) +++ gcc/testsuite/g++.dg/ext/pr56790-1.C(revision 0) @@ -0,0 +1,16 @@ +/* { dg-do compile } */ +/* { dg-options -O2 -fdump-tree-ccp1 } */ + +typedef long vec __attribute__ ((vector_size (2 * sizeof (long; + +vec f (void) +{ + vec a = { 5, 7 }; + vec b = { 11, 13 }; + vec m = { -1, 0 }; + return m ? a : b; +} + +/* { dg-final { scan-tree-dump { 5, 13 } ccp1 } } */ +/* { dg-final { scan-tree-dump-not VEC_COND_EXPR ccp1 } } */ +/* { dg-final { cleanup-tree-dump ccp1 } } */ Property changes on: gcc/testsuite/g++.dg/ext/pr56790-1.C ___ Added: svn:keywords + Author Date Id Revision URL Added: svn:eol-style + native Index: gcc/fold-const.c === --- gcc/fold-const.c(revision 197284) +++ gcc/fold-const.c(working copy) @@ -13917,20 +13917,43 @@ fold_ternary_loc (location_t loc, enum t || VOID_TYPE_P (type))) return pedantic_non_lvalue_loc (loc, tem); return NULL_TREE; } else if (TREE_CODE (arg0) == VECTOR_CST) { if (integer_all_onesp (arg0)) return pedantic_omit_one_operand_loc (loc, type, arg1, arg2); if (integer_zerop (arg0)) return pedantic_omit_one_operand_loc (loc, type, arg2, arg1); + + if ((TREE_CODE (arg1) == VECTOR_CST + || TREE_CODE (arg1) == CONSTRUCTOR) + (TREE_CODE (arg2) == VECTOR_CST + || TREE_CODE (arg2) == CONSTRUCTOR)) + { + unsigned int nelts = TYPE_VECTOR_SUBPARTS (type), i; + unsigned char *sel = XALLOCAVEC (unsigned char, nelts); + gcc_assert (nelts == VECTOR_CST_NELTS (arg0)); + for (i = 0; i nelts; i++) + { + tree val = VECTOR_CST_ELT (arg0, i); + if (integer_all_onesp (val)) + sel[i] = i; + else if (integer_zerop (val)) + sel[i] = nelts + i; + else + gcc_unreachable (); I think this gcc_unreachable here is incorrect as it could cause an internal compiler error for target dependent code Try for: typedef long vec __attribute__ ((vector_size (2 * sizeof (long; vec f (void) { vec a = { 5, 7 }; vec b = { 11, 13 }; vec m = { 3, 2 }; return m ? a : b; } I think for the above case we don't want to do any constant folding. For vectors, we decided in 4.8 that x ? y : z would mean vec_cond_expr x != 0, y, z, and that is what the C++ front-end generates, so your testcase works fine and returns a. Re-reading doc/generic.texi, I see: If an element of the first operand evaluates to a zero value, the corresponding element of the result is taken from the third operand. If it evaluates to a minus one value, it is taken from the second operand. It should never evaluate to any other value currently, but optimizations should not rely on that property. Well, at least I am not silently relying on that property, but it looks like you are right and I am supposed to leave those (impossible) values alone. -- Marc Glisse
Re: patch to fix constant math - first small patch - patch ping for the next stage 1
richard, I was able to add everything except for the checking asserts.While I think that this is a reasonable idea, it is difficult to add that to a function that is defined in hwint.h because of circular includes. I could move this another file (though this appears to be the logical correct place for it), or we can do without the asserts. The context is that [sz]ext_hwi is that are used are over the compiler but are generally written out long. The wide-int class uses them also, but wide-int did not see like the right place for them to live and i believe that you suggested that i move them. ok to commit, or do you have a suggested resolution to the assert issue? kenny On 03/27/2013 10:13 AM, Richard Biener wrote: On Wed, Feb 27, 2013 at 1:22 AM, Kenneth Zadeck zad...@naturalbridge.com wrote: Here is the first of my wide int patches with joseph's comments and the patch rot removed. I would like to get these pre approved for the next stage 1. + int shift = HOST_BITS_PER_WIDE_INT - (prec (HOST_BITS_PER_WIDE_INT - 1)); I think this should gcc_checking_assert that prec is not out of range (any reason why prec is signed int and not unsigned int?) rather than ignore bits in prec. +static inline HOST_WIDE_INT +zext_hwi (HOST_WIDE_INT src, int prec) +{ + if (prec == HOST_BITS_PER_WIDE_INT) +return src; + else +return src (((HOST_WIDE_INT)1 + (prec (HOST_BITS_PER_WIDE_INT - 1))) - 1); +} likewise. Also I'm not sure I agree about the signedness of the result / src. zext_hwi (-1, HOST_BITS_PER_WIDE_INT) 0 is true which is odd. The patch misses context of uses, so I'm not sure what the above functions are intended to do. Richard. On 10/05/2012 08:14 PM, Joseph S. Myers wrote: On Fri, 5 Oct 2012, Kenneth Zadeck wrote: +# define HOST_HALF_WIDE_INT_PRINT h This may cause problems on hosts not supporting %hd (MinGW?), and there's no real need for using h here given the promotion of short to int; you can just use (rather than e.g. needing special handling in xm-mingw32.h like is done for HOST_LONG_LONG_FORMAT). diff --git a/gcc/hwint.h b/gcc/hwint.h index da62fad..b086af0 100644 --- a/gcc/hwint.h +++ b/gcc/hwint.h @@ -76,6 +76,40 @@ extern char sizeof_long_long_must_be_8[sizeof(long long) == 8 ? 1 : -1]; # endif #endif +/* Print support for half a host wide int. */ +#define HOST_BITS_PER_HALF_WIDE_INT (HOST_BITS_PER_WIDE_INT / 2) +#if HOST_BITS_PER_HALF_WIDE_INT == HOST_BITS_PER_LONG +# define HOST_HALF_WIDE_INT long +# define HOST_HALF_WIDE_INT_PRINT HOST_LONG_FORMAT +# define HOST_HALF_WIDE_INT_PRINT_C L +# define HOST_HALF_WIDE_INT_PRINT_DEC % HOST_HALF_WIDE_INT_PRINT d +# define HOST_HALF_WIDE_INT_PRINT_DEC_C HOST_HALF_WIDE_INT_PRINT_DEC HOST_HALF_WIDE_INT_PRINT_C +# define HOST_HALF_WIDE_INT_PRINT_UNSIGNED % HOST_HALF_WIDE_INT_PRINT u +# define HOST_HALF_WIDE_INT_PRINT_HEX %# HOST_HALF_WIDE_INT_PRINT x +# define HOST_HALF_WIDE_INT_PRINT_HEX_PURE % HOST_HALF_WIDE_INT_PRINT x +#elif HOST_BITS_PER_HALF_WIDE_INT == HOST_BITS_PER_INT +# define HOST_HALF_WIDE_INT int +# define HOST_HALF_WIDE_INT_PRINT +# define HOST_HALF_WIDE_INT_PRINT_C +# define HOST_HALF_WIDE_INT_PRINT_DEC % HOST_HALF_WIDE_INT_PRINT d +# define HOST_HALF_WIDE_INT_PRINT_DEC_C HOST_HALF_WIDE_INT_PRINT_DEC HOST_HALF_WIDE_INT_PRINT_C +# define HOST_HALF_WIDE_INT_PRINT_UNSIGNED % HOST_HALF_WIDE_INT_PRINT u +# define HOST_HALF_WIDE_INT_PRINT_HEX %# HOST_HALF_WIDE_INT_PRINT x +# define HOST_HALF_WIDE_INT_PRINT_HEX_PURE % HOST_HALF_WIDE_INT_PRINT x +#elif HOST_BITS_PER_HALF_WIDE_INT == HOST_BITS_PER_SHORT +# define HOST_HALF_WIDE_INT short +# define HOST_HALF_WIDE_INT_PRINT +# define HOST_HALF_WIDE_INT_PRINT_C +# define HOST_HALF_WIDE_INT_PRINT_DEC % HOST_HALF_WIDE_INT_PRINT d +# define HOST_HALF_WIDE_INT_PRINT_DEC_C HOST_HALF_WIDE_INT_PRINT_DEC HOST_HALF_WIDE_INT_PRINT_C +# define HOST_HALF_WIDE_INT_PRINT_UNSIGNED % HOST_HALF_WIDE_INT_PRINT u +# define HOST_HALF_WIDE_INT_PRINT_HEX %# HOST_HALF_WIDE_INT_PRINT x +# define HOST_HALF_WIDE_INT_PRINT_HEX_PURE % HOST_HALF_WIDE_INT_PRINT x +#else +#error Please add support for HOST_HALF_WIDE_INT +#endif + + #define HOST_WIDE_INT_1 HOST_WIDE_INT_C(1) /* This is a magic identifier which allows GCC to figure out the type @@ -93,9 +127,13 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__; # if HOST_BITS_PER_WIDE_INT == 64 # define HOST_WIDE_INT_PRINT_DOUBLE_HEX \ 0x% HOST_LONG_FORMAT x%016 HOST_LONG_FORMAT x +# define HOST_WIDE_INT_PRINT_PADDED_HEX \ + %016 HOST_LONG_FORMAT x # else # define HOST_WIDE_INT_PRINT_DOUBLE_HEX \ 0x% HOST_LONG_FORMAT x%08 HOST_LONG_FORMAT x +# define HOST_WIDE_INT_PRINT_PADDED_HEX \ + %08 HOST_LONG_FORMAT x # endif #else # define HOST_WIDE_INT_PRINT HOST_LONG_LONG_FORMAT @@ -103,6 +141,8 @@ typedef HOST_WIDE_INT __gcc_host_wide_int__; /* We can assume that 'long long' is at least 64 bits. */ # define HOST_WIDE_INT_PRINT_DOUBLE_HEX \ 0x% HOST_LONG_LONG_FORMAT x%016
[wwwdocs] testing/testing-qt.html link update
Trolltech went the way of the Nokia^WDodo, but some mirror sites still care the tarballs. Applied, though I don't think those testing instructions are all that useful any more (while they were a good idea). Gerald Index: testing-qt.html === RCS file: /cvs/gcc/wwwdocs/htdocs/testing/testing-qt.html,v retrieving revision 1.6 diff -u -3 -p -r1.6 testing-qt.html --- testing-qt.html 25 Oct 2008 16:47:15 - 1.6 +++ testing-qt.html 31 Mar 2013 19:56:45 - @@ -13,7 +13,7 @@ application development toolkit as part h2Resource usage/h2 pThe Qt distribution, available from Trolltech's site at -a href=ftp://ftp.trolltech.com/qt/source/qt-x11-2.3.0.tar.gz; +a href=http://ftp.gwdg.de/pub/linux/troll/qt/source/qt-x11-2.3.0.tar.gz; qt-x11-2.3.0.tar.gz/a, is an 8.7 MB file. The uncompressed distribution comprises 40 MB of source files. Building the package adds 40 to 75 MB of object files and executables to this./p
RFC: color diagnostics markers
The following patch implements an option that allows printing the diagnostics markers (error:, warning:, note:) in different colors (red, magenta, and green, respectively). I followed the implementation of GNU grep but we cannot directly use their code, since they only care about printing to stdout, while we need to create strings on the fly. This patch only supports POSIX terminals, but grep has code for Windows, so I can implement that if wished. Grep also supports configuring the colors via an environment variable, so I can extend the patch in that way if wished. This patch only allows two options enable/disable colors (and defaults to disabled), but grep has auto/never/always, and I can easily extend the patch in that way. The patch is very simple (only colors the markers, and that is it). Nonetheless, I find this a significant improvement when reading the output of GCC in a terminal. I tried with several backgrounds (all the ones available in Yakuake/Kterminal), and the colors are readable. The ideal approach would be that GCC produced diagnostics in some structured, machine-readable form, and that structured form be translated into GNU style terminal output with/without colors (or HTML, or parsed by IDEs, etc). However, that would require significantly more effort that I (or anyone else, as far as I know) can dedicate to this. But, in any case, I believe such approach would probably use the same functions proposed here to color text, so the current patch is still useful if someone decided to try. So the question is: Is there any chance this patch (once tidied, and whatever desired improvements implemented) is accepted in GCC? What are the desired improvements (customization, auto setting, Windows support)? Cheers, Manuel. color-markers.diff Description: Binary data
Re: [Patch, libgfortran] [4.6/4.7/4.8/4.9 Regression] Namelist read fails with designators containing embedded spaces
Am 31.03.2013 05:53, schrieb Jerry DeLisle: The attached patch fixes this PR by removing a spurious call to next_char which threw off the parsing sequence. In addition, I audited the file for other tests of EOF and corrected the error handling. This eliminated some wrong error messages or undefined error messages when an EOF is encountered during a namelist read. Also needed to modify hit_eof to not set the file position status for namelist mode to AFTER_ENDFILE to assure we get the correct EOF error. Also attached is the original test case from the PR, modified to include some reads cut short by EOF. Regression tested on x86-64. OK for trunk? OK thanks for the patch - with the clarification in the comment below err_ret: (in the two functions), as discussed in IRC. Tobias 2013-03-29 Jerry DeLislejvdeli...@gcc.gnu.org PR libfortran/56786 * io/list_read.c (nml_parse_qualifier): Remove spurious next_char call when checking for EOF. Use error return mechanism when EOF detected. Do not return false unless parse_err_msg and parse_err_msg_size have been set. Use hit_eof. (nml_get_obj_data): Likewise use the correct error mechanism. * io/transfer.c (hit_eof): Do not set AFTER_ENDFILE if in namelist mode.
Re: RFC: color diagnostics markers
On Sun, Mar 31, 2013 at 1:01 PM, Manuel López-Ibáñez lopeziba...@gmail.com wrote: The following patch implements an option that allows printing the diagnostics markers (error:, warning:, note:) in different colors (red, magenta, and green, respectively). I followed the implementation of GNU grep but we cannot directly use their code, since they only care about printing to stdout, while we need to create strings on the fly. This patch only supports POSIX terminals, but grep has code for Windows, so I can implement that if wished. Grep also supports configuring the colors via an environment variable, so I can extend the patch in that way if wished. This patch only allows two options enable/disable colors (and defaults to disabled), but grep has auto/never/always, and I can easily extend the patch in that way. The patch is very simple (only colors the markers, and that is it). Nonetheless, I find this a significant improvement when reading the output of GCC in a terminal. I tried with several backgrounds (all the ones available in Yakuake/Kterminal), and the colors are readable. The ideal approach would be that GCC produced diagnostics in some structured, machine-readable form, and that structured form be translated into GNU style terminal output with/without colors (or HTML, or parsed by IDEs, etc). However, that would require significantly more effort that I (or anyone else, as far as I know) can dedicate to this. But, in any case, I believe such approach would probably use the same functions proposed here to color text, so the current patch is still useful if someone decided to try. So the question is: Is there any chance this patch (once tidied, and whatever desired improvements implemented) is accepted in GCC? What are the desired improvements (customization, auto setting, Windows support)? A couple of things. I think should be able to control the coloring by a real environment variable like LS_COLOR allows. fdiagnostics-show-color should be controllable by an env variable so you don't have to pass an argument to gcc all the time. The win32 implementation should be the same as the POSIX implementation or rather at least the cygwin version should be the same. Thanks, Andrew
Re: RFC: color diagnostics markers
On 31 March 2013 22:11, Andrew Pinski pins...@gmail.com wrote: A couple of things. I think should be able to control the coloring by a real environment variable like LS_COLOR allows. fdiagnostics-show-color should be controllable by an env variable so you don't have to pass an argument to gcc all the time. Currently, I follow the implementation of GNU grep which is much simpler than the one of LS (no external program to setup the colors is needed). But GNU grep does allow controlling the colors with the variable GREP_COLORS, so it would be trivial to implement the above. A defined but empty variable can disable the colors completely. Or we can require a defined variable to enable the colors (empty to use the default colors). The win32 implementation should be the same as the POSIX implementation or rather at least the cygwin version should be the same. To be honest, I am not sure how the Windows implementation should work, this is why I didn't implement it yet. The GNU grep approach for windows is available here http://git.savannah.gnu.org/cgit/grep.git/tree/lib and differs greatly from the POSIX approach. I only wanted to point out that if Windows-specific code is necessary, this is already available from grep. If the above answers are satisfactory, can I assume you are not against such patch? BTW, if you are not the kind of people that disable the colors in grep and ls, then you should try the patch: It looks gorgeous and it never messes up the output like external filters (and more testing and feedback is always welcome). Of course, it works with translations! Cheers, Manuel.
PATCH: PR plugins/56754 some missing plugin headers during installation in gcc 4.8
This patch readd TARGET_H that was removed with revision 188166 IPA_PROP_H is in use by PLUGIN_HEADERS and did depend on GIMPLE_H that did have TARGET_H before it was removed and it was not added to IPA_PROP_H or PLUGIN_HEADERS. See the bug for more info. /Magnus gcc: 2013-03-30 Magnus Granberg zo...@gentoo.org PR plugins/56754 * Makefile.in (PLUGIN_HEADERS): Add TARGET_H --- a/gcc/Makefile.in 2013-02-08 10:07:49.0 +0100 +++ b/gcc/Makefile.in 2013-03-28 03:43:53.343390945 +0100 @@ -4597,7 +4597,7 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $ $(C_PRAGMA_H) $(CPPLIB_H) $(FUNCTION_H) \ cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h \ $(GIMPLE_PRETTY_PRINT_H) realmpfr.h \ - $(IPA_PROP_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) version.h + $(IPA_PROP_H) $(TARGET_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) version.h # generate the 'build fragment' b-header-vars s-header-vars: Makefile
[wwwdocs] ftp.axis.se only works via http these days
One of these days I ought to write a blog about the oddities I have been encountering over the years. In this case ftp.axis.se does not serve its original contents via the ftp protocol, but still does via http. Committed. Gerald Index: readings.html === RCS file: /cvs/gcc/wwwdocs/htdocs/readings.html,v retrieving revision 1.229 diff -u -3 -p -r1.229 readings.html --- readings.html 31 Mar 2013 17:16:50 - 1.229 +++ readings.html 31 Mar 2013 20:04:05 - @@ -29,7 +29,7 @@ of Functional Programming Languages using GCC -- Tail Calls/a by Andreas Bauer./li - lia href=ftp://ftp.axis.se/pub/users/hp/pgccfd/;Porting GCC for + lia href=http://ftp.axis.se/pub/users/hp/pgccfd/;Porting GCC for Dunces/a by Hans-Peter Nilsson lt;a href=mailto:hans-peter.nils...@axis.com;hans-peter.nils...@axis.com/agt;./li lia href=http://cobolforgcc.sourceforge.net/cobol_toc.html;Using,
Re: [wwwdocs] ftp.axis.se only works via http these days
From: Gerald Pfeifer ger...@pfeifer.com Date: Sun, 31 Mar 2013 23:17:59 +0200 One of these days I ought to write a blog about the oddities I have been encountering over the years. In this case ftp.axis.se does not serve its original contents via the ftp protocol, but still does via http. Weird; I'll alert the sysadmins and see if I can get this fixed. Committed. Gerald Index: readings.html === RCS file: /cvs/gcc/wwwdocs/htdocs/readings.html,v retrieving revision 1.229 diff -u -3 -p -r1.229 readings.html --- readings.html 31 Mar 2013 17:16:50 - 1.229 +++ readings.html 31 Mar 2013 20:04:05 - @@ -29,7 +29,7 @@ of Functional Programming Languages using GCC -- Tail Calls/a by Andreas Bauer./li - lia href=ftp://ftp.axis.se/pub/users/hp/pgccfd/;Porting GCC for + lia href=http://ftp.axis.se/pub/users/hp/pgccfd/;Porting GCC for Dunces/a by Hans-Peter Nilsson lt;a href=mailto:hans-peter.nils...@axis.com;hans-peter.nils...@axis.com/agt;./li lia href=http://cobolforgcc.sourceforge.net/cobol_toc.html;Using, brgds, H-P
[patch] Remove unused ivtype_map symbols from sese.[hc]
Remove unused symbols related to ivtype_map. This map does not appear to exist and I see no evidence of its removal in the ChangeLog. Tested on x86_64. Okay for trunk? Index: gcc/ChangeLog 2013-03-31 Lawrence Crowl cr...@google.com * sese.h (struct ivtype_map_elt_s): Remove unused. (extern debug_ivtype_map): Remove unused. (extern eq_ivtype_map_elts): Remove unused. * sese.c (debug_ivtype_map): Removed unused. (debug_ivtype_map_1): Removed unused. (debug_ivtype_elt): Remove unused. (eq_ivtype_map_elts): Remove unused. Index: gcc/sese.c === --- gcc/sese.c (revision 197272) +++ gcc/sese.c (working copy) @@ -83,47 +83,6 @@ eq_rename_map_elts (const void *e1, cons -/* Print to stderr the element ELT. */ - -static void -debug_ivtype_elt (ivtype_map_elt elt) -{ - fprintf (stderr, (%s, , elt-cloog_iv); - print_generic_expr (stderr, elt-type, 0); - fprintf (stderr, )\n); -} - -/* Helper function for debug_ivtype_map. */ - -static int -debug_ivtype_map_1 (void **slot, void *s ATTRIBUTE_UNUSED) -{ - struct ivtype_map_elt_s *entry = (struct ivtype_map_elt_s *) *slot; - debug_ivtype_elt (entry); - return 1; -} - -/* Print to stderr all the elements of MAP. */ - -DEBUG_FUNCTION void -debug_ivtype_map (htab_t map) -{ - htab_traverse (map, debug_ivtype_map_1, NULL); -} - -/* Compares database elements E1 and E2. */ - -int -eq_ivtype_map_elts (const void *e1, const void *e2) -{ - const struct ivtype_map_elt_s *elt1 = (const struct ivtype_map_elt_s *) e1; - const struct ivtype_map_elt_s *elt2 = (const struct ivtype_map_elt_s *) e2; - - return (elt1-cloog_iv == elt2-cloog_iv); -} - - - /* Record LOOP as occurring in REGION. */ static void Index: gcc/sese.h === --- gcc/sese.h (revision 197272) +++ gcc/sese.h (working copy) @@ -275,17 +275,6 @@ new_rename_map_elt (tree old_name, tree return res; } -/* Structure containing the mapping between the CLooG's induction - variable and the type of the old induction variable. */ -typedef struct ivtype_map_elt_s -{ - tree type; - const char *cloog_iv; -} *ivtype_map_elt; - -extern void debug_ivtype_map (htab_t); -extern int eq_ivtype_map_elts (const void *, const void *); - /* Free and compute again all the dominators information. */ static inline void -- Lawrence Crowl
[libitm,PATCH] Fix bootstrap due to __always_inline in libitm
Andi's patch broke bootstrap on all FreeBSD platforms, which took me a bit to realize since he did not update the ChangeLog: 2013-03-23 Andi Kleen a...@my.domain.org * local_atomic (__always_inline): Add. (__calculate_memory_order, atomic_thread_fence, atomic_signal_fence, test_and_set, clear, store, load, exchange, compare_exchange_weak, compare_exchange_strong, fetch_add, fetch_sub, fetch_and, fetch_or, fetch_xor): Add __always_inline to force inlining. The problem is the he added the following to local_atomic #ifndef __always_inline #define __always_inline inline __attribute__((always_inline)) #endif whereas /usr/include/sys/cdefs.h on FreeBSD has the following #define__always_inline __attribute__((__always_inline__)) and hence misses the inline (plus libitm/common.h already has ALWAYS_INLINE for that purpose). I am fixing this by adding an explicit inline to those cases where necessary. I did not add it to struct members, which are considered inline by default (and believe Andi's patch may have been a bit over- eager from that perspective). Bootstrapped and regression tested on i386-unknown-freebsd10.0. Okay? Gerald 2013-03-31 Gerald Pfeifer ger...@pfeifer.com PR bootstrap/56714 * local_atomic (__calculate_memory_order): Mark inline. (atomic_thread_fence): Ditto. (atomic_signal_fence): Ditto. (atomic_bool::atomic_flag_test_and_set_explicit): Ditto. (atomic_bool::atomic_flag_clear_explicit): Ditto. (atomic_bool::atomic_flag_test_and_set): Ditto. (atomic_bool::atomic_flag_clear): Ditto. Index: local_atomic === --- local_atomic(revision 197262) +++ local_atomic(working copy) @@ -75,7 +75,7 @@ memory_order_seq_cst } memory_order; - __always_inline memory_order + inline __always_inline memory_order __calculate_memory_order(memory_order __m) noexcept { const bool __cond1 = __m == memory_order_release; @@ -85,13 +85,13 @@ return __mo2; } - __always_inline void + inline __always_inline void atomic_thread_fence(memory_order __m) noexcept { __atomic_thread_fence (__m); } - __always_inline void + inline __always_inline void atomic_signal_fence(memory_order __m) noexcept { __atomic_thread_fence (__m); @@ -1545,38 +1545,38 @@ // Function definitions, atomic_flag operations. - __always_inline bool + inline __always_inline bool atomic_flag_test_and_set_explicit(atomic_flag* __a, memory_order __m) noexcept { return __a-test_and_set(__m); } - __always_inline bool + inline __always_inline bool atomic_flag_test_and_set_explicit(volatile atomic_flag* __a, memory_order __m) noexcept { return __a-test_and_set(__m); } - __always_inline void + inline __always_inline void atomic_flag_clear_explicit(atomic_flag* __a, memory_order __m) noexcept { __a-clear(__m); } - __always_inline void + inline __always_inline void atomic_flag_clear_explicit(volatile atomic_flag* __a, memory_order __m) noexcept { __a-clear(__m); } - __always_inline bool + inline __always_inline bool atomic_flag_test_and_set(atomic_flag* __a) noexcept { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } - __always_inline bool + inline __always_inline bool atomic_flag_test_and_set(volatile atomic_flag* __a) noexcept { return atomic_flag_test_and_set_explicit(__a, memory_order_seq_cst); } - __always_inline void + inline __always_inline void atomic_flag_clear(atomic_flag* __a) noexcept { atomic_flag_clear_explicit(__a, memory_order_seq_cst); } - __always_inline void + inline __always_inline void atomic_flag_clear(volatile atomic_flag* __a) noexcept { atomic_flag_clear_explicit(__a, memory_order_seq_cst); }