2013-09-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/PR56519
* gfortran.h: Declare gfc_do_concurrent_flag as extern.
* resolve.c: Rename do_concurrent_flag to gfc_do_concurrent_flag
and make non-static.
(resolve_function): Use gfc_do_concurrent_flag instead of
do_concurrent_flag.
(pure_subroutine): Likewise.
(resolve_code): Likewise.
(resolve_types): Likewise.
* intrinsic.c (gfc_intrinsic_sub_interface): Raise error for
non-pure intrinsic subroutines within DO CONCURRENT.
2013-09-02 Thomas Koenig <tkoenig@gcc.gnu.org>
PR fortran/PR56519
* gfortran.dg/do_concurrent_3.f90: New test case.
From-SVN: r202188
* lto-symtab.c (lto_symtab_merge_symbols): Add comments; merge
duplicated nodes for assembler names.
* symtab.c (symtab_unregister_node): Do not attempt to unlink
hard registers from assembler name hash.
From-SVN: r202186
2013-09-02 Martin Jambor <mjambor@suse.cz>
PR ipa/58106
* ipa-prop.c (ipa_edge_duplication_hook): Always put new rdesc to the
linked list. When finding the correct duplicate, also consider also
the caller in additon to its inlined_to node.
testsuite/
* gcc.dg/ipa/pr58106.c: New test.
From-SVN: r202184
PR middle-end/56382
* expr.c (emit_move_complex): Do not move complex FP values as parts if
the source or the destination is a single hard register.
From-SVN: r202179
Split all the structures, enums, typedefs and some fundamental
declarations from tree.h into tree-core.h. Everything else stays in
tree.h for now.
As we convert gimple files, we'll move declarations out of tree.h into
other headers and rewrite missing functions in the new gimple API.
* Makefile.in (TREE_CORE_H): Define.
(TREE_H): Use.
(GTFILES): Add tree-core.h.
* builtins.c (built_in_class_names): Use BUILT_IN_LAST to
size the array.
* tree-core.h: New file.
Move all data structures, enum, typedefs, global
declarations and constants from ...
* tree.h: ... here.
From-SVN: r202172
2013-09-02 Richard Biener <rguenther@suse.de>
* tree-affine.c (add_elt_to_tree): Avoid converting all pointer
arithmetic to sizetype.
* gcc.dg/tree-ssa/loop-4.c: Adjust scan looking for one memory
reference.
From-SVN: r202165
* tree-ssa-loop-ivopts.c (set_autoinc_for_original_candidates):
Find auto-increment use both before and after candidate.
* gcc.target/arm/ivopts-orig_biv-inc.c: New testcase.
From-SVN: r202164
* common.opt (fdevirtualize-speculatively): New function.
* invoke.texi (fdevirtualize-speculatively): Document.
* ipa-devirt.c: Include ipa-inline.h
(likely_target_p): New function.
(ipa_devirt): New function.
(gate_ipa_devirt): New function.
(pass_data_ipa_devirt): New static var.
(pass_ipa_devirt): Likewise.
(make_pass_ipa_devirt): New function.
* opts.c (default_options): Add OPT_fdevirtualize_speculatively.
(common_handle_option): Disable devirtualization when
value range profiling is available.
* passes.def (pass_ipa_devirt): Add.
* timever.def (TV_IPA_DEVIRT): New timevar.
* tree-pass.h (make_pass_ipa_devirt):
From-SVN: r202145
* lto.c (tree_with_vars): Turn into vector.
(MAYBE_REMEMBER_WITH_VARS): Change to...
(CHECK_VAR): ... this one.
(CHECK_NO_VAR): New macro.
(maybe_remember_with_vars_typed): Turn to ...
(mentions_vars_p_typed): ... this one.
(maybe_remember_with_vars_common): Turn to ...
(mentions_vars_p_comon): ... this one.
(maybe_remember_with_vars_decl_minimal): Turn to ...
(mentions_vars_p_decl_minmal): ... this one.
(maybe_remember_with_vars_decl_common): Turn to ...
(mentions_vars_p_decl_common): ... this one.
(maybe_remember_with_vars_decl_with_vis): Turn to ...
(mentions_vars_p_decl_with_vis): ... this one.
(maybe_remember_with_vars_decl_non_common): Turn to ...
(mentions_vars_p_decl_non_common): ... this one.
(maybe_remember_with_vars_function): Turn to ...
(mentions_vars_p_function): ... this one.
(maybe_remember_with_vars_field_decl): Turn to ...
(mentions_vars_p_field_decl): ... this one.
(maybe_remember_with_vars_type): Turn to ...
(mentions_vars_p_type): ... this one.
(maybe_remember_with_vars_binfo): Turn to ...
(mentions_vars_p_binfo): ... this one.
(maybe_remember_with_vars_constructor): Turn to ...
(mentions_vars_p_constructor): ... this one.
(maybe_remember_with_vars_expr): Turn to ...
(mentions_vars_p_expr): ... this one.
(maybe_remember_with_vars): Turn to ...
(mentions_vars_p): ... this one.
(lto_read_decls): Update.
(LTO_SET_PREVAIL): Do not call function for internal decls.
(lto_fixup_prevailing_decls): Update to match mentions_vars_p;
check that something was updated.
(lto_fixup_state): Do not care about internal decls.
(lto_fixup_decls): Update.
(read_cgraph_and_symbols): Update.
From-SVN: r202143
* ipa-prop.c (ipa_set_jf_known_type): Check that we add
only records.
(detect_type_change_1): Rename to ...
(detect_type_change): ... this one; early return on non-polymorphic
types.
(detect_type_change_ssa): Add comp_type parameter; update
use of detect_type_change.
(compute_complex_assign_jump_func): Add param_type parameter;
update use of detect_type_change_ssa.
(compute_complex_ancestor_jump_func): Likewise.
(ipa_get_callee_param_type): New function.
(ipa_compute_jump_functions_for_edge): Compute parameter type;
update calls to the jump function computation functions.
From-SVN: r202126
This patch sanitizes the partitioning to address issues such as edge
weight insanities that sometimes occur due to upstream optimizations,
and ensures that hot blocks are not dominated by cold blocks. This
needs to be resanitized after certain cfg optimizations that may
cause hot blocks previously reached via both hot and cold paths to
only be reached by cold paths.
The verification code in sanitize_dominator_hotness was contributed by
Steven Bosscher.
2013-08-29 Teresa Johnson <tejohnson@google.com>
Steven Bosscher <steven@gcc.gnu.org>
* cfgrtl.c (fixup_new_cold_bb): New routine.
(commit_edge_insertions): Invoke fixup_partitions.
(find_partition_fixes): New routine.
(fixup_partitions): Ditto.
(verify_hot_cold_block_grouping): Update comments.
(rtl_verify_edges): Invoke find_partition_fixes.
(rtl_verify_bb_pointers): Update comments.
(rtl_verify_bb_layout): Ditto.
* basic-block.h (probably_never_executed_edge_p): Declare.
(fixup_partitions): Ditto.
* cfgcleanup.c (try_optimize_cfg): Invoke fixup_partitions.
* bb-reorder.c (sanitize_hot_paths): New function.
(find_rarely_executed_basic_blocks_and_crossing_edges): Invoke
sanitize_hot_paths.
* predict.c (probably_never_executed_edge_p): New routine.
* cfg.c (check_bb_profile): Add partition insanity warnings.
Co-Authored-By: Steven Bosscher <steven@gcc.gnu.org>
From-SVN: r202125
2013-08-30 François Dumont <fdumont@gcc.gnu.org>
PR libstdc++/58148
* include/debug/functions.h (__foreign_iterator_aux4): Use
sequence const_pointer as common type to compare pointers. Add a
fallback overload in case pointers cannot be cast to sequence
const_pointer.
* testsuite/23_containers/vector/modifiers/insert/58148.cc: New.
From-SVN: r202121
* cgraph.c (cgraph_function_body_availability): Handle weakref
correctly.
* passes.def: Remove pass_fixup_cfg.
* ipa-inline.c (ipa_inline): When not optimizing, do not inline;
track when we need to remove functions.
(gate_ipa_inline): Execute inlining always; add comment why.
(pass_data_ipa_inline): Remove TODO_remove_functions.
* ipa-inline-analysis.c (inline_generate_summary): When not optimizing
do not produce summaries.
* symtab.c (change_decl_assembler_name): Handle renaming of weakrefs.
(symtab_nonoverwritable_alias): Assert we are not called on weakref.
* varpool.c (cgraph_variable_initializer_availability): Fix weakrefs,
constant pool and vtable.
From-SVN: r202111