Thomas Koenig [Sat, 30 Mar 2013 10:19:02 +0000 (10:19 +0000)]
trans-expr.c (build_memcmp_call): New function.
2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
* trans-expr.c (build_memcmp_call): New function.
(gfc_build_compare_string): If the strings
compared have constant and equal lengths and
the strings are kind=1, or, for kind=4 strings,
the test is for (in)equality, use memcmp().
2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
* gfortran.dg/character_comparison_3.f90: Adjust for use of memcmp
for constant and equal string lengths.
* gfortran.dg/character_comparison_5.f90: Likewise.
* gfortran.dg/character_comparison_9.f90: New test.
Jan Hubicka [Fri, 29 Mar 2013 18:07:34 +0000 (19:07 +0100)]
lto-cgraph.c (output_profile_summary, [...]): Use gcov streaming; stream hot bb threshold to ltrans.
* lto-cgraph.c (output_profile_summary, input_profile_summary): Use
gcov streaming; stream hot bb threshold to ltrans.
* predict.c (get_hot_bb_threshold): Break out from ....
(maybe_hot_count_p): ... here.
(set_hot_bb_threshold): New function.
* lto-section-in.c (lto_section_name): Add profile.
* profile.h (get_hot_bb_threshold, set_hot_bb_threshold): Declare.
* ipa.c: Include hash-table.h, tree-inline.h, profile.h, lto-streamer.h
and data-streamer.h
(histogram_entry): New structure.
(histogram, histogram_pool): New global vars.
(histogram_hash): New structure.
(histogram_hash::hash): New method.
(histogram_hash::equal): Likewise.
(account_time_size): New function.
(cmp_counts): New function.
(dump_histogram): New function.
(ipa_profile_generate_summary): New function.
(ipa_profile_write_summary): New function.
(ipa_profile_read_summary): New function.
(ipa_profile): Decide on threshold.
(pass_ipa_profile): Add ipa_profile_write_summary and ipa_profile_read_summary.
* Makefile.in (ipa.o): Update dependencies.
* lto-streamer.h (LTO_section_ipa_profile): New section.
Lawrence Crowl [Fri, 29 Mar 2013 03:42:21 +0000 (03:42 +0000)]
Add uniform debug dump function names.
Add some overloaded functions that provide uniform debug dump
function names. These names are:
debug: the general debug dumper
debug_verbose: for more details
debug_raw: for the gory details
debug_head: for the heads of declarations, e.g. function heads
debug_body: for the bodies of declarations, e.g. function bodies
Not all types have the last four versions.
The debug functions come in two flavors, those that take pointers
to the type, and those that take references to the type. The first
handles printing of '<nil>' for null pointers. The second assumes
a valid reference, and prints the content.
This patch is somewhat different from the original plan at
gcc.gnu.org/wiki/cxx-conversion/debugging-dumps. The reason
is that gdb has an incomplete implementation of C++ call syntax;
requiring explicit specification of template arguments and explicit
specification of function arguments even when they have default
values. So, the original plan would have required typing
call dump <cp_token> (t, 0, 0, stderr)
which is undesireable. Instead instead of templates, we overload
plain functions. This adds a small burden of manually adding
the pointer version of dump for each type. Instead of default
function arguments, we simply assume the default values. Most of
the underlying dump functions did not use the options and indent
parameters anyway. Several provide FILE* parameters, but we expect
debugging to use stderr anyway. So, the explicit specification of
arguments was not as valuable as we thought initially. Finally,
a change of name from dump to debug reflect the implicit output
to stderr.
Thomas Koenig [Thu, 28 Mar 2013 21:30:26 +0000 (21:30 +0000)]
re PR fortran/45159 (Unnecessary temporaries)
2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* gfortran.h (gfc_dep_difference): Add prototype.
* dependency.c (discard_nops): New function.
(gfc_dep_difference): New function.
(check_section_vs_section): Use gfc_dep_difference
to calculate the difference of starting indices.
* trans-expr.c (gfc_conv_substring): Use
gfc_dep_difference to calculate the length of
substrings where possible.
2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/45159
* gfortran.dg/string_length_2.f90: New test.
* gfortran.dg/dependency_41.f90: New test.
Thomas Koenig [Thu, 28 Mar 2013 21:02:00 +0000 (21:02 +0000)]
re PR fortran/55806 (Missed optimization with ANY or ALL)
2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55806
* frontend-passes.c (optimize_code): Keep track of
current code to make code insertion possible.
(combine_array_constructor): New function.
(optimize_op): Call it.
2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/55806
* gfortran.dg/array_constructor_43.f90: New test.
* gfortran.dg/random_seed_3.f90: New test.
Jason Merrill [Thu, 28 Mar 2013 18:20:30 +0000 (14:20 -0400)]
re PR c++/56728 (ICE using constexpr initialization and arrays)
PR c++/56728
* semantics.c (potential_constant_expression_1) [NOP_EXPR]: Reject
conversion from integer to pointer.
(cxx_eval_constant_expression): Likewise.
(cxx_eval_indirect_ref): Use the folded operand if we still think
this might be constant.
* config/aarch64/aarch64.md (*and<mode>3_compare0): New pattern.
(*andsi3_compare0_uxtw): New pattern.
(*and_<SHIFT:optab><mode>3_compare0): New pattern.
(*and_<SHIFT:optab>si3_compare0_uxtw): New pattern.
Paolo Carlini [Thu, 28 Mar 2013 16:03:32 +0000 (16:03 +0000)]
re PR c++/56725 (extra spaces in error message)
/cp
2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR c++/56725
* call.c (convert_like_real): Change series of two permerrors
to permerror + inform (and likewise for two errors).
(build_new_method_call_1): Likewise.
* typeck.c (convert_for_initialization): Change additional
warning or error to inform.
/testsuite
2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
Marek Polacek [Thu, 28 Mar 2013 11:14:44 +0000 (11:14 +0000)]
re PR tree-optimization/56695 (ICE in expand_vec_cond_expr, at optabs.c:6751)
PR tree-optimization/56695
* tree-vect-stmts.c (vectorizable_condition): Unconditionally
build signed result of a vector comparison.
* tree-cfg.c (verify_gimple_comparison): Check that a result
of a vector comparison has signed type.
Co-Authored-By: Richard Biener <rguenther@suse.de>
From-SVN: r197192
Richard Biener [Thu, 28 Mar 2013 09:55:15 +0000 (09:55 +0000)]
re PR tree-optimization/37021 (Fortran Complex reduction / multiplication not vectorized)
2013-03-28 Richard Biener <rguenther@suse.de>
PR tree-optimization/37021
* tree-vect-slp.c (vect_build_slp_tree): When not unrolling
do not restrict gaps between groups.
* tree-vect-stmts.c (vectorizable_load): Properly account for
a gap between groups.
* gcc.dg/vect/fast-math-slp-38.c: New testcase.
* gcc.dg/vect/O3-pr36098.c: Un-XFAIL.
Eric Botcazou [Thu, 28 Mar 2013 08:29:10 +0000 (08:29 +0000)]
toplev.c (process_options): Do not disable -fomit-frame-pointer on a general basis if...
* toplev.c (process_options): Do not disable -fomit-frame-pointer on a
general basis if unwind info is requested and ACCUMULATE_OUTGOING_ARGS
is not enabled.
Kai Tietz [Wed, 27 Mar 2013 20:54:01 +0000 (21:54 +0100)]
cygwin-stdint.h: Add support for cygwin x64 target.
* config/i386/cygwin-stdint.h: Add support for cygwin x64 target.
* config/i386/t-cygwin-w64: New file.
* config/i386/cygwin-w64.h: New file.
* config/i386/cygwin.h (EXTRA_OS_CPP_BUILTINS): Extend
and add support for x64-cygwin target.
(CPP_SPEC): Likewise.
(CXX_WRAP_SPEC_LIST): Undefine before define.
(LIBGCJ_SONAME): Use 15 as version.
Richard Biener [Wed, 27 Mar 2013 10:38:29 +0000 (10:38 +0000)]
re PR tree-optimization/37021 (Fortran Complex reduction / multiplication not vectorized)
2013-03-27 Richard Biener <rguenther@suse.de>
PR tree-optimization/37021
* tree-vect-data-refs.c (vect_check_strided_load): Allow
REALPART/IMAGPART_EXPRs around the supported refs.
* tree-ssa-structalias.c (find_func_aliases): Assume that
floating-point values are not used to transfer pointers.
* gfortran.dg/vect/fast-math-pr37021.f90: New testcase.
* gcc/target.def (TARGET_HAS_IFUNC_P): New target hook.
* gcc/doc/tm.texi.in (TARGET_HAS_IFUNC_P): New.
* gcc/doc/tm.texi: Regenerate.
* gcc/targhooks.h (default_has_ifunc_p): New.
* gcc/targhooks.c (default_has_ifunc_p): Ditto.
* gcc/config/linux-protos.h: New file.
* gcc/config/linux-android.h (TARGET_HAS_IFUNC_P): Using version of
this hook for linux which disables support of indirect functions in
android.
* gcc/config/linux-android.c: New file.
* gcc/config/t-linux-android.c: Ditto.
* gcc/config.gcc: Added new object file linux-android.o.
* gcc/config/i386/i386.c (ix86_get_function_versions_dispatcher):
Using TARGET_HAS_IFUNC hook instead of HAVE_GNU_INDIRECT_FUNCTION.
* gcc/varasm.c (do_assemble_alias): Likewise.
* configure.ac: Define HAVE_GNU_INDIRECT_FUNCTION as zero if the target
doesn't support indirect functions.
* configure: Regenerate.
+ /* This is used by float.h to define the float_t and double_t data
+ types. For historical reasons both are double on s390 what cannot
+ be changed anymore. */
+ #define TARGET_FLT_EVAL_METHOD 1
+
/* Target machine storage layout. */
Walter Lee [Wed, 27 Mar 2013 06:08:01 +0000 (06:08 +0000)]
tilegx.md (insn_mnz_<mode>): Replaced by ...
* config/tilegx/tilegx.md (insn_mnz_<mode>): Replaced by ...
(insn_mnz_v8qi): ... this ...
(insn_mnz_v4hi): ... and this. Replace (const_int 0) with the
vector equivalent.
(insn_v<n>mnz): Replaced by ...
(insn_v1mnz): ... this ...
(insn_v2mnz): ... and this. Replace (const_int 0) with the vector
equivalent.
(insn_mz_<mode>): Replaced by ...
(insn_mz_v8qi): ... this ...
(insn_mz_v4hi): ... and this. Replace (const_int 0) with the
vector equivalent.
(insn_v<n>mz): Replaced by ...
(insn_v1mz): ... this ...
(insn_v2mz): ... and this. Replace (const_int 0) with the vector
equivalent.
Jason Merrill [Wed, 27 Mar 2013 03:01:41 +0000 (23:01 -0400)]
re PR c++/52597 ([C++11] confusing diagnostics for invalid use of non-static member function in decltype)
PR c++/52597
* typeck.c (invalid_nonstatic_memfn_p): Use get_first_fn. Take tree.
* semantics.c (finish_decltype_type): Check it before type_unknown_p.
* cp-tree.h: Adjust prototype.
Janne Blomqvist [Tue, 26 Mar 2013 22:08:17 +0000 (00:08 +0200)]
PR 25708 Use a temporary buffer when parsing module files.
2013-03-27 Janne Blomqvist <jb@gcc.gnu.org>
PR fortran/25708
* module.c (module_locus): Use long for position.
(module_content): New variable.
(module_pos): Likewise.
(prev_character): Remove.
(bad_module): Free data instead of closing mod file.
(set_module_locus): Use module_pos.
(get_module_locus): Likewise.
(module_char): use buffer rather than stdio file.
(module_unget_char): Likewise.
(read_module_to_tmpbuf): New function.
(gfc_use_module): Call read_module_to_tmpbuf.
Uros Bizjak [Tue, 26 Mar 2013 16:24:48 +0000 (17:24 +0100)]
i386.md (*cmpqi_ext_1): Merge with *cmpqi_ext_1_rex64 using nox64 isa attribute.
* config/i386/i386.md (*cmpqi_ext_1): Merge with *cmpqi_ext_1_rex64
using nox64 isa attribute. Use nonimmediate_x86nomem_operand as
operand 0 predicate.
(*cmpqi_ext_3): Merge with *cmpqi_ext_3_rex64 using nox64 isa
attribute. Use general_x64nomem_operand as operand 1 predicate.
(*movqi_extv_1): Merge with *movqi_extv_1_rex64 using nox64 isa
attribute. Use nonimmediate_x64nomem_operand as operand 0 predicate.
(*movqi_extzv_2): Merge with *movqi_extzv_2_rex64 using nox64 isa
attribute. Use nonimmediate_x64nomem_operand as operand 0 predicate.
(mov<mode>_insv_1): Remove expander. Merge insn with
movsi_insv_1 using SWI48 mode iterator and nox64 isa attribute.
Use general_x64nomem_operand as operand 1 predicate.
(addqi_ext_1): Merge with *addqi_ext_1_rex64 using nox64 isa attribute.
(*testqi_ext_1): Merge with *testqi_ext_1_rex64 using nox64 isa
attribute. Use nonimmediate_x64nomem_operand as operand 1 predicate.
(*andqi_ext_1): Merge with *andqi_ext_1_rex64 using nox64 isa
attribute. Use nonimmediate_x64nomem_operand as operand 2 predicate.
(*<code>qi_ext_1): Merge with *<code>qi_ext_1_rex64 using nox64 isa
attribute. Use nonimmediate_x64nomem_operand as operand 1 predicate.
(*xorqi_cc_ext_1): Merge with *xorqi_cc_ext_1_rex64 using nox64
isa attribute. Use general_x64nomem_operand as operand 2 predicate.
* config/i386/predicates.md (nonimmediate_x64nomem_operand): New.
(general_x64nomem_operand): Ditto.
Richard Biener [Tue, 26 Mar 2013 15:20:38 +0000 (15:20 +0000)]
alias.c (find_base_term): Avoid redundant and not used recursion.
2013-03-26 Richard Biener <rguenther@suse.de>
* alias.c (find_base_term): Avoid redundant and not used
recursion.
(base_alias_check): Get the initial base term from the
caller.
(true_dependence_1): Compute and pass base terms to base_alias_check.
(write_dependence_p): Likewise.
(may_alias_p): Likewise.
Richard Biener [Tue, 26 Mar 2013 09:14:59 +0000 (09:14 +0000)]
emit-rtl.c (set_mem_attributes_minus_bitpos): Remove alignment computations and rely on get_object_alignment_1 for the...
2013-03-26 Richard Biener <rguenther@suse.de>
* emit-rtl.c (set_mem_attributes_minus_bitpos): Remove
alignment computations and rely on get_object_alignment_1
for the !TYPE_P case.
Commonize DECL/COMPONENT_REF handling in the ARRAY_REF path.
Jeff Law [Tue, 26 Mar 2013 04:00:20 +0000 (22:00 -0600)]
tree-ssa-dom.c (record_equivalences_from_incoming_edge): Add missing check for INTEGRAL_TYPE_P that was missing due to checking in wrong...
* tree-ssa-dom.c (record_equivalences_from_incoming_edge): Add missing
check for INTEGRAL_TYPE_P that was missing due to checking in wrong
version of prior patch.