1. 15 Feb, 2015 1 commit
  2. 14 Feb, 2015 1 commit
    • ipa-chkp.c: Use iterate_direct_aliases. · 31de7606
      	* ipa-chkp.c: Use iterate_direct_aliases.
      	* symtab.c (resolution_used_from_other_file_p): Move inline.
      	(symtab_node::create_reference): Fix formating.
      	(symtab_node::has_aliases_p): Move inline; use iterate_direct_aliases.
      	(symtab_node::iterate_reference): Move inline.
      	(symtab_node::iterate_referring): Move inline.
      	(symtab_node::iterate_direct_aliases): Move inline.
      	(symtab_node::used_from_object_file_p_worker): Inline into ...
      	(symtab_node::used_from_object_file_p): ... this one; move inline.
      	(symtab_node::call_for_symbol_and_aliases): Move inline;
      	use iterate_direct_aliases.
      	(symtab_node::call_for_symbol_and_aliases_1): New method.
      	(cgraph_node::call_for_symbol_and_aliases): Move inline;
      	use iterate_direct_aliases.
      	(cgraph_node::call_for_symbol_and_aliases_1): New method.
      	(varpool_node::call_for_node_and_aliases): Rename to ...
      	(varpool_node::call_for_symbol_and_aliases): ... this one; Move inline;
      	use iterate_direct_aliases.
      	(varpool_node::call_for_symbol_and_aliases_1): New method.
      	* ipa.c (ipa_single_use): Use iterate_direct_aliases.
      	(ipa_discover_readonly_nonaddressable_var): Update.
      	* ipa-devirt.c: Fix formating.
      	* cgraph.c (cgraph_node::can_remove_if_no_direct_calls_and_refs_p):
      	Move inline.
      	(cgraph_node::call_for_symbol_and_aliases): Move inline.
      	(cgraph_node::call_for_symbol_and_aliases_1): New function..
      	* cgraph.h (used_from_object_file_p_worker): Remove.
      	(resolution_used_from_other_file_p): Move inline.
      	(symtab_node::has_aliases_p): Move inline; use iterate_direct_aliases.
      	(symtab_node::iterate_reference): Move inline.
      	(symtab_node::iterate_referring): Move inline.
      	(symtab_node::iterate_direct_aliases): Move inline.
      	(symtab_node::used_from_object_file_p_worker): Inline into ...
      	(symtab_node::used_from_object_file_p): Move inline.
      	* tree-emutls.c (ipa_lower_emutls): Update.
      	* varpool.c (varpool_node::call_for_symbol_and_aliases_1): New method.
      	(varpool_node::call_for_node_and_aliases): Remove.
      
      From-SVN: r220709
      Jan Hubicka committed
  3. 11 Feb, 2015 1 commit
    • re PR ipa/65005 (FAIL: c-c++-common/torture/builtin-arith-overflow-12.c) · 4bd019b8
      	PR ipa/65005
      	* ipa-visibility.c (cgraph_node::non_local_p): Turn into static
      	function.
      	* symtab.c (symtab_node::verify_base): Remove check that non-definitions
      	have no comdat group.
      	* lto-cgraph.c (lto_output_node): Always output thunk and alias info.
      	(lto_output_varpool_node): Always output alias info.
      	(output_refs): Output refs of boundary aliases, too.
      	(compute_ltrans_boundary): Add alias and thunk target into boundaries.
      	(output_symtab): Output call eges in thunks in boundary.
      	(get_alias_symbol): Remove.
      	(input_node, input_varpool_node): Do not special case weakrefs.
      	* ipa.c (symbol_table::remove_unreachable_nodes): Do not remove
      	alias and thunks targets in the boundary; do not take removed symbols
      	from their comdat groups.
      	* cgraph.c (cgraph_node::local_info): Look through aliases and thunks.
      	(cgraph_node::global_info): Remove.
      	(cgraph_node::rtl_info): Look through aliases and thunks.
      	* cgrpah.h (global_info): Remove.
      	(non_local_p): Remove.
      
      From-SVN: r220608
      Jan Hubicka committed
  4. 03 Feb, 2015 1 commit
  5. 29 Jan, 2015 1 commit
    • re PR ipa/64801 (kernel build failure due to ICF) · 10881cff
      	PR ipa/64801
      	* gcc.dg/tree-ssa/pr64801.c: New testcase.
      	* cgraphunit.c (init_lowered_empty_function): Add CoUNT parameter;
      	make sane BB profile.
      	(cgraph_node::expand_thunk): Make sane BB profile.
      	(cgraph_node::create_wrapper): Do not set call_stmt_cannot_inline_p.
      	* cgraph.h (init_lowered_empty_function): Update prototype.
      	* config/i386/i386.c (make_resolver_func): Update call.
      	* predict.c (gate): Disable branch prediction pass if
      	profile is already there.
      
      From-SVN: r220230
      Jan Hubicka committed
  6. 12 Jan, 2015 1 commit
    • cgraph_edge refactoring. · 90988f77
      	* cgraph.c (cgraph_edge::remove_callee): Move function to header
      	file for being inlined.
      	(cgraph_set_edge_callee): Delete.
      	(cgraph_edge::redirect_callee): Move function to header file
      	for being inlined.
      	(cgraph_edge::make_direct): Use new function.
      	(cgraph_edge::dump_edge_flags): New function created from
      	static dump_edge_flags function.
      	(cgraph_node::dump): Use new function.
      	(cgraph_edge::verify_count_and_frequency): New function created
      	from verify_edge_count_and_frequency.
      	(cgraph_edge::verify_corresponds_to_fndecl): New function created
      	from verify_edge_corresponds_to_fndecl.
      	(verify_edge_corresponds_to_fndecl): Delete.
      	(cgraph_node::verify_node): Use new function.
      	* cgraph.h (cgraph_edge::set_callee): New function.
      	(cgraph_edge::dump_edge_flags): Likewise.
      	(cgraph_edge::verify_corresponds_to_fndecl): Likewise.
      
      From-SVN: r219448
      Martin Liska committed
  7. 05 Jan, 2015 1 commit
  8. 22 Dec, 2014 1 commit
    • New symbol_summary class introduced. · 4008290f
      	* cgraph.h (symbol_table::allocate_cgraph_symbol): Summary UID
      	is filled up.
      	* symbol-summary.h: New file.
      	* gengtype.c (open_base_files): Add symbol-summary.h.
      	* toplev.c (general_init): Call constructor of symbol_table.
      
      From-SVN: r219004
      Martin Liska committed
  9. 15 Dec, 2014 1 commit
  10. 11 Dec, 2014 1 commit
    • re PR ipa/61324 (ICE: SIGSEGV at ipa-comdats.c:321 with -fno-use-cxa-atexit… · 17e0fc92
      re PR ipa/61324 (ICE: SIGSEGV at ipa-comdats.c:321 with -fno-use-cxa-atexit -fkeep-inline-functions)
      
      
      	PR ipa/61324
      	* testsuite/g++.dg/pr61324.C: New testcase by Trevor Saunders.
      	* testsuite/g++.dg/tm/pr51411-2.C: Update se the extern function is
      	not eliminated early.
      	* testsuite/gcc.target/i386/pr57756.c: Turn extern inline into static
      	inline.
      
      	* passes.c (execute_todo): Update call of remove_unreachable_nodes.
      	* ipa-chkp.c (chkp_produce_thunks): Use TODO_remove_functions.
      	* cgraphunit.c (symbol_table::process_new_functions): Add
      	IPA_SSA_AFTER_INLINING.
      	(ipa_passes): Update call of remove_unreachable_nodes.
      	(symbol_table::compile): Remove call of remove_unreachable_nodes.
      	* ipa-inline.c (inline_small_functions): Do not ICE with
      	-flto-partition=none
      	(ipa_inline): Update symtab->state; fix formatting
      	update call of remove_unreachable_nodes.
      	* cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
      	* cgraph.h (enum symtab_state): Add IPA_SSA_AFTER_INLINING.
      	(remove_unreachable_nodes): Update.
      	* ipa.c (process_references): Keep external references only
      	when optimizing.
      	(walk_polymorphic_call_targets): Keep possible polymorphic call
      	target only when devirtualizing.
      	(symbol_table::remove_unreachable_nodes): Remove BEFORE_INLINING_P
      	parameter.
      	(ipa_single_use): Update comment.
      	* ipa-pure-const.c (cdtor_p): New function.
      	(propagate_pure_const): Track if some cdtor was turned pure/const.
      	(execute): Return TODO_remove_functions if needed.
      	* ipa-comdats.c (ipa_comdats): Update comment.
      	
      	* lto.c (read_cgraph_and_symbols): Update call of
      	remove_unreachable_nodes.
      	(do_whole_program_analysis): Remove call of
      	symtab->remove_unreachable_nodes
      
      From-SVN: r218640
      Jan Hubicka committed
  11. 08 Dec, 2014 1 commit
    • PR jit/63854: Introduce xstrdup_for_dump · 2a72a953
      gcc/ChangeLog:
      	PR jit/63854
      	* cgraph.h (xstrdup_for_dump): New function.
      	* cgraph.c (cgraph_node::get_create): Replace use of xstrdup
      	within fprintf with xstrdup_for_dump.
      	(cgraph_edge::make_speculative): Likewise.
      	(cgraph_edge::resolve_speculation): Likewise.
      	(cgraph_edge::redirect_call_stmt_to_callee): Likewise.
      	(cgraph_node::dump): Likewise.
      	* cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
      	* ipa-cp.c (perhaps_add_new_callers): Likewise.
      	* ipa-inline.c (report_inline_failed_reason): Likewise.
      	(want_early_inline_function_p): Likewise.
      	(edge_badness): Likewise.
      	(update_edge_key): Likewise.
      	(flatten_function): Likewise.
      	(inline_always_inline_functions): Likewise.
      	* ipa-profile.c (ipa_profile): Likewise.
      	* ipa-prop.c (ipa_print_node_jump_functions): Likewise.
      	(ipa_make_edge_direct_to_target): Likewise.
      	(remove_described_reference): Likewise.
      	(propagate_controlled_uses): Likewise.
      	* ipa-utils.c (ipa_merge_profiles): Likewise.
      
      From-SVN: r218490
      David Malcolm committed
  12. 07 Dec, 2014 1 commit
    • symtab.c (symtab_node::equal_address_to): New function. · 3cb251b7
      	* symtab.c (symtab_node::equal_address_to): New function.
      	* cgraph.h (symtab_node::equal_address_to): Declare.
      	* fold-const.c (fold_comparison, fold_binary_loc): Use it.
      
      	* c-family/c-common.c: Refuse weaks for symbols that can not change
      	visibility.
      
      	* gcc.dg/addr_equal-1.c: New testcase.
      
      From-SVN: r218462
      Jan Hubicka committed
  13. 05 Dec, 2014 1 commit
    • cgraph.h (cgraph_node): New method expand_all_artificial_thunks. · 6a4bad95
      2014-12-05  Martin Jambor  <mjambor@suse.cz>
      
      	* cgraph.h (cgraph_node): New method expand_all_artificial_thunks.
      	(cgraph_edge): New method redirect_callee_duplicating_thunks.
      	* cgraphclones.c (duplicate_thunk_for_node): Donot expand newly
      	created thunks.
      	(redirect_edge_duplicating_thunks): Turned into edge method
      	redirect_callee_duplicating_thunks.
      	(cgraph_node::expand_all_artificial_thunks): New method.
      	(create_clone): Call expand_all_artificial_thunks.
      	* ipa-cp.c (perhaps_add_new_callers): Call
      	redirect_callee_duplicating_thunks instead of redirect_callee.
      	Also call expand_all_artificial_thunks.
      
      From-SVN: r218417
      Martin Jambor committed
  14. 26 Nov, 2014 1 commit
    • re PR ipa/61190 (g++.old-deja/g++.mike/p4736b.C FAILs at -O2/-Os/-O3) · 6cbde2e3
      2014-11-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR ipa/61190
              * cgraph.h (symtab_node::call_for_symbol_and_aliases): Fix comment.
              (cgraph_node::function_or_virtual_thunk_symbol): New function.
              (cgraph_node::call_for_symbol_and_aliases): Fix comment.
              (cgraph_node::call_for_symbol_thunks_and_aliases): Adjust comment.
              Add new optional parameter exclude_virtual_thunks.
              * cgraph.c (cgraph_node::call_for_symbol_thunks_and_aliases): Add new
              optional parameter exclude_virtual_thunks.
              (cgraph_node::set_const_flag): Don't propagate to virtual thunks.
              (cgraph_node::set_pure_flag): Likewise.
              (cgraph_node::function_symbol): Simplified.
              (cgraph_node::function_or_virtual_thunk_symbol): New function.
              * ipa-pure-const.c (analyze_function): For virtual thunks set
              pure_const_state to IPA_NEITHER.
              (propagate_pure_const): Use function_or_virtual_thunk_symbol.
      
      testsuite/ChangeLog:
      2014-11-26  Bernd Edlinger  <bernd.edlinger@hotmail.de>
      
              PR ipa/61190
              * g++.old-deja/g++.mike/p4736b.C: Use -O2.
      
      From-SVN: r218091
      Bernd Edlinger committed
  15. 19 Nov, 2014 1 commit
    • Merger of git branch "gimple-classes-v2-option-3" · 538dd0b7
      gcc/ChangeLog:
      	Merger of git branch "gimple-classes-v2-option-3".
      
      	* ChangeLog.gimple-classes: New.
      
      	* coretypes.h (struct gcond): Add forward decl.
      	(struct gdebug): Likewise.
      	(struct ggoto): Likewise.
      	(struct glabel): Likewise.
      	(struct gswitch): Likewise.
      	(struct gassign): Likewise.
      	(struct gasm): Likewise.
      	(struct gcall): Likewise.
      	(struct gtransaction): Likewise.
      	(struct greturn): Likewise.
      	(struct gbind): Likewise.
      	(struct gcatch): Likewise.
      	(struct geh_filter): Likewise.
      	(struct geh_mnt): Likewise.
      	(struct geh_else): Likewise.
      	(struct gresx): Likewise.
      	(struct geh_dispatch): Likewise.
      	(struct gphi): Likewise.
      	(struct gtry): Likewise.
      	(struct gomp_atomic_load): Likewise.
      	(struct gomp_atomic_store): Likewise.
      	(struct gomp_continue): Likewise.
      	(struct gomp_critical): Likewise.
      	(struct gomp_for): Likewise.
      	(struct gomp_parallel): Likewise.
      	(struct gomp_task): Likewise.
      	(struct gomp_sections): Likewise.
      	(struct gomp_single): Likewise.
      	(struct gomp_target): Likewise.
      	(struct gomp_teams): Likewise.
      
      	* doc/gimple.texi (Class hierarchy of GIMPLE statements): Update
      	for renaming of gimple subclasses.
      
      	* gdbhooks.py: Update.
      
      	* gimple-iterator.c (gsi_for_phi): New.
      	(gsi_start_phis): Strengthen return type from gimple_stmt_iterator
      	to gphi_iterator.
      	* gimple-iterator.h (struct gphi_iterator): New subclass of
      	gimple_stmt_iterator.
      	(gsi_for_phi): New prototype.
      	(gsi_start_phis): Strengthen return type from gimple_stmt_iterator
      	to gphi_iterator.
      	(gsi_next_nonvirtual_phi): Strengthen param from
      	gimple_stmt_iterator * to gphi_iterator *, and local "phi" from
      	gimple to gphi *.
      
      	* gsstruct.def: Update for renamings of classes.
      
      	* gimple.c (gimple_build_return): Strengthen return type from
      	gimple to greturn *.
      	(gimple_call_reset_alias_info): Strengthen param to gcall *.
      	(gimple_build_call_1): Strengthen return type from gimple to
      	gcall *.
      	(gimple_build_call_vec): Likewise.
      	(gimple_build_call): Likewise.
      	(gimple_build_call_valist): Likewise.
      	(gimple_build_call_internal_1): Likewise.
      	(gimple_build_call_internal): Likewise.
      	(gimple_build_call_internal_vec): Likewise.
      	(gimple_build_call_from_tree): Likewise.
      	(gimple_build_assign_stat): Strengthen return type from gimple to
      	gassign *.
      	(gimple_build_assign_with_ops): Likewise.
      	(gimple_build_assign_with_ops): Likewise.
      	(gimple_build_cond): Strengthen return type from gimple to
      	gcond *.
      	(gimple_build_cond_from_tree): Likewise.
      	(gimple_cond_set_condition_from_tree): Require a gcond *.
      	(gimple_build_label): Strengthen return type from gimple to
      	glabel *.
      	(gimple_build_goto): Strengthen return type from gimple to
      	ggoto *.
      	(gimple_build_bind): Strengthen return type from gimple to
      	gbind *.
      	(gimple_build_asm_1): Strengthen return type from gimple to
      	gasm *.
      	(gimple_build_asm_vec): Likewise.
      	(gimple_build_catch): Strengthen return type from gimple to
      	gcatch *.
      	(gimple_build_eh_filter): Strengthen return type from gimple to
      	geh_filter *.
      	(gimple_build_eh_must_not_throw): Strengthen return type from
      	gimple to geh_mnt *.
      	(gimple_build_eh_else): Strengthen return type from gimple to
      	geh_else *.
      	(gimple_build_try): Update for renaming of gimple_statement_try to
      	gtry.
      	(gimple_build_resx): Strengthen return type from gimple to
      	gresx *.
      	(gimple_build_switch_nlabels): Strengthen return type from gimple
      	to gswitch *.
      	(gimple_build_switch): Likewise.
      	(gimple_build_eh_dispatch): Strengthen return type from gimple to
      	geh_dispatch *.
      	(gimple_build_debug_bind_stat): Strengthen return type from gimple
      	to gdebug *.
      	(gimple_build_debug_source_bind_stat): Strengthen return type from
      	gimple to gdebug *.
      	(gimple_build_omp_critical): Strengthen return type from gimple to
      	gomp_critical *.
      	(gimple_build_omp_for): Strengthen return type from gimple to
      	gomp_for *.
      	(gimple_build_omp_parallel): Strengthen return type from gimple to
      	gomp_parallel *.
      	(gimple_build_omp_task): Strengthen return type from gimple to
      	gomp_task *.
      	(gimple_build_omp_continue): Strengthen return type from gimple to
      	gomp_continue *.
      	(gimple_build_omp_sections): Strengthen return type from gimple to
      	gomp_sections *.
      	(gimple_build_omp_single): Strengthen return type from gimple to
      	gomp_single *.
      	(gimple_build_omp_target): Strengthen return type from gimple to
      	gomp_target *.
      	(gimple_build_omp_teams): Strengthen return type from gimple to
      	gomp_teams *.
      	(gimple_build_omp_atomic_load): Strengthen return type from gimple
      	to gomp_atomic_load *.
      	(gimple_build_omp_atomic_store): Strengthen return type from gimple
      	to gomp_atomic_store *.
      	(gimple_build_transaction): Strengthen return type from gimple
      	to gtransaction *.
      	(empty_stmt_p): Replace check for GIMPLE_BIND with a dyn_cast.
      	(gimple_call_fnspec): Require a const gcall *.
      	(gimple_call_arg_flags): Likewise.
      	(gimple_call_return_flags): Likewise.
      	(gimple_set_bb): Add a checked cast.
      	(gimple_copy): Within the cases, add locals of the appropriate
      	subclass and use in place of "stmt" and "copy" for typesafety.
      	(gimple_has_side_effects): Add a checked cast.
      	(gimple_could_trap_p_1): Likewise.
      	(gimple_call_copy_skip_args): Require a gcall *, and return one.
      	(gimple_asm_clobbers_memory_p): Require a const gasm *.
      	(infer_nonnull_range): Replace a check for GIMPLE_RETURN with a
      	dyn_cast, introducing local "return_stmt" and using ti in place
      	of "stmt".
      
      	* gimple.h (gimple_vec): Eliminate this typedef.
      	(struct gimple_statement_call): Rename to...
      	(struct gcall): ...this.
      	(struct gimple_statement_bind): Rename to...
      	(struct gbind): ...this.
      	(struct gimple_statement_catch): Rename to...
      	(struct gcatch): ...this.
      	(struct gimple_statement_eh_filter): Rename to...
      	(struct geh_filter): ...this.
      	(struct gimple_statement_eh_else): Rename to...
      	(struct geh_else): ...this.
      	(struct gimple_statement_eh_mnt): Rename to...
      	(struct geh_mnt): ...this.
      	(struct gimple_statement_phi): Rename to...
      	(struct gphi): ...this.
      	(struct gimple_statement_resx): Rename to...
      	(struct gresx): ...this.
      	(struct gimple_statement_eh_dispatch): Rename to...
      	(struct geh_dispatch): ...this.
      	(struct gimple_statement_try): Rename to...
      	(struct gtry): ...this.
      	(struct gimple_statement_asm): Rename to...
      	(struct gasm): ...this.
      	(struct gimple_statement_omp_critical): Rename to...
      	(struct gomp_critical): ...this.
      	(struct gimple_statement_omp_for): Rename to...
      	(struct gomp_for): ...this.
      	(struct gimple_statement_omp_parallel): Rename to...
      	(struct gomp_parallel): ...this.
      	(struct gimple_statement_omp_target): Rename to...
      	(struct gomp_target): ...this.
      	(struct gimple_statement_omp_task): Rename to...
      	(struct gomp_task): ...this.
      	(struct gimple_statement_omp_sections): Rename to...
      	(struct gomp_sections): ...this.
      	(struct gimple_statement_omp_continue): Rename to...
      	(struct gomp_continue): ...this.
      	(struct gimple_statement_omp_single): Rename to...
      	(struct gomp_single): ...this.
      	(struct gimple_statement_omp_teams): Rename to...
      	(struct gomp_teams): ...this.
      	(struct gimple_statement_omp_atomic_load): Rename to...
      	(struct gomp_atomic_load): ...this.
      	(struct gimple_statement_omp_atomic_store :): Rename to...
      	(struct gomp_atomic_store :): ...this.
      	(struct gimple_statement_transaction): Rename to...
      	(struct gtransaction): ...this.
      	(struct gcond): New subclass.
      	(struct gdebug): New subclass.
      	(struct ggoto): New subclass.
      	(struct glabel): New subclass.
      	(struct gswitch): New subclass.
      	(struct gassign): New subclass.
      	(struct greturn): New subclass.
      	(is_a_helper <gimple_statement_asm *>::test): Rename to...
      	(is_a_helper <gasm *>::test): ...this.
      	(is_a_helper <gimple_statement_bind *>::test): Rename to...
      	(is_a_helper <gbind *>::test): ...this.
      	(is_a_helper <gassign *>::test): New.
      	(is_a_helper <gimple_statement_call *>::test): Rename to...
      	(is_a_helper <gcall *>::test): ...this.
      	(is_a_helper <gimple_statement_catch *>::test): Rename to...
      	(is_a_helper <gcatch *>::test): ...this.
      	(is_a_helper <gimple_statement_resx *>::test): Rename to...
      	(is_a_helper <gresx *>::test): ...this.
      	(is_a_helper <gcond *>::test): New.
      	(is_a_helper <gdebug *>::test): New.
      	(is_a_helper <ggoto *>::test): New.
      	(is_a_helper <glabel *>::test): New.
      	(is_a_helper <gimple_statement_eh_dispatch *>::test): Rename to...
      	(is_a_helper <geh_dispatch *>::test): ...this.
      	(is_a_helper <gimple_statement_eh_else *>::test): Rename to...
      	(is_a_helper <geh_else *>::test): ...this.
      	(is_a_helper <gimple_statement_eh_filter *>::test): Rename to...
      	(is_a_helper <geh_filter *>::test): ...this.
      	(is_a_helper <gimple_statement_eh_mnt *>::test): Rename to...
      	(is_a_helper <geh_mnt *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_atomic_load *>::test): Rename to...
      	(is_a_helper <gomp_atomic_load *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_atomic_store *>::test): Rename to...
      	(is_a_helper <gomp_atomic_store *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_continue *>::test): Rename to...
      	(is_a_helper <gomp_continue *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_critical *>::test): Rename to...
      	(is_a_helper <gomp_critical *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_for *>::test): Rename to...
      	(is_a_helper <gomp_for *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_parallel *>::test): Rename to...
      	(is_a_helper <gomp_parallel *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_target *>::test): Rename to...
      	(is_a_helper <gomp_target *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_sections *>::test): Rename to...
      	(is_a_helper <gomp_sections *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_single *>::test): Rename to...
      	(is_a_helper <gomp_single *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_teams *>::test): Rename to...
      	(is_a_helper <gomp_teams *>::test): ...this.
      	(is_a_helper <gimple_statement_omp_task *>::test): Rename to...
      	(is_a_helper <gomp_task *>::test): ...this.
      	(is_a_helper <gimple_statement_phi *>::test): Rename to...
      	(is_a_helper <gphi *>::test): ...this.
      	(is_a_helper <gimple_statement_transaction *>::test): Rename to...
      	(is_a_helper <gtransaction *>::test): ...this.
      	(is_a_helper <greturn *>::test): New.
      	(is_a_helper <gswitch *>::test): New.
      	(is_a_helper <gimple_statement_try *>::test): Rename to...
      	(is_a_helper <gtry *>::test): ...this.
      	(is_a_helper <const gimple_statement_asm *>::test): Rename to...
      	(is_a_helper <const gasm *>::test): ...this.
      	(is_a_helper <const gimple_statement_bind *>::test): Rename to...
      	(is_a_helper <const gbind *>::test): ...this.
      	(is_a_helper <const gimple_statement_call *>::test): Rename to...
      	(is_a_helper <const gcall *>::test): ...this.
      	(is_a_helper <const gimple_statement_catch *>::test): Rename to...
      	(is_a_helper <const gcatch *>::test): ...this.
      	(is_a_helper <const gimple_statement_resx *>::test): Rename to...
      	(is_a_helper <const gresx *>::test): ...this.
      	(is_a_helper <const gimple_statement_eh_dispatch *>::test): Rename to...
      	(is_a_helper <const geh_dispatch *>::test): ...this.
      	(is_a_helper <const gimple_statement_eh_filter *>::test): Rename to...
      	(is_a_helper <const geh_filter *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_atomic_load *>::test):
      	Rename to...
      	(is_a_helper <const gomp_atomic_load *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_atomic_store *>::test):
      	Rename to...
      	(is_a_helper <const gomp_atomic_store *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_continue *>::test):
      	Rename to...
      	(is_a_helper <const gomp_continue *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_critical *>::test):
      	Rename to...
      	(is_a_helper <const gomp_critical *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_for *>::test): Rename to...
      	(is_a_helper <const gomp_for *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_parallel *>::test):
      	Rename to...
      	(is_a_helper <const gomp_parallel *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_target *>::test): Rename to...
      	(is_a_helper <const gomp_target *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_sections *>::test):
      	Rename to...
      	(is_a_helper <const gomp_sections *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_single *>::test): Rename to...
      	(is_a_helper <const gomp_single *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_teams *>::test): Rename to...
      	(is_a_helper <const gomp_teams *>::test): ...this.
      	(is_a_helper <const gimple_statement_omp_task *>::test): Rename to...
      	(is_a_helper <const gomp_task *>::test): ...this.
      	(is_a_helper <const gimple_statement_phi *>::test): Rename to...
      	(is_a_helper <const gphi *>::test): ...this.
      	(is_a_helper <const gimple_statement_transaction *>::test): Rename to...
      	(is_a_helper <const gtransaction *>::test): ...this.
      	(gimple_build_return): Strengthen return type to greturn *.
      	(gimple_call_reset_alias_info): Require a gcall *.
      	(gimple_build_call_vec): Return a gcall *.
      	(gimple_build_call): Likewise.
      	(gimple_build_call_valist): Likewise.
      	(gimple_build_call_internal): Likewise.
      	(gimple_build_call_internal_vec): Likewise.
      	(gimple_build_call_from_tree): Likewise.
      	(gimple_build_assign_stat): Return a gassign *.
      	(gimple_build_assign_with_ops): Likewise.
      	(gimple_build_cond): Return a gcond *.
      	(gimple_build_cond_from_tree): Likewise.
      	(gimple_cond_set_condition_from_tree): Require a gcond *.
      	(gimple_build_label): Return a glabel *.
      	(gimple_build_goto): Return a ggoto *.
      	(gimple_build_bind): Return a gbind *.
      	(gimple_build_asm_vec): Return a gasm *.
      	(gimple_build_catch): Return a gcatch *.
      	(gimple_build_eh_filter): Return a geh_filter *.
      	(gimple_build_eh_must_not_throw): Return a geh_mnt *.
      	(gimple_build_eh_else): Return a geh_else *.
      	(gimple_build_try): Return a gtry *.
      	(gimple_build_resx): Return a gresx *.
      	(gimple_build_switch_nlabels): Return a gswitch *.
      	(gimple_build_switch): Return a gswitch *.
      	(gimple_build_eh_dispatch): Return a geh_dispatch *.
      	(gimple_build_debug_bind_stat): Return a gdebug *.
      	(gimple_build_debug_source_bind_stat): Return a gdebug *.
      	(gimple_build_omp_critical): Return a gomp_critical *.
      	(gimple_build_omp_for): Return a gomp_for *.
      	(gimple_build_omp_parallel): Return a gomp_parallel *.
      	(gimple_build_omp_task): Return a gomp_task *.
      	(gimple_build_omp_continue): Return a gomp_continue *.
      	(gimple_build_omp_sections): Return a gomp_sections *.
      	(gimple_build_omp_single): Return a gomp_single *.
      	(gimple_build_omp_target): Return a gomp_target *.
      	(gimple_build_omp_teams): Return a gomp_teams *.
      	(gimple_build_omp_atomic_load): Return a gomp_atomic_load *.
      	(gimple_build_omp_atomic_store): Return a gomp_atomic_store *.
      	(gimple_build_transaction): Return a gtransaction *.
      	(gimple_call_arg_flags): Require a const gcall *.
      	(gimple_call_return_flags): Likewise.
      	(gimple_call_copy_skip_args): Require and return a gcall *.
      	(gimple_asm_clobbers_memory_p): Require a const gasm *.
      	(gimple_seq_first_stmt_as_a_bind): New.
      	(gimple_assign_nontemporal_move_p): Require a const gassign *
      	rather than a const_gimple.
      	(gimple_call_internal_fn): Update for renaming to gcall.
      	(gimple_call_fntype): Likewise.
      	(gimple_call_set_fntype): Require a gcall * rather than a gimple.
      	(gimple_call_set_fn): Likewise.
      	(gimple_call_set_internal_fn): Likewise.
      	(gimple_call_set_chain): Likewise.
      	(gimple_call_set_tail): Likewise.
      	(gimple_call_tail_p): Likewise.
      	(gimple_call_set_return_slot_opt): Likewise.
      	(gimple_call_return_slot_opt_p): Likewise.
      	(gimple_call_set_from_thunk): Likewise.
      	(gimple_call_from_thunk_p): Likewise.
      	(gimple_call_set_va_arg_pack): Likewise.
      	(gimple_call_va_arg_pack_p): Likewise.
      	(gimple_call_set_nothrow): Likewise.
      	(gimple_call_nothrow_p): Likewise.
      	(gimple_call_set_alloca_for_var): Likewise.
      	(gimple_call_alloca_for_var_p): Likewise.
      	(gimple_call_use_set): Likewise.
      	(gimple_call_clobber_set): Likewise.
      	(gimple_call_return_type): Require a const gcall * rather than a
      	const_gimple.
      	(gimple_call_chain_ptr): Likewise.
      	(gimple_call_copy_flags): Require a pair of gcall *.
      	(gimple_cond_set_code): Require a gcond * rather than a gimple
      	(gimple_cond_set_lhs): Likewise.
      	(gimple_cond_set_rhs): Likewise.
      	(gimple_cond_set_true_label): Likewise.
      	(gimple_cond_set_false_label): Likewise.
      	(gimple_cond_make_false): Likewise.
      	(gimple_cond_make_true): Likewise.
      	(gimple_cond_lhs_ptr): Require a const gcond * rather than a
      	const_gimple.
      	(gimple_cond_rhs_ptr): Likewise.
      	(gimple_cond_true_label): Likewise.
      	(gimple_cond_false_label): Likewise.
      	(gimple_cond_true_p): Likewise.
      	(gimple_cond_false_p): Likewise.
      	(gimple_cond_set_condition): Likewise.
      	(gimple_label_label): Require a const glabel *.
      	(gimple_label_set_label): Require a glabel *.
      	(gimple_goto_set_dest): Require a ggoto *.
      	(gimple_bind_vars): Require a const gbind *.
      	(gimple_bind_block): Likewise.
      	(gimple_bind_set_vars): Require a gbind *.
      	(gimple_bind_append_vars): Likewise.
      	(gimple_bind_body_ptr): Likewise.
      	(gimple_bind_body): Likewise.
      	(gimple_bind_set_body): Likewise.
      	(gimple_bind_add_stmt): Likewise.
      	(gimple_bind_add_seq): Likewise.
      	(gimple_bind_set_block): Likewise.
      	(gimple_asm_ninputs): Require a const gasm *.
      	(gimple_asm_noutputs): Likewise.
      	(gimple_asm_nclobbers): Likewise.
      	(gimple_asm_nlabels): Likewise.
      	(gimple_asm_input_op): Likewise.
      	(gimple_asm_input_op_ptr): Likewise.
      	(gimple_asm_output_op): Likewise.
      	(gimple_asm_output_op_ptr): Likewise.
      	(gimple_asm_clobber_op): Likewise.
      	(gimple_asm_label_op): Likewise.
      	(gimple_asm_string): Likewise.
      	(gimple_asm_volatile_p): Likewise.
      	(gimple_asm_input_p): Likewise.
      	(gimple_asm_set_input_op): Require a gasm *.
      	(gimple_asm_set_output_op): Likewise.
      	(gimple_asm_set_clobber_op): Likewise.
      	(gimple_asm_set_label_op): Likewise.
      	(gimple_asm_set_volatile): Likewise.
      	(gimple_asm_set_input): Likewise.
      	(gimple_catch_types): Require a const gcatch *.
      	(gimple_catch_types_ptr): Require a gcatch *.
      	(gimple_catch_handler_ptr): Likewise.
      	(gimple_catch_handler): Likewise.
      	(gimple_catch_set_types): Likewise.
      	(gimple_catch_set_handler): Likewise.
      	(gimple_eh_filter_types): Update for renaming of subclass to
      	geh_filter.
      	(gimple_eh_filter_types_ptr): Likewise.
      	(gimple_eh_filter_failure_ptr): Likewise.
      	(gimple_eh_filter_set_types): Require a geh_filter *.
      	(gimple_eh_filter_set_failure): Likewise.
      	(gimple_eh_must_not_throw_fndecl): Require a geh_mnt *.
      	(gimple_eh_must_not_throw_set_fndecl): Likewise.
      	(gimple_eh_else_n_body_ptr): Require a geh_else *.
      	(gimple_eh_else_n_body): Likewise.
      	(gimple_eh_else_e_body_ptr): Likewise.
      	(gimple_eh_else_e_body): Likewise.
      	(gimple_eh_else_set_n_body): Likewise.
      	(gimple_eh_else_set_e_body): Likewise.
      	(gimple_try_set_kind): Require a gtry *.
      	(gimple_try_set_catch_is_cleanup): Likewise.
      	(gimple_try_set_eval): Likewise.
      	(gimple_try_set_cleanup): Likewise.
      	(gimple_try_eval_ptr): Update for renaming of subclass to gtry.
      	(gimple_try_cleanup_ptr): Likewise.
      	(gimple_phi_capacity): Update for renaming of subclass to gphi.
      	(gimple_phi_num_args): Likewise.
      	(gimple_phi_result): Likewise.
      	(gimple_phi_result_ptr): Likewise.
      	(gimple_phi_arg): Likewise.
      	(gimple_phi_set_result): Require a gphi *.
      	(gimple_phi_set_arg): Likewise.
      	(gimple_phi_arg_def_ptr): Likewise.
      	(gimple_phi_arg_edge): Likewise.
      	(gimple_phi_arg_location): Likewise.
      	(gimple_phi_arg_location_from_edge): Likewise.
      	(gimple_phi_arg_set_location): Likewise.
      	(gimple_phi_arg_has_location): Likewise.
      	(gimple_resx_region): Require a const gresx *.
      	(gimple_resx_set_region): Require a gresx *.
      	(gimple_eh_dispatch_region): Require a const geh_dispatch *.
      	(gimple_eh_dispatch_set_region): Require a geh_dispatch *.
      	(gimple_switch_num_labels): Require a const gswitch *.
      	(gimple_switch_set_num_labels): Likewise.
      	(gimple_switch_index): Likewise.
      	(gimple_switch_index_ptr): Likewise.
      	(gimple_switch_label): Likewise.
      	(gimple_switch_default_label): Likewise.
      	(gimple_switch_set_index): Require a gswitch *.
      	(gimple_switch_set_label): Likewise.
      	(gimple_switch_set_default_label): Likewise.
      	(gimple_omp_critical_name): Require a const gomp_critical *.
      	(gimple_omp_critical_name_ptr): Require a gomp_critical *.
      	(gimple_omp_critical_set_name): Likewise.
      	(gimple_omp_for_set_kind): Require a gomp_for *.
      	(gimple_omp_for_set_combined_p): Likewise.
      	(gimple_omp_for_set_combined_into_p): Likewise.
      	(gimple_omp_for_clauses): Update for renaming of subclass to
      	gomp_for.
      	(gimple_omp_for_clauses_ptr): Likewise.
      	(gimple_omp_for_set_clauses): Likewise.
      	(gimple_omp_for_collapse): Likewise.
      	(gimple_omp_for_index): Likewise.
      	(gimple_omp_for_index_ptr): Likewise.
      	(gimple_omp_for_set_index): Likewise.
      	(gimple_omp_for_initial): Likewise.
      	(gimple_omp_for_initial_ptr): Likewise.
      	(gimple_omp_for_set_initial): Likewise.
      	(gimple_omp_for_final): Likewise.
      	(gimple_omp_for_final_ptr): Likewise.
      	(gimple_omp_for_set_final): Likewise.
      	(gimple_omp_for_incr): Likewise.
      	(gimple_omp_for_incr_ptr): Likewise.
      	(gimple_omp_for_set_incr): Likewise.
      	(gimple_omp_for_pre_body): Likewise.
      	(gimple_omp_for_set_pre_body): Likewise.
      	(gimple_omp_parallel_clauses): Update for renaming of subclass to
      	gomp_parallel.
      	(gimple_omp_parallel_clauses_ptr): Require a gomp_parallel *.
      	(gimple_omp_parallel_set_clauses): Likewise.
      	(gimple_omp_parallel_child_fn_ptr): Likewise.
      	(gimple_omp_parallel_set_child_fn): Likewise.
      	(gimple_omp_parallel_data_arg_ptr): Likewise.
      	(gimple_omp_parallel_set_data_arg): Likewise.
      	(gimple_omp_parallel_child_fn): Require a const gomp_parallel *.
      	(gimple_omp_parallel_data_arg): Likewise.
      	(gimple_omp_task_clauses): Update for renaming of subclass to
      	gomp_task.
      	(gimple_omp_task_clauses_ptr): Likewise.
      	(gimple_omp_task_set_clauses): Likewise.
      	(gimple_omp_task_child_fn): Likewise.
      	(gimple_omp_task_child_fn_ptr): Likewise.
      	(gimple_omp_task_set_child_fn): Likewise.
      	(gimple_omp_task_data_arg): Likewise.
      	(gimple_omp_task_data_arg_ptr): Likewise.
      	(gimple_omp_task_set_data_arg): Likewise.
      	(gimple_omp_taskreg_clauses): Whitespace fixes.
      	(gimple_omp_taskreg_clauses_ptr): Likewise.
      	(gimple_omp_taskreg_set_clauses): Likewise.
      	(gimple_omp_taskreg_child_fn): Likewise.
      	(gimple_omp_taskreg_child_fn_ptr): Likewise.
      	(gimple_omp_taskreg_set_child_fn): Likewise.
      	(gimple_omp_taskreg_data_arg): Likewise.
      	(gimple_omp_taskreg_data_arg_ptr): Likewise.
      	(gimple_omp_taskreg_set_data_arg): Likewise.
      	(gimple_omp_task_copy_fn): Update for renaming of subclass to
      	gomp_task.
      	(gimple_omp_task_copy_fn_ptr): Likewise.
      	(gimple_omp_task_set_copy_fn): Likewise.
      	(gimple_omp_task_arg_size): Likewise.
      	(gimple_omp_task_arg_size_ptr): Likewise.
      	(gimple_omp_task_set_arg_size): Likewise.
      	(gimple_omp_task_arg_align): Likewise.
      	(gimple_omp_task_arg_align_ptr): Likewise.
      	(gimple_omp_task_set_arg_align): Likewise.
      	(gimple_omp_single_clauses): Update for renaming of subclass to
      	gomp_single.
      	(gimple_omp_single_clauses_ptr): Likewise.
      	(gimple_omp_single_set_clauses): Likewise.
      	(gimple_omp_target_clauses): Update for renaming of subclass to
      	gomp_target.
      	(gimple_omp_target_clauses_ptr): Likewise.
      	(gimple_omp_target_set_clauses): Require a gomp_target *.
      	(gimple_omp_target_set_kind): Likewise.
      	(gimple_omp_target_child_fn_ptr): Likewise.
      	(gimple_omp_target_set_child_fn): Likewise.
      	(gimple_omp_target_data_arg_ptr): Likewise.
      	(gimple_omp_target_set_data_arg): Likewise.
      	(gimple_omp_target_child_fn): Require a const gomp_target *.
      	(gimple_omp_target_data_arg): Likewise.
      	(gimple_omp_teams_clauses): Update for renaming of subclass to
      	gomp_teams.
      	(gimple_omp_teams_clauses_ptr): Likewise.
      	(gimple_omp_teams_set_clauses): Require a gomp_teams *.
      	(gimple_omp_sections_clauses): Update for renaming of subclass to
      	gomp_sections.
      	(gimple_omp_sections_clauses_ptr): Likewise.
      	(gimple_omp_sections_set_clauses): Likewise.
      	(gimple_omp_sections_control): Likewise.
      	(gimple_omp_sections_control_ptr): Likewise.
      	(gimple_omp_sections_set_control): Likewise.
      	(gimple_omp_for_set_cond): Likewise.
      	(gimple_omp_for_cond): Likewise.
      	(gimple_omp_atomic_store_set_val): Require a gomp_atomic_store *.
      	(gimple_omp_atomic_store_val_ptr): Likewise.
      	(gimple_omp_atomic_load_set_lhs): Likewise.
      	(gimple_omp_atomic_store_val): Require a const gomp_atomic_store *.
      	(gimple_omp_atomic_load_lhs): Likewise.
      	(gimple_omp_atomic_load_rhs): Likewise.
      	(gimple_omp_atomic_load_lhs_ptr): Require a gomp_atomic_load *.
      	(gimple_omp_atomic_load_set_rhs): Likewise.
      	(gimple_omp_atomic_load_rhs_ptr): Likewise.
      	(gimple_omp_continue_control_def): Require a const gomp_continue *.
      	(gimple_omp_continue_control_use): Likewise.
      	(gimple_omp_continue_control_def_ptr): Require a gomp_continue *.
      	(gimple_omp_continue_set_control_def): Likewise.
      	(gimple_omp_continue_control_use_ptr): Likewise.
      	(gimple_omp_continue_set_control_use): Likewise.
      	(gimple_transaction_body_ptr): Require a gtransaction *.
      	(gimple_transaction_body): Likewise.
      	(gimple_transaction_label_ptr): Likewise.
      	(gimple_transaction_label): Require a const gtransaction *.
      	(gimple_transaction_subcode): Likewise.
      	(gimple_transaction_set_body): Require a gtransaction *.
      	(gimple_transaction_set_label): Likewise.
      	(gimple_transaction_set_subcode): Likewise.
      	(gimple_return_retval_ptr): Require a const greturn *.
      	(gimple_return_retval): Likewise.
      	(gimple_return_set_retval): Require a greturn *.
      	(gimple_expr_type): Introduce local "call_stmt" and use in place of
      	"stmt" for typesafety.
      
      	* asan.c: Use gimple subclasses.
      	* auto-profile.c: Likewise.
      	* builtins.c: Likewise.
      	* builtins.h: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloopmanip.c: Likewise.
      	* cgraph.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphbuild.c: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* expr.h: Likewise.
      	* gimple-builder.c: Likewise.
      	* gimple-builder.h: Likewise.
      	* gimple-fold.c: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-pretty-print.c: Likewise.
      	* gimple-ssa-isolate-paths.c: Likewise.
      	* gimple-ssa-strength-reduction.c: Likewise.
      	* gimple-streamer-in.c: Likewise.
      	* gimple-streamer-out.c: Likewise.
      	* gimple-walk.c: Likewise.
      	* gimplify-me.c: Likewise.
      	* gimplify.c: Likewise.
      	* gimplify.h: Likewise.
      	* graphite-scop-detection.c: Likewise.
      	* graphite-sese-to-poly.c: Likewise.
      	* internal-fn.c: Likewise.
      	* internal-fn.def:: Likewise.
      	* internal-fn.h: Likewise.
      	* ipa-icf-gimple.c: Likewise.
      	* ipa-icf-gimple.h: Likewise.
      	* ipa-icf.c: Likewise.
      	* ipa-inline-analysis.c: Likewise.
      	* ipa-prop.c: Likewise.
      	* ipa-prop.h: Likewise.
      	* ipa-pure-const.c: Likewise.
      	* ipa-split.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* omp-low.c: Likewise.
      	* predict.c: Likewise.
      	* sanopt.c: Likewise.
      	* sese.c: Likewise.
      	* ssa-iterators.h: Likewise.
      	* stmt.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-call-cdce.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfg.h: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-chkp.c: Likewise.
      	* tree-chkp.h: Likewise.
      	* tree-complex.c: Likewise.
      	* tree-data-ref.c: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-eh.h: Likewise.
      	* tree-emutls.c: Likewise.
      	* tree-if-conv.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-inline.h: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-into-ssa.h: Likewise.
      	* tree-loop-distribution.c: Likewise.
      	* tree-nrv.c: Likewise.
      	* tree-object-size.c: Likewise.
      	* tree-outof-ssa.c: Likewise.
      	* tree-parloops.c: Likewise.
      	* tree-phinodes.c: Likewise.
      	* tree-phinodes.h: Likewise.
      	* tree-predcom.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-scalar-evolution.c: Likewise.
      	* tree-scalar-evolution.h
      	* tree-sra.cn_function):
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-alias.h: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-coalesce.c: Likewise.
      	* tree-ssa-copy.c: Likewise.
      	* tree-ssa-copyrename.c: Likewise.
      	* tree-ssa-dce.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-forwprop.c: Likewise.
      	* tree-ssa-ifcombine.c: Likewise.
      	* tree-ssa-live.c: Likewise.
      	* tree-ssa-loop-im.c: Likewise.
      	* tree-ssa-loop-ivcanon.c: Likewise.
      	* tree-ssa-loop-ivopts.c: Likewise.
      	* tree-ssa-loop-manip.c: Likewise.
      	* tree-ssa-loop-niter.c: Likewise.
      	* tree-ssa-loop-prefetch.c: Likewise.
      	* tree-ssa-loop-unswitch.c: Likewise.
      	* tree-ssa-math-opts.c: Likewise.
      	* tree-ssa-operands.c: Likewise.
      	* tree-ssa-phiopt.c: Likewise.
      	* tree-ssa-phiprop.c: Likewise.
      	* tree-ssa-pre.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-propagate.h: Likewise.
      	* tree-ssa-reassoc.c: Likewise.
      	* tree-ssa-sccvn.c: Likewise.
      	* tree-ssa-sccvn.h: Likewise.
      	* tree-ssa-sink.c: Likewise.
      	* tree-ssa-strlen.c
      	* tree-ssa-structalias.c
      	* tree-ssa-tail-merge.c: Likewise.
      	* tree-ssa-ter.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadedge.h: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-stdarg.c: Likewise.
      	* tree-switch-conversion.c: Likewise.
      	* tree-tailcall.c: Likewise.
      	* tree-vect-data-refs.c: Likewise.
      	* tree-vect-generic.c: Likewise.
      	* tree-vect-loop-manip.c: Likewise.
      	* tree-vect-loop.c: Likewise.
      	* tree-vect-patterns.c: Likewise.
      	* tree-vect-slp.c: Likewise.
      	* tree-vect-stmts.c: Likewise.
      	* tree-vectorizer.h: Likewise.
      	* tree-vrp.c: Likewise.
      	* tree.c: Likewise.
      	* ubsan.c: Likewise.
      	* value-prof.c: Likewise.
      	* value-prof.h: Likewise.
      	* vtable-verify.c: Likewise.
      
      gcc/c-family/ChangeLog:
      	Merger of git branch "gimple-classes-v2-option-3".
      	* ChangeLog.gimple-classes: New.
      	* c-gimplify.c (add_block_to_enclosing): Strengthen local "stack"
      	from being just a vec<gimple> to a vec<gbind *>.
      
      gcc/java/ChangeLog:
      	Merger of git branch "gimple-classes-v2-option-3".
      	* ChangeLog.gimple-classes: New.
      	* java-gimplify.c (java_gimplify_block): Strengthen local "outer"
      	from gimple to gbind *.
      
      From-SVN: r217787
      David Malcolm committed
  16. 17 Nov, 2014 1 commit
  17. 16 Nov, 2014 2 commits
    • * ipa-polymorphic-call.c · df0d8136
      	(ipa_polymorphic_call_context::speculation_consistent_p): Constify.
      	(ipa_polymorphic_call_context::meet_speculation_with): New function.
      	(ipa_polymorphic_call_context::combine_with): Handle types in construction
      	better.
      	(ipa_polymorphic_call_context::equal_to): Do not bother about useless
      	speculation.
      	(ipa_polymorphic_call_context::meet_with): New function.
      	* cgraph.h (class ipa_polymorphic_call_context): Add
      	meet_width, meet_speculation_with; constify speculation_consistent_p.
      	* ipa-cp.c (ipa_context_from_jfunc): Handle speculation; combine with incomming
      	context.
      	(propagate_context_accross_jump_function): Likewise; be more cureful.
      	about set_contains_variable.
      	(ipa_get_indirect_edge_target_1): Fix handling of dynamic type changes.
      	(find_more_scalar_values_for_callers_subset): Fix.
      	(find_more_contexts_for_caller_subset): Perform meet operation.
      
      From-SVN: r217634
      Jan Hubicka committed
    • passes.c (execute_one_pass): Do not apply all transforms prior every simple IPA pass. · 70486010
      	* passes.c (execute_one_pass): Do not apply all transforms prior
      	every simple IPA pass.
      	* cgraphunit.c: Do not include fibheap.h
      	(expand_thunk): Use get_untransformed_body.
      	(cgraph_node::expand): Likewise.
      	* tree-ssa-structalias.c (ipa_pta_execute): Skip inline clones.
      	* cgraph.c (release_function_body): Do not push cfun when CFG is not there.
      	(cgraph_node::get_untransformed_body): Break out from ...
      	(cgraph_node::get_body): ... here; add code to apply all transforms.
      	* cgraph.h (cgraph_node): Add get_untransformed_body.
      	* ipa-icf.c (sem_function::init): Use get_untransformed_body.
      	* cgraphclones.c (duplicate_thunk_for_node): Likewise.
      	* tree-inline.c (expand_call_inline): LIkewise.
      	* i386.c (ix86_reset_to_default_globals): Break out from ...
      	(ix86_set_current_function): ... here;
      	(ix86_reset_previous_fndecl): Use it.
      	(ix86_simd_clone_adjust): Use ix86_reset_previous_fndecl.
      
      From-SVN: r217633
      Jan Hubicka committed
  18. 14 Nov, 2014 3 commits
    • ipa-prop.h (ipa_get_jf_pass_through_type_preserved): use agg_preserved flag instead. · 44210a96
      2014-11-14  Martin Jambor  <mjambor@suse.cz>
      
      	* ipa-prop.h (ipa_get_jf_pass_through_type_preserved): use
      	agg_preserved flag instead.
      	(ipa_get_jf_ancestor_type_preserved): Likewise.
      	(ipa_node_params): Rename known_vals to known_csts, update all users.
      	New field known_contexts.
      	(ipa_get_indirect_edge_target): Update prototype.
      	(ipcp_poly_ctx_values_pool): Declare.
      	(ipa_context_from_jfunc): Likewise.
      	* ipa-inline.h (estimate_ipcp_clone_size_and_time): Updated prototype.
      	* cgraph.h (ipa_polymorphic_call_context): New method equal_to.  New
      	parameter newline of method dump.
      	* ipa-cp.c (ctxlat): New field.
      	(ipcp_values_pool): Renamed to ipcp_cst_values_pool, updated all users.
      	(ipcp_poly_ctx_values_pool):New variable.
      	(ipa_get_poly_ctx_lat): New function.
      	(print_ipcp_constant_value): New overloaded function for contexts.
      	(print_all_lattices): Also print contexts.
      	(ipa_topo_info): New field contexts;
      	(set_all_contains_variable): Also set the flag in the context lattice.
      	(initialize_node_lattices): Likewise for flag bottom.
      	(ipa_get_jf_ancestor_result): Removed BINFO handling.
      	(ipa_value_from_jfunc): Likewise.
      	(ipa_context_from_jfunc): New function.
      	(values_equal_for_ipcp_p): New overloaded function for contexts.
      	(allocate_and_init_ipcp_value): Construct the value.
      	(allocate_and_init_ipcp_value): New overloaded function for contexts.
      	(propagate_scalar_accross_jump_function): Removed handling of
      	KNOWN_TYPE jump functions.
      	(propagate_context_accross_jump_function): New function.
      	(propagate_constants_accross_call): Also propagate contexts.
      	(ipa_get_indirect_edge_target_1): Work on contexts rather than BINFOs.
      	(ipa_get_indirect_edge_target): Likewise.
      	(devirtualization_time_bonus): Likewise.
      	(gather_context_independent_values): Create and populate known_contexts
      	vector rather than known_binfos.
      	(perform_estimation_of_a_value): Work on contexts rather than BINFOs.
      	(estimate_local_effects): Likewise.
      	(add_all_node_vals_to_toposort): Also add contexts to teir topological
      	sort.
      	(ipcp_propagate_stage): Also propagate effects of contexts.
      	(ipcp_discover_new_direct_edges): Receive and pass known_contexts to
      	ipa_get_indirect_edge_target_1.
      	(cgraph_edge_brings_value_p): New overloaded function for contexts.
      	(create_specialized_node): Work on contexts rather than BINFOs.
      	(find_more_contexts_for_caller_subset): New function.
      	(known_contexts_useful_p): New function.
      	(copy_useful_known_contexts): Likewise.
      	(modify_known_vectors_with_val): Likewise.
      	(ipcp_val_in_agg_replacements_p): Renamed to
      	ipcp_val_agg_replacement_ok_p, return true for all offset indicating
      	non-aggregate.
      	(ipcp_val_agg_replacement_ok_p): New overloaded function for contexts.
      	(decide_about_value): Work on contexts rather than BINFOs.
      	(decide_whether_version_node): Likewise.
      	(ipcp_driver): Initialize the new alloc pool.
      	* ipa-prop.c (ipa_print_node_jump_functions_for_edge): Prettify
      	printing of edge contexts.
      	(ipa_set_ancestor_jf): Replace assert with conditional setting of
      	type_preserved to false.
      	(update_jump_functions_after_inlining): Use access function instead of
      	reading agg_preserved directly.  Store combined context in the ancestor
      	case.
      	(try_make_edge_direct_virtual_call): Work on contexts rather than
      	BINFOs.
      	(update_indirect_edges_after_inlining): Get context from
      	ipa_context_from_jfunc.
      	(ipa_free_node_params_substructures): Free also known_contexts.
      	(ipa_free_all_structures_after_ipa_cp): Free the new alloc pool.
      	(ipa_free_all_structures_after_iinln): Likewise.
      	* ipa-inline-analysis.c (evaluate_properties_for_edge): Work on
      	contexts rather than BINFOs.
      	(estimate_edge_devirt_benefit): Likewise.
      	(estimate_edge_size_and_time): Likewise.
      	(estimate_calls_size_and_time): Likewise.
      	(estimate_node_size_and_time): Likewise.
      	(estimate_ipcp_clone_size_and_time): Likewise.
      	(do_estimate_edge_time): Likewise.
      	(do_estimate_edge_size): Likewise.
      	(do_estimate_edge_hints): Likewise.
      	* ipa-polymorphic-call.c (ipa_polymorphic_call_context::dump): New
      	parameter newline, ouput newline only when it is set.
      	(ipa_polymorphic_call_context::equal_to): New method.
      
      testsuite/
      	* g++.dg/ipa/devirt-11.C: Dont't run ipa-cp, remove times constraint
      	from the dump scan.
      	* g++.dg/ipa/devirt-21.C: Xfail.
      	* g++.dg/ipa/devirt-24.C: Likewise.
      	* g++.dg/ipa/devirt-10.C: Removed times constraint from the dump scan.
      	* g++.dg/ipa/devirt-41.C: Updated the dump scan.
      	* g++.dg/ipa/devirt-44.C: Likewise.
      	* g++.dg/ipa/devirt-43.C: Xfail.
      
      From-SVN: r217587
      Martin Jambor committed
    • ipa-pure-const.c (struct funct_state_d): Add can_free field. · 8413ca87
      	* ipa-pure-const.c (struct funct_state_d): Add can_free field.
      	(varying_state): Add true for can_free.
      	(check_call): For builtin or internal !nonfreeing_call_p set
      	local->can_free.
      	(check_stmt): For asm volatile and asm with "memory" set
      	local->can_free.
      	(analyze_function): Clear local->can_free initially, continue
      	calling check_stmt until all flags are computed, dump can_free
      	flag.
      	(pure_const_write_summary): Write can_free flag.
      	(pure_const_read_summary): Read it back.
      	(propagate_pure_const): Propagate also can_free flag, set
      	w->nonfreeing_fn if it is false after propagation.
      	* cgraph.h (cgraph_node): Add nonfreeing_fn member.
      	* gimple.c: Include ipa-ref.h, lto-streamer.h and cgraph.h.
      	(nonfreeing_call_p): Return cgraph nonfreeing_fn flag if set.
      	Also return true for IFN_ABNORMAL_DISPATCHER.
      	* cgraph.c (cgraph_node::dump): Dump nonfreeing_fn flag.
      	* lto-cgraph.c (lto_output_node): Write nonfreeing_fn flag.
      	(input_overwrite_node): Read it back.
      
      From-SVN: r217582
      Jakub Jelinek committed
    • cgraph.h (clear_outer_type): Make public. · 6ff65dd7
      2014-11-14  Martin Jambor  <mjambor@suse.cz>
      
      	* cgraph.h (clear_outer_type): Make public.  Fix comment.
      	* ipa-devirt.c (possible_polymorphic_call_targets): Use
      	clear_outer_type when resetting the context.
      
      From-SVN: r217529
      Martin Jambor committed
  19. 13 Nov, 2014 1 commit
    • [PATCH 2/7] OpenMP 4.0 offloading infrastructure: LTO streaming. · 1f6be682
      gcc/
      	* cgraph.c: Include context.h.
      	(cgraph_node::create): Set node->offloadable and g->have_offload if
      	decl have "omp declare target" attribute.
      	* cgraph.h (symtab_node): Add need_lto_streaming and offloadable flags.
      	* cgraphunit.c: Include lto-section-names.h.
      	(ipa_passes): Call ipa_write_summaries if there is something to write to
      	OFFLOAD_SECTION_NAME_PREFIX sections.
      	(symbol_table::compile): Set flag_generate_lto if there is something to
      	offload.
      	Replace flag_lto with flag_generate_lto before lto_streamer_hooks_init.
      	* context.c (gcc::context::context): Initialize have_offload with false.
      	* context.h (class context): Add have_offload flag.
      	* ipa-inline-analysis.c (inline_generate_summary): Do not exit under
      	flag_generate_lto.
      	(inline_free_summary): Always remove hooks.
      	* lto-cgraph.c (referenced_from_other_partition_p): Ignore references
      	from non-offloadable nodes while streaming a node into offload section.
      	(reachable_from_other_partition_p): Likewise.
      	(select_what_to_stream): New function.
      	(compute_ltrans_boundary): Do not call
      	lto_set_symtab_encoder_in_partition if the node should not be streamed.
      	* lto-section-names.h (OFFLOAD_SECTION_NAME_PREFIX): Define.
      	(section_name_prefix): Declare.
      	* lto-streamer.c (section_name_prefix): New variable.
      	(lto_get_section_name): Use section_name_prefix instead of
      	LTO_SECTION_NAME_PREFIX.
      	* lto-streamer.h (select_what_to_stream): Declare.
      	* omp-low.c: Include context.h.
      	(is_targetreg_ctx): New function.
      	(scan_sharing_clauses): Use offloadable flag, instead of an attribute.
      	(create_omp_child_function, check_omp_nesting_restrictions): Use new
      	is_targetreg_ctx function.  Replace usage of "omp declare target"
      	attribute with a cgraph_node flag offloadable.
      	(expand_omp_target): Set mark_force_output for offloadable functions.
      	(lower_omp_critical): Set offloadable flag for omp critical symbol.
      	* passes.c (ipa_write_summaries): New argument offload_lto_mode.  Call
      	select_what_to_stream.  Do not call lto_set_symtab_encoder_in_partition
      	if the node should not be streamed out.
      	* tree-pass.h (ipa_write_summaries): New bool argument.
      	* varpool.c: Include context.h.
      	(varpool_node::get_create): Set node->offloadable and g->have_offload if
      	decl have "omp declare target" attribute.
      
      gcc/lto/
      	* lto-object.c (lto_obj_add_section): Use section_name_prefix instead of
      	LTO_SECTION_NAME_PREFIX.
      	* lto-partition.c (lto_promote_cross_file_statics): Call
      	select_what_to_stream.
      	* lto.c (lto_section_with_id): Use section_name_prefix instead of
      	LTO_SECTION_NAME_PREFIX.
      	(read_cgraph_and_symbols): Read OFFLOAD_SECTION_NAME_PREFIX sections, if
      	being built as an offload compiler.
      
      Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com>
      Co-Authored-By: Bernd Schmidt <bernds@codesourcery.com>
      Co-Authored-By: Michael Zolotukhin <michael.v.zolotukhin@intel.com>
      
      From-SVN: r217486
      Ilya Verbin committed
  20. 05 Nov, 2014 1 commit
    • ipa-chkp.c: New. · d5e254e1
      gcc/
      
      2014-11-05  Ilya Enkovich  <ilya.enkovich@intel.com>
      
      	* ipa-chkp.c: New.
      	* ipa-chkp.h: New.
      	* tree-chkp.c: New.
      	* tree-chkp.h: New.
      	* tree-chkp-opt.c: New.
      	* rtl-chkp.c: New.
      	* rtl-chkp.h: New.
      	* Makefile.in (OBJS): Add ipa-chkp.o, rtl-chkp.o, tree-chkp.o
      	tree-chkp-opt.o.
      	(GTFILES): Add tree-chkp.c.
      	* mode-classes.def (MODE_POINTER_BOUNDS): New.
      	* tree.def (POINTER_BOUNDS_TYPE): New.
      	* genmodes.c (complete_mode): Support MODE_POINTER_BOUNDS.
      	(POINTER_BOUNDS_MODE): New.
      	(make_pointer_bounds_mode): New.
      	* machmode.h (POINTER_BOUNDS_MODE_P): New.
      	* stor-layout.c (int_mode_for_mode): Support MODE_POINTER_BOUNDS.
      	(layout_type): Support POINTER_BOUNDS_TYPE.
      	* tree-pretty-print.c (dump_generic_node): Support POINTER_BOUNDS_TYPE.
      	* tree-core.h (tree_index): Add TI_POINTER_BOUNDS_TYPE.
      	* tree.c (build_int_cst_wide): Support POINTER_BOUNDS_TYPE.
      	(type_contains_placeholder_1): Likewise.
      	(build_common_tree_nodes): Initialize
      	pointer_bounds_type_node.
      	* tree.h (POINTER_BOUNDS_TYPE_P): New.
      	(pointer_bounds_type_node): New.
      	(POINTER_BOUNDS_P): New.
      	(BOUNDED_TYPE_P): New.
      	(BOUNDED_P): New.
      	(CALL_WITH_BOUNDS_P): New.
      	* gimple.h (gf_mask): Add GF_CALL_WITH_BOUNDS.
      	(gimple_call_with_bounds_p): New.
      	(gimple_call_set_with_bounds): New.
      	(gimple_return_retbnd): New.
      	(gimple_return_set_retbnd): New
      	* gimple.c (gimple_build_return): Increase number of ops
      	for return statement.
      	(gimple_build_call_from_tree): Propagate CALL_WITH_BOUNDS_P
      	flag.
      	* gimple-pretty-print.c (dump_gimple_return): Print second op.
      	* rtl.h (CALL_EXPR_WITH_BOUNDS_P): New.
      	* gimplify.c (gimplify_init_constructor): Avoid infinite
      	loop during gimplification of bounds initializer.
      	* calls.c: Include tree-chkp.h, rtl-chkp.h, bitmap.h.
      	(special_function_p): Use original decl name when analyzing
      	instrumentation clone.
      	(arg_data): Add fields special_slot, pointer_arg and
      	pointer_offset.
      	(store_bounds): New.
      	(emit_call_1): Propagate instrumentation flag for CALL.
      	(initialize_argument_information): Compute pointer_arg,
      	pointer_offset and special_slot for pointer bounds arguments.
      	(finalize_must_preallocate): Preallocate when storing bounds
      	in bounds table.
      	(compute_argument_addresses): Skip pointer bounds.
      	(expand_call): Store bounds into tables separately.  Return
      	result joined with resulting bounds.
      	* cfgexpand.c: Include tree-chkp.h, rtl-chkp.h.
      	(expand_call_stmt): Propagate bounds flag for CALL_EXPR.
      	(expand_return): Add returned bounds arg.  Handle returned bounds.
      	(expand_gimple_stmt_1): Adjust to new expand_return signature.
      	(gimple_expand_cfg): Reset rtx bounds map.
      	* expr.c: Include tree-chkp.h, rtl-chkp.h.
      	(expand_assignment): Handle returned bounds.
      	(store_expr_with_bounds): New.  Replaces store_expr with new bounds
      	target argument.  Handle bounds returned by calls.
      	(store_expr): Now wraps store_expr_with_bounds.
      	* expr.h (store_expr_with_bounds): New.
      	* function.c: Include tree-chkp.h, rtl-chkp.h.
      	(bounds_parm_data): New.
      	(use_register_for_decl): Do not registerize decls used for bounds
      	stores and loads.
      	(assign_parms_augmented_arg_list): Add bounds of the result
      	structure pointer as the second argument.
      	(assign_parm_find_entry_rtl): Mark bounds are never passed on
      	the stack.
      	(assign_parm_is_stack_parm): Likewise.
      	(assign_parm_load_bounds): New.
      	(assign_bounds): New.
      	(assign_parms): Load bounds and determine a location for
      	returned bounds.
      	(diddle_return_value_1): New.
      	(diddle_return_value): Handle returned bounds.
      	* function.h (rtl_data): Add field for returned bounds.
      	* varasm.c: Include tree-chkp.h.
      	(output_constant): Support POINTER_BOUNDS_TYPE.
      	(output_constant_pool_2): Support MODE_POINTER_BOUNDS.
      	(ultimate_transparent_alias_target): Move up.
      	(make_decl_rtl): For instrumented function use
      	name of the original decl.
      	(assemble_start_function): Mark function as global
      	in case it is instrumentation clone of the global
      	function.
      	(do_assemble_alias): Follow transparent alias chain
      	for identifier.  Check if original alias is public.
      	(maybe_assemble_visibility): Use visibility of the
      	original function for instrumented version.
      	(default_unique_section): Likewise.
      	* emit-rtl.c (immed_double_const): Support MODE_POINTER_BOUNDS.
      	(init_emit_once): Build pointer bounds zero constants.
      	* explow.c (trunc_int_for_mode): Support MODE_POINTER_BOUNDS.
      	* target.def (builtin_chkp_function): New.
      	(chkp_bound_type): New.
      	(chkp_bound_mode): New.
      	(chkp_make_bounds_constant): New.
      	(chkp_initialize_bounds): New.
      	(load_bounds_for_arg): New.
      	(store_bounds_for_arg): New.
      	(load_returned_bounds): New.
      	(store_returned_bounds): New.
      	(chkp_function_value_bounds): New.
      	(setup_incoming_vararg_bounds): New.
      	(function_arg): Update hook description with new possible return
      	value CONST_INT.
      	* targhooks.h (default_load_bounds_for_arg): New.
      	(default_store_bounds_for_arg): New.
      	(default_load_returned_bounds): New.
      	(default_store_returned_bounds): New.
      	(default_chkp_bound_type): New.
      	(default_chkp_bound_mode): New.
      	(default_builtin_chkp_function): New.
      	(default_chkp_function_value_bounds): New.
      	(default_chkp_make_bounds_constant): New.
      	(default_chkp_initialize_bounds): New.
      	(default_setup_incoming_vararg_bounds): New.
      	* targhooks.c (default_load_bounds_for_arg): New.
      	(default_store_bounds_for_arg): New.
      	(default_load_returned_bounds): New.
      	(default_store_returned_bounds): New.
      	(default_chkp_bound_type): New.
      	(default_chkp_bound_mode); New.
      	(default_builtin_chkp_function): New.
      	(default_chkp_function_value_bounds): New.
      	(default_chkp_make_bounds_constant): New.
      	(default_chkp_initialize_bounds): New.
      	(default_setup_incoming_vararg_bounds): New.
      	* builtin-types.def (BT_BND): New.
      	(BT_FN_PTR_CONST_PTR): New.
      	(BT_FN_CONST_PTR_CONST_PTR): New.
      	(BT_FN_BND_CONST_PTR): New.
      	(BT_FN_CONST_PTR_BND): New.
      	(BT_FN_PTR_CONST_PTR_SIZE): New.
      	(BT_FN_PTR_CONST_PTR_CONST_PTR): New.
      	(BT_FN_VOID_PTRPTR_CONST_PTR): New.
      	(BT_FN_VOID_CONST_PTR_SIZE): New.
      	(BT_FN_VOID_PTR_BND): New.
      	(BT_FN_CONST_PTR_CONST_PTR_CONST_PTR): New.
      	(BT_FN_BND_CONST_PTR_SIZE): New.
      	(BT_FN_PTR_CONST_PTR_CONST_PTR_SIZE): New.
      	(BT_FN_VOID_CONST_PTR_BND_CONST_PTR): New.
      	* chkp-builtins.def: New.
      	* builtins.def: include chkp-builtins.def.
      	(DEF_CHKP_BUILTIN): New.
      	* builtins.c: Include tree-chkp.h and rtl-chkp.h.
      	(expand_builtin): Support BUILT_IN_CHKP_INIT_PTR_BOUNDS,
      	BUILT_IN_CHKP_NULL_PTR_BOUNDS, BUILT_IN_CHKP_COPY_PTR_BOUNDS,
      	BUILT_IN_CHKP_CHECK_PTR_LBOUNDS, BUILT_IN_CHKP_CHECK_PTR_UBOUNDS,
      	BUILT_IN_CHKP_CHECK_PTR_BOUNDS, BUILT_IN_CHKP_SET_PTR_BOUNDS,
      	BUILT_IN_CHKP_NARROW_PTR_BOUNDS, BUILT_IN_CHKP_STORE_PTR_BOUNDS,
      	BUILT_IN_CHKP_GET_PTR_LBOUND, BUILT_IN_CHKP_GET_PTR_UBOUND,
      	BUILT_IN_CHKP_BNDMK, BUILT_IN_CHKP_BNDSTX, BUILT_IN_CHKP_BNDCL,
      	BUILT_IN_CHKP_BNDCU, BUILT_IN_CHKP_BNDLDX, BUILT_IN_CHKP_BNDRET,
      	BUILT_IN_CHKP_INTERSECT, BUILT_IN_CHKP_NARROW,
      	BUILT_IN_CHKP_EXTRACT_LOWER, BUILT_IN_CHKP_EXTRACT_UPPER.
      	(std_expand_builtin_va_start): Init bounds for va_list.
      	* cppbuiltin.c (define_builtin_macros_for_compilation_flags): Add
      	__CHKP__ macro when Pointer Bounds Checker is on.
      	* params.def (PARAM_CHKP_MAX_CTOR_SIZE): New.
      	* passes.def (pass_ipa_chkp_versioning): New.
      	(pass_early_local_passes): Renamed to pass_build_ssa_passes.
      	(pass_fixup_cfg): Moved to pass_chkp_instrumentation_passes.
      	(pass_chkp_instrumentation_passes): New.
      	(pass_ipa_chkp_produce_thunks): New.
      	(pass_local_optimization_passes): New.
      	(pass_chkp_opt): New.
      	* tree-pass.h (make_pass_ipa_chkp_versioning): New.
      	(make_pass_ipa_chkp_produce_thunks): New.
      	(make_pass_chkp): New.
      	(make_pass_chkp_opt): New.
      	(make_pass_early_local_passes): Renamed to ...
      	(make_pass_build_ssa_passes): This.
      	(make_pass_chkp_instrumentation_passes): New.
      	(make_pass_local_optimization_passes): New.
      	* passes.c (pass_manager::execute_early_local_passes): Execute
      	early passes in three steps.
      	(execute_all_early_local_passes): Renamed to ...
      	(execute_build_ssa_passes): This.
      	(pass_data_early_local_passes): Renamed to ...
      	(pass_data_build_ssa_passes): This.
      	(pass_early_local_passes): Renamed to ...
      	(pass_build_ssa_passes): This.
      	(pass_data_chkp_instrumentation_passes): New.
      	(pass_chkp_instrumentation_passes): New.
      	(pass_data_local_optimization_passes): New.
      	(pass_local_optimization_passes): New.
      	(make_pass_early_local_passes): Renamed to ...
      	(make_pass_build_ssa_passes): This.
      	(make_pass_chkp_instrumentation_passes): New.
      	(make_pass_local_optimization_passes): New.
      	* c-family/c.opt (fcheck-pointer-bounds): New.
      	(fchkp-check-incomplete-type): New.
      	(fchkp-zero-input-bounds-for-main): New.
      	(fchkp-first-field-has-own-bounds): New.
      	(fchkp-narrow-bounds): New.
      	(fchkp-narrow-to-innermost-array): New.
      	(fchkp-optimize): New.
      	(fchkp-use-fast-string-functions): New.
      	(fchkp-use-nochk-string-functions): New.
      	(fchkp-use-static-bounds): New.
      	(fchkp-use-static-const-bounds): New.
      	(fchkp-treat-zero-dynamic-size-as-infinite): New.
      	(fchkp-check-read): New.
      	(fchkp-check-write): New.
      	(fchkp-store-bounds): New.
      	(fchkp-instrument-calls): New.
      	(fchkp-instrument-marked-only): New.
      	(Wchkp): New.
      	* c-family/c-common.c (handle_bnd_variable_size_attribute): New.
      	(handle_bnd_legacy): New.
      	(handle_bnd_instrument): New.
      	(c_common_attribute_table): Add bnd_variable_size, bnd_legacy
      	and bnd_instrument.  Fix documentation.
      	(c_common_format_attribute_table): Likewsie.
      	* toplev.c: include tree-chkp.h.
      	(process_options): Check Pointer Bounds Checker is supported.
      	(compile_file): Add chkp_finish_file call.
      	* ipa-cp.c (initialize_node_lattices): Use cgraph_local_p
      	to handle instrumentation clones properly.
      	(propagate_constants_accross_call): Do not propagate
      	through instrumentation thunks.
      	* ipa-pure-const.c (propagate_pure_const): Support
      	IPA_REF_CHKP.
      	* ipa-inline.c (early_inliner): Check edge has summary allocated.
      	* ipa-split.c: Include tree-chkp.h.
      	(find_retbnd): New.
      	(split_part_set_ssa_name_p): New.
      	(consider_split): Do not split retbnd and retval
      	producers.
      	(insert_bndret_call_after): new.
      	(split_function): Propagate Pointer Bounds Checker
      	instrumentation marks and handle returned bounds.
      	* tree-ssa-sccvn.h (vn_reference_op_struct): Transform opcode
      	into bit field and add with_bounds field.
      	* tree-ssa-sccvn.c (copy_reference_ops_from_call): Set
      	with_bounds field for instrumented calls.
      	* tree-ssa-pre.c (create_component_ref_by_pieces_1): Restore
      	CALL_WITH_BOUNDS_P flag for calls.
      	* tree-ssa-ccp.c: Include tree-chkp.h.
      	(insert_clobber_before_stack_restore): Handle
      	BUILT_IN_CHKP_BNDRET calls.
      	* tree-ssa-dce.c: Include tree-chkp.h.
      	(propagate_necessity): For free call fed by alloc check
      	bounds are also provided by the same alloc.
      	(eliminate_unnecessary_stmts): Handle BUILT_IN_CHKP_BNDRET
      	used by free calls.
      	* tree-inline.c: Include tree-chkp.h.
      	(declare_return_variable): Add arg holding
      	returned bounds slot.  Create and initialize returned bounds var.
      	(remap_gimple_stmt): Handle returned bounds.
      	Return sequence of statements instead of a single statement.
      	(insert_init_stmt): Add declaration.
      	(remap_gimple_seq): Adjust to new remap_gimple_stmt signature.
      	(copy_bb): Adjust to changed return type of remap_gimple_stmt.
      	Properly handle bounds in va_arg_pack and va_arg_pack_len.
      	(expand_call_inline): Handle returned bounds.  Add bounds copy
      	for generated mem to mem assignments.
      	* tree-inline.h (copy_body_data): Add fields retbnd and
      	assign_stmts.
      	* value-prof.c: Include tree-chkp.h.
      	(gimple_ic): Support returned bounds.
      	* ipa.c (cgraph_build_static_cdtor_1): Support contructors
      	with "chkp ctor" and "bnd_legacy" attributes.
      	(symtab_remove_unreachable_nodes): Keep initial values for
      	pointer bounds to be used for checks eliminations.
      	(process_references): Handle IPA_REF_CHKP.
      	(walk_polymorphic_call_targets): Likewise.
      	* ipa-visibility.c (cgraph_externally_visible_p): Mark
      	instrumented 'main' as externally visible.
      	(function_and_variable_visibility): Filter instrumentation
      	thunks.
      	* cgraph.h (cgraph_thunk_info): Add add_pointer_bounds_args
      	field.
      	(cgraph_node): Add instrumented_version, orig_decl and
      	instrumentation_clone fields.
      	(symtab_node::get_alias_target): Allow IPA_REF_CHKP reference.
      	(varpool_node): Add need_bounds_init field.
      	(cgraph_local_p): New.
      	* cgraph.c: Include tree-chkp.h.
      	(cgraph_node::remove): Fix instrumented_version
      	of the referenced node if any.
      	(cgraph_node::dump): Dump instrumentation_clone and
      	instrumented_version fields.
      	(cgraph_node::verify_node): Check correctness of IPA_REF_CHKP
      	references and instrumentation thunks.
      	(cgraph_can_remove_if_no_direct_calls_and_refs_p): Keep
      	all not instrumented instrumentation clones alive.
      	(cgraph_redirect_edge_call_stmt_to_callee): Support
      	returned bounds.
      	* cgraphbuild.c (rebuild_cgraph_edges): Rebuild IPA_REF_CHKP
      	reference.
      	(cgraph_rebuild_references): Likewise.
      	* cgraphunit.c: Include tree-chkp.h.
      	(assemble_thunks_and_aliases): Skip thunks calling instrumneted
      	function version.
      	(varpool_finalize_decl): Register statically initialized decls
      	in Pointer Bounds Checker.
      	(walk_polymorphic_call_targets): Do not mark generated call to
      	__builtin_unreachable as with_bounds.
      	(output_weakrefs): If there are both instrumented and original
      	versions, output only one of them.
      	(cgraph_node::expand_thunk): Set with_bounds flag
      	for created call statement.
      	* ipa-ref.h (ipa_ref_use): Add IPA_REF_CHKP.
      	(ipa_ref): increase size of use field.
      	* symtab.c (ipa_ref_use_name): Add element for IPA_REF_CHKP.
      	* varpool.c (dump_varpool_node): Dump need_bounds_init field.
      	(ctor_for_folding): Do not fold constant bounds vars.
      	* lto-streamer.h (LTO_minor_version): Change minor version from
      	0 to 1.
      	* lto-cgraph.c (compute_ltrans_boundary): Keep initial values for
      	pointer bounds.
      	(lto_output_node): Output instrumentation_clone,
      	thunk.add_pointer_bounds_args and orig_decl field.
      	(lto_output_ref): Adjust to new ipa_ref::use field size.
      	(input_overwrite_node): Read instrumentation_clone field.
      	(input_node): Read thunk.add_pointer_bounds_args and orig_decl
      	fields.
      	(input_ref): Adjust to new ipa_ref::use field size.
      	(input_cgraph_1): Compute instrumented_version fields and restore
      	IDENTIFIER_TRANSPARENT_ALIAS chains.
      	(lto_output_varpool_node): Output
      	need_bounds_init value.
      	(input_varpool_node): Read need_bounds_init value.
      	* lto-partition.c (add_symbol_to_partition_1): Keep original
      	and instrumented versions together.
      	(privatize_symbol_name): Restore transparent alias chain if required.
      	(add_references_to_partition): Add references to pointer bounds vars.
      	* dbxout.c (dbxout_type): Ignore POINTER_BOUNDS_TYPE.
      	* dwarf2out.c (gen_subprogram_die): Ignore bound args.
      	(gen_type_die_with_usage): Skip pointer bounds.
      	(dwarf2out_global_decl): Likewise.
      	(is_base_type): Support POINTER_BOUNDS_TYPE.
      	(gen_formal_types_die): Skip pointer bounds.
      	(gen_decl_die): Likewise.
      	* var-tracking.c (vt_add_function_parameters): Skip
      	bounds parameters.
      	* ipa-icf.c (sem_function::merge): Do not merge when instrumentation
      	thunk still exists.
      	(sem_variable::merge): Reset need_bounds_init flag.
      	* doc/extend.texi: Document Pointer Bounds Checker built-in functions
      	and attributes.
      	* doc/tm.texi.in (TARGET_LOAD_BOUNDS_FOR_ARG): New.
      	(TARGET_STORE_BOUNDS_FOR_ARG): New.
      	(TARGET_LOAD_RETURNED_BOUNDS): New.
      	(TARGET_STORE_RETURNED_BOUNDS): New.
      	(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
      	(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
      	(TARGET_BUILTIN_CHKP_FUNCTION): New.
      	(TARGET_CHKP_BOUND_TYPE): New.
      	(TARGET_CHKP_BOUND_MODE): New.
      	(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
      	(TARGET_CHKP_INITIALIZE_BOUNDS): New.
      	* doc/tm.texi: Regenerated.
      	* doc/rtl.texi (MODE_POINTER_BOUNDS): New.
      	(BND32mode): New.
      	(BND64mode): New.
      	* doc/invoke.texi (-mmpx): New.
      	(-mno-mpx): New.
      	(chkp-max-ctor-size): New.
      	* config/i386/constraints.md (w): New.
      	(Ti): New.
      	(Tb): New.
      	* config/i386/i386-c.c (ix86_target_macros_internal): Add __MPX__.
      	* config/i386/i386-modes.def (BND32): New.
      	(BND64): New.
      	* config/i386/i386-protos.h (ix86_bnd_prefixed_insn_p): New.
      	* config/i386/i386.c: Include tree-chkp.h, rtl-chkp.h, tree-iterator.h.
      	(regclass_map): Add bound registers.
      	(dbx_register_map): Likewise.
      	(dbx64_register_map): Likewise.
      	(svr4_dbx_register_map): Likewise.
      	(isa_opts): Add -mmpx.
      	(PTA_MPX): New.
      	(ix86_option_override_internal): Support MPX ISA.
      	(ix86_conditional_register_usage): Support bound registers.
      	(ix86_code_end): Add MPX bnd prefix.
      	(output_set_got): Likewise.
      	(print_reg): Avoid prefixes for bound registers.
      	(ix86_print_operand): Add '!' (MPX bnd) print prefix support.
      	(ix86_print_operand_punct_valid_p): Likewise.
      	(ix86_print_operand_address): Support UNSPEC_BNDMK_ADDR and
      	UNSPEC_BNDLDX_ADDR.
      	(ix86_output_call_insn): Add MPX bnd prefix to branch instructions.
      	(ix86_class_likely_spilled_p): Add bound regs support.
      	(ix86_hard_regno_mode_ok): Likewise.
      	(x86_order_regs_for_local_alloc): Likewise.
      	(ix86_bnd_prefixed_insn_p): New.
      	(ix86_builtins): Add
      	IX86_BUILTIN_BNDMK, IX86_BUILTIN_BNDSTX,
      	IX86_BUILTIN_BNDLDX, IX86_BUILTIN_BNDCL,
      	IX86_BUILTIN_BNDCU, IX86_BUILTIN_BNDRET,
      	IX86_BUILTIN_BNDNARROW, IX86_BUILTIN_BNDINT,
      	IX86_BUILTIN_SIZEOF, IX86_BUILTIN_BNDLOWER,
      	IX86_BUILTIN_BNDUPPER.
      	(builtin_isa): Add leaf_p and nothrow_p fields.
      	(def_builtin): Initialize leaf_p and nothrow_p.
      	(ix86_add_new_builtins): Handle leaf_p and nothrow_p
      	flags.
      	(bdesc_mpx): New.
      	(bdesc_mpx_const): New.
      	(ix86_init_mpx_builtins): New.
      	(ix86_init_builtins): Call ix86_init_mpx_builtins.
      	(ix86_emit_cmove): New.
      	(ix86_emit_move_max): New.
      	(ix86_expand_builtin): Expand IX86_BUILTIN_BNDMK,
      	IX86_BUILTIN_BNDSTX, IX86_BUILTIN_BNDLDX,
      	IX86_BUILTIN_BNDCL, IX86_BUILTIN_BNDCU,
      	IX86_BUILTIN_BNDRET, IX86_BUILTIN_BNDNARROW,
      	IX86_BUILTIN_BNDINT, IX86_BUILTIN_SIZEOF,
      	IX86_BUILTIN_BNDLOWER, IX86_BUILTIN_BNDUPPER.
      	(ix86_function_value_bounds): New.
      	(ix86_builtin_mpx_function): New.
      	(ix86_get_arg_address_for_bt): New.
      	(ix86_load_bounds): New.
      	(ix86_store_bounds): New.
      	(ix86_load_returned_bounds): New.
      	(ix86_store_returned_bounds): New.
      	(ix86_mpx_bound_mode): New.
      	(ix86_make_bounds_constant): New.
      	(ix86_initialize_bounds):
      	(TARGET_LOAD_BOUNDS_FOR_ARG): New.
      	(TARGET_STORE_BOUNDS_FOR_ARG): New.
      	(TARGET_LOAD_RETURNED_BOUNDS): New.
      	(TARGET_STORE_RETURNED_BOUNDS): New.
      	(TARGET_CHKP_BOUND_MODE): New.
      	(TARGET_BUILTIN_CHKP_FUNCTION): New.
      	(TARGET_CHKP_FUNCTION_VALUE_BOUNDS): New.
      	(TARGET_CHKP_MAKE_BOUNDS_CONSTANT): New.
      	(TARGET_CHKP_INITIALIZE_BOUNDS): New.
      	(ix86_option_override_internal): Do not
      	support x32 with MPX.
      	(init_cumulative_args): Init stdarg, bnd_regno, bnds_in_bt
      	and force_bnd_pass.
      	(function_arg_advance_32): Return number of used integer
      	registers.
      	(function_arg_advance_64): Likewise.
      	(function_arg_advance_ms_64): Likewise.
      	(ix86_function_arg_advance): Handle pointer bounds.
      	(ix86_function_arg): Likewise.
      	(ix86_function_value_regno_p): Mark fisrt bounds registers as
      	possible function value.
      	(ix86_function_value_1): Handle pointer bounds type/mode
      	(ix86_return_in_memory): Likewise.
      	(ix86_print_operand): Analyse insn to decide abounf "bnd" prefix.
      	(ix86_expand_call): Generate returned bounds.
      	(ix86_setup_incoming_vararg_bounds): New.
      	(ix86_va_start): Initialize bounds for pointers in va_list.
      	(TARGET_SETUP_INCOMING_VARARG_BOUNDS): New.
      	* config/i386/i386.h (TARGET_MPX): New.
      	(TARGET_MPX_P): New.
      	(FIRST_PSEUDO_REGISTER): Fix to new value.
      	(FIXED_REGISTERS): Add bound registers.
      	(CALL_USED_REGISTERS): Likewise.
      	(REG_ALLOC_ORDER): Likewise.
      	(HARD_REGNO_NREGS): Likewise.
      	(VALID_BND_REG_MODE): New.
      	(FIRST_BND_REG): New.
      	(LAST_BND_REG): New.
      	(reg_class): Add BND_REGS.
      	(REG_CLASS_NAMES): Likewise.
      	(REG_CLASS_CONTENTS): Likewise.
      	(BND_REGNO_P): New.
      	(ANY_BND_REG_P): New.
      	(BNDmode): New.
      	(HI_REGISTER_NAMES): Add bound registers.
      	(ix86_args): Add bnd_regno, bnds_in_bt,	force_bnd_pass and
      	stdarg fields.
      	* config/i386/i386.md (UNSPEC_BNDMK): New.
      	(UNSPEC_BNDMK_ADDR): New.
      	(UNSPEC_BNDSTX): New.
      	(UNSPEC_BNDLDX): New.
      	(UNSPEC_BNDLDX_ADDR): New.
      	(UNSPEC_BNDCL): New.
      	(UNSPEC_BNDCU): New.
      	(UNSPEC_BNDCN): New.
      	(UNSPEC_MPX_FENCE): New.
      	(UNSPEC_SIZEOF): New.
      	(BND0_REG): New.
      	(BND1_REG): New.
      	(type): Add mpxmov, mpxmk, mpxchk, mpxld, mpxst.
      	(length_immediate): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
      	(prefix_rep): Check for bnd prefix.
      	(prefix_0f): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
      	(length_nobnd): New.
      	(length): Use length_nobnd when specified.
      	(memory): Support mpxmov, mpxmk, mpxchk, mpxld, mpxst.
      	(BND): New.
      	(bnd_ptr): New.
      	(BNDCHECK): New.
      	(bndcheck): New.
      	(*jcc_1): Add MPX bnd prefix.
      	(*jcc_2): Likewise.
      	(jump): Likewise.
      	(*indirect_jump): Likewise.
      	(*tablejump_1): Likewise.
      	(simple_return_internal): Likewise.
      	(simple_return_internal_long): Likewise.
      	(simple_return_pop_internal): Likewise.
      	(simple_return_indirect_internal): Likewise.
      	(<mode>_mk): New.
      	(*<mode>_mk): New.
      	(mov<mode>): New.
      	(*mov<mode>_internal_mpx): New.
      	(<mode>_<bndcheck>): New.
      	(*<mode>_<bndcheck>): New.
      	(<mode>_ldx): New.
      	(*<mode>_ldx): New.
      	(<mode>_stx): New.
      	(*<mode>_stx): New.
      	move_size_reloc_<mode>): New.
      	* config/i386/predicates.md (address_mpx_no_base_operand): New.
      	(address_mpx_no_index_operand): New.
      	(bnd_mem_operator): New.
      	(symbol_operand): New.
      	(x86_64_immediate_size_operand): New.
      	* config/i386/i386.opt (mmpx): New.
      	* config/i386/i386-builtin-types.def (BND): New.
      	(ULONG): New.
      	(BND_FTYPE_PCVOID_ULONG): New.
      	(VOID_FTYPE_BND_PCVOID): New.
      	(VOID_FTYPE_PCVOID_PCVOID_BND): New.
      	(BND_FTYPE_PCVOID_PCVOID): New.
      	(BND_FTYPE_PCVOID): New.
      	(BND_FTYPE_BND_BND): New.
      	(PVOID_FTYPE_PVOID_PVOID_ULONG): New.
      	(PVOID_FTYPE_PCVOID_BND_ULONG): New.
      	(ULONG_FTYPE_VOID): New.
      	(PVOID_FTYPE_BND): New.
      
      gcc/testsuite/
      
      2014-11-05  Ilya Enkovich  <ilya.enkovich@intel.com>
      
      	* gcc.target/i386/chkp-builtins-1.c: New.
      	* gcc.target/i386/chkp-builtins-2.c: New.
      	* gcc.target/i386/chkp-builtins-3.c: New.
      	* gcc.target/i386/chkp-builtins-4.c: New.
      	* gcc.target/i386/chkp-remove-bndint-1.c: New.
      	* gcc.target/i386/chkp-remove-bndint-2.c: New.
      	* gcc.target/i386/chkp-const-check-1.c: New.
      	* gcc.target/i386/chkp-const-check-2.c: New.
      	* gcc.target/i386/chkp-lifetime-1.c: New.
      	* gcc.dg/pr37858.c: Replace early_local_cleanups pass name
      	with build_ssa_passes.
      
      From-SVN: r217125
      Ilya Enkovich committed
  21. 28 Oct, 2014 1 commit
    • cgraph.h: Flatten. · c582198b
      	* cgraph.h: Flatten.  Remove all include files.
      	(symbol_table::initialize): Move to cgraph.c.
      	* cgraph.c: Adjust include files.
      	(symbol_table::initialize): Relocate from cgraph.h.
      	* gengtype.c (open_base_files): Adjust include files.
      	* gccplugin.h: Add hash-map.h, is-a.h, plugin-api.h, and ipa-ref.h to
      	included files.
      	* ipa-inline.h: Remove all include files.
      	* ipa-prop.h: Ditto.
      	* ipa-reference.h: Ditto.
      	* ipa-utils.h: Ditto:
      	* lto-streamer.h: Remove cgraph.h from include list.
      	* asan.c: Adjust include files.
      	* auto-profile.c: Ditto.
      	* bb-reorder.c: Ditto.
      	* calls.c: Ditto.
      	* cfgexpand.c: Ditto.
      	* cgraphbuild.c: Ditto.
      	* cgraphclones.c: Ditto.
      	* cgraphunit.c: Ditto.
      	* combine.c: Ditto.
      	* coverage.c: Ditto.
      	* data-streamer.c: Ditto.
      	* data-streamer-in.c: Ditto.
      	* data-streamer-out.c: Ditto.
      	* dbxout.c: Ditto.
      	* dwarf2out.c: Ditto.
      	* except.c: Ditto.
      	* expr.c: Ditto.
      	* final.c: Ditto.
      	* fold-const.c: Ditto.
      	* ggc-page.c: Ditto.
      	* gimple-fold.c: Ditto.
      	* gimple-iterator.c: Ditto.
      	* gimple-pretty-print.c: Ditto.
      	* gimple-streamer-in.c: Ditto.
      	* gimple-streamer-out.c: Ditto.
      	* gimplify.c: Ditto.
      	* ipa.c: Ditto.
      	* ipa-comdats.c: Ditto.
      	* ipa-cp.c: Ditto.
      	* ipa-devirt.c: Ditto.
      	* ipa-icf.c: Ditto.
      	* ipa-icf-gimple.c: Ditto.
      	* ipa-inline-analysis.c: Ditto.
      	* ipa-inline.c: Ditto.
      	* ipa-inline-transform.c: Ditto.
      	* ipa-polymorphic-call.c: Ditto.
      	* ipa-profile.c: Ditto.
      	* ipa-prop.c: Ditto.
      	* ipa-pure-const.c: Ditto.
      	* ipa-ref.c: Ditto.
      	* ipa-reference.c: Ditto.
      	* ipa-split.c: Ditto.
      	* ipa-utils.c: Ditto.
      	* ipa-visibility.c: Ditto.
      	* langhooks.c: Ditto.
      	* lto-cgraph.c: Ditto.
      	* lto-compress.c: Ditto.
      	* lto-opts.c: Ditto.
      	* lto-section-in.c: Ditto.
      	* lto-section-out.c: Ditto.
      	* lto-streamer.c: Ditto.
      	* lto-streamer-in.c: Ditto.
      	* lto-streamer-out.c: Ditto.
      	* omp-low.c: Ditto.
      	* opts-global.c: Ditto.
      	* passes.c: Ditto.
      	* predict.c: Ditto.
      	* print-tree.c: Ditto.
      	* profile.c: Ditto.
      	* ree.c: Ditto.
      	* stor-layout.c: Ditto.
      	* symtab.c: Ditto.
      	* toplev.c: Ditto.
      	* trans-mem.c: Ditto.
      	* tree.c: Ditto.
      	* tree-cfg.c: Ditto.
      	* tree-eh.c: Ditto.
      	* tree-emutls.c: Ditto.
      	* tree-inline.c: Ditto.
      	* tree-nested.c: Ditto.
      	* tree-pretty-print.c: Ditto.
      	* tree-profile.c: Ditto.
      	* tree-sra.c: Ditto.
      	* tree-ssa-alias.c: Ditto.
      	* tree-ssa-loop-ivcanon.c: Ditto.
      	* tree-ssa-loop-ivopts.c: Ditto.
      	* tree-ssa-pre.c: Ditto.
      	* tree-ssa-structalias.c: Ditto.
      	* tree-streamer.c: Ditto.
      	* tree-streamer-in.c: Ditto.
      	* tree-streamer-out.c: Ditto.
      	* tree-switch-conversion.c: Ditto.
      	* tree-tailcall.c: Ditto.
      	* tree-vect-data-refs.c: Ditto.
      	* tree-vectorizer.c: Ditto.
      	* tree-vect-stmts.c: Ditto.
      	* tsan.c: Ditto.
      	* ubsan.c: Ditto.
      	* value-prof.c: Ditto.
      	* varasm.c: Ditto.
      	* varpool.c: Ditto.
      	* config/arm/arm.c: Ditto.
      	* config/bfin/bfin.c: Ditto.
      	* config/c6x/c6x.c: Ditto.
      	* config/cris/cris.c: Ditto.
      	* config/darwin.c: Ditto.
      	* config/darwin-c.c: Ditto.
      	* config/i386/i386.c: Ditto.
      	* config/i386/winnt.c: Ditto.
      	* config/microblaze/microblaze.c: Ditto.
      	* config/mips/mips.c: Ditto.
      	* config/rs6000/rs6000.c: Ditto.
      	* config/rx/rx.c: Ditto.
      
      	* ada/gcc-interface/trans.c: Adjust include files.
      	* ada/gcc-interface/utils.c: Ditto.
      
      	* c/c-decl.c: Adjust include files.
      	* c/c-parser.c: Ditto.
      
      	* c-family/c-common.c: Adjust include files.
      	* c-family/c-gimplify.c: Ditto.
      	* c-family/cilk.c: Ditto.
      	* c-family/c-pragma.c: Ditto.
      	* c-family/c-ubsan.c: Ditto.
      
      	* cp/call.c: Adjust include files.
      	* cp/class.c: Ditto.
      	* cp/decl2.c: Ditto.
      	* cp/decl.c: Ditto.
      	* cp/lambda.c: Ditto.
      	* cp/mangle.c: Ditto.
      	* cp/method.c: Ditto.
      	* cp/optimize.c: Ditto.
      	* cp/parser.c: Ditto.
      	* cp/semantics.c: Ditto.
      	* cp/tree.c: Ditto.
      	* cp/vtable-class-hierarchy.c: Ditto.
      
      	* fortran/f95-lang.c: Adjust include files.
      	* fortran/trans-decl.c: Ditto.
      
      	* go/go-gcc.cc: Adjust include files.
      
      	* java/class.c: Adjust include files.
      	* java/decl.c: Ditto.
      	* java/jcf-parse.c: Ditto.
      	* java/resource.c: Ditto.
      
      	* lto/lto.c: Adjust include files.
      	* lto/lto-lang.c: Ditto.
      	* lto/lto-object.c: Ditto.
      	* lto/lto-partition.c: Ditto.
      	* lto/lto-symtab.c: Ditto.
      
      	* objc/objc-act.c: Adjust include files.
      
      From-SVN: r216805
      Andrew MacLeod committed
  22. 27 Oct, 2014 1 commit
    • ggcplug.c: Shuffle includes to include gcc-plugin.h earlier. · 60393bbc
      2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
      
      	* testsuite/gcc.dg/plugin/ggcplug.c: Shuffle includes to include
      	gcc-plugin.h earlier.
      
      2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
      
      	* c/c-typeck.c: Adjust include files.
      
      2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
      
      	* c-family/c-gimplify.c: Adjust include files.
      
      2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
      
      	* cp/cp-gimplify.c: Adjust include files.
      
      2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
      
      	* go/go-gcc.cc: Adjust include files.
      	* go/go-lang.c: Ditto.
      
      2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
      
      	* java/java-gimplify.c: Adjust include files.
      
      2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
      
      	* lto/lto-lang.c: Adjust include files.
      	* lto/lto-object.c: Ditto.
      	* lto/lto-partition.c: Ditto.
      	* lto/lto-symtab.c: Ditto.
      	* lto/lto.c: Ditto.
      
      2014-10-27  Andrew MacLeod  <amacleod@redhat.com>
      
      	* basic-block.h: Remove all includes.
      	(enum profile_status_d, struct control_flow_graph): Move to cfg.h
      	* cfg.h (profile_status_d, struct control_flow_graph): Relocate here.
      	* Makefile.in (GTFILES): Add cfg.h to list.
      	* cgraph.h (symbol_table::create_empty): Move to cgraph.c.
      	* cgraph.c (symbol_table::create_empty): Relocate from cgraph.h.
      	* genconditions.c (write_header): Add predict.h and basic-block.h to
      	lits of includes.
      	* genemit.c (main): Ditto.
      	* genpreds.c (write_insn_preds_c): Ditto.
      	* genrecog.c (write_header): Ditto.
      	* gengtype.c (open_base_files): Add predict.h, basic-block.h, and cfg.h
      	to list of includes.
      	* alias.c: Adjust include files.
      	* asan.c: Ditto.
      	* auto-inc-dec.c: Ditto.
      	* auto-profile.c: Ditto.
      	* bb-reorder.c: Ditto.
      	* bt-load.c: Ditto.
      	* builtins.c: Ditto.
      	* caller-save.c: Ditto.
      	* calls.c: Ditto.
      	* cfg.c: Ditto.
      	* cfganal.c: Ditto.
      	* cfgbuild.c: Ditto.
      	* cfgcleanup.c: Ditto.
      	* cfgexpand.c: Ditto.
      	* cfghooks.c: Ditto.
      	* cfgloop.c: Ditto.
      	* cfgloopanal.c: Ditto.
      	* cfgloopmanip.c: Ditto.
      	* cfgrtl.c: Ditto.
      	* cgraphbuild.c: Ditto.
      	* cgraphclones.c: Ditto.
      	* cgraphunit.c: Ditto.
      	* combine-stack-adj.c: Ditto.
      	* combine.c: Ditto.
      	* compare-elim.c: Ditto.
      	* coverage.c: Ditto.
      	* cprop.c: Ditto.
      	* cse.c: Ditto.
      	* cselib.c: Ditto.
      	* data-streamer-in.c: Ditto.
      	* data-streamer-out.c: Ditto.
      	* data-streamer.c: Ditto.
      	* dce.c: Ditto.
      	* ddg.c: Ditto.
      	* ddg.h: Ditto.
      	* df-core.c: Ditto.
      	* df-problems.c: Ditto.
      	* df-scan.c: Ditto.
      	* df.h: Ditto.
      	* dojump.c: Ditto.
      	* dominance.c: Ditto.
      	* domwalk.c: Ditto.
      	* dse.c: Ditto.
      	* dwarf2cfi.c: Ditto.
      	* emit-rtl.c: Ditto.
      	* et-forest.c: Ditto.
      	* except.c: Ditto.
      	* expmed.c: Ditto.
      	* expr.c: Ditto.
      	* final.c: Ditto.
      	* fold-const.c: Ditto.
      	* function.c: Ditto.
      	* fwprop.c: Ditto.
      	* gcc-plugin.h: Ditto.
      	* gcse.c: Ditto.
      	* generic-match-head.c: Ditto.
      	* ggc-page.c: Ditto.
      	* gimple-builder.c: Ditto.
      	* gimple-expr.c: Ditto.
      	* gimple-fold.c: Ditto.
      	* gimple-iterator.c: Ditto.
      	* gimple-low.c: Ditto.
      	* gimple-match-head.c: Ditto.
      	* gimple-pretty-print.c: Ditto.
      	* gimple-ssa-isolate-paths.c: Ditto.
      	* gimple-ssa-strength-reduction.c: Ditto.
      	* gimple-streamer-in.c: Ditto.
      	* gimple-streamer-out.c: Ditto.
      	* gimple-streamer.h: Ditto.
      	* gimple-walk.c: Ditto.
      	* gimple.c: Ditto.
      	* gimplify-me.c: Ditto.
      	* gimplify.c: Ditto.
      	* graph.c: Ditto.
      	* graphite-blocking.c: Ditto.
      	* graphite-clast-to-gimple.c: Ditto.
      	* graphite-dependences.c: Ditto.
      	* graphite-interchange.c: Ditto.
      	* graphite-isl-ast-to-gimple.c: Ditto.
      	* graphite-optimize-isl.c: Ditto.
      	* graphite-poly.c: Ditto.
      	* graphite-scop-detection.c: Ditto.
      	* graphite-sese-to-poly.c: Ditto.
      	* graphite.c: Ditto.
      	* haifa-sched.c: Ditto.
      	* hw-doloop.c: Ditto.
      	* ifcvt.c: Ditto.
      	* init-regs.c: Ditto.
      	* internal-fn.c: Ditto.
      	* ipa-cp.c: Ditto.
      	* ipa-devirt.c: Ditto.
      	* ipa-icf-gimple.c: Ditto.
      	* ipa-icf.c: Ditto.
      	* ipa-inline-analysis.c: Ditto.
      	* ipa-inline.c: Ditto.
      	* ipa-polymorphic-call.c: Ditto.
      	* ipa-profile.c: Ditto.
      	* ipa-prop.c: Ditto.
      	* ipa-pure-const.c: Ditto.
      	* ipa-reference.c: Ditto.
      	* ipa-split.c: Ditto.
      	* ipa-utils.c: Ditto.
      	* ipa.c: Ditto.
      	* ira-build.c: Ditto.
      	* ira-color.c: Ditto.
      	* ira-conflicts.c: Ditto.
      	* ira-costs.c: Ditto.
      	* ira-emit.c: Ditto.
      	* ira-lives.c: Ditto.
      	* ira.c: Ditto.
      	* jump.c: Ditto.
      	* lcm.c: Ditto.
      	* loop-doloop.c: Ditto.
      	* loop-init.c: Ditto.
      	* loop-invariant.c: Ditto.
      	* loop-iv.c: Ditto.
      	* loop-unroll.c: Ditto.
      	* lower-subreg.c: Ditto.
      	* lra-assigns.c: Ditto.
      	* lra-coalesce.c: Ditto.
      	* lra-constraints.c: Ditto.
      	* lra-eliminations.c: Ditto.
      	* lra-lives.c: Ditto.
      	* lra-spills.c: Ditto.
      	* lra.c: Ditto.
      	* lto-cgraph.c: Ditto.
      	* lto-compress.c: Ditto.
      	* lto-opts.c: Ditto.
      	* lto-section-in.c: Ditto.
      	* lto-section-out.c: Ditto.
      	* lto-streamer-in.c: Ditto.
      	* lto-streamer-out.c: Ditto.
      	* lto-streamer.c: Ditto.
      	* mcf.c: Ditto.
      	* mode-switching.c: Ditto.
      	* modulo-sched.c: Ditto.
      	* omp-low.c: Ditto.
      	* optabs.c: Ditto.
      	* opts-global.c: Ditto.
      	* passes.c: Ditto.
      	* postreload-gcse.c: Ditto.
      	* postreload.c: Ditto.
      	* predict.c: Ditto.
      	* print-rtl.c: Ditto.
      	* profile.c: Ditto.
      	* recog.c: Ditto.
      	* ree.c: Ditto.
      	* reg-stack.c: Ditto.
      	* regcprop.c: Ditto.
      	* regcprop.h: Ditto.
      	* reginfo.c: Ditto.
      	* regrename.c: Ditto.
      	* regstat.c: Ditto.
      	* reload.c: Ditto.
      	* reload1.c: Ditto.
      	* reorg.c: Ditto.
      	* resource.c: Ditto.
      	* rtlanal.c: Ditto.
      	* sched-deps.c: Ditto.
      	* sched-ebb.c: Ditto.
      	* sched-int.h: Ditto.
      	* sched-rgn.c: Ditto.
      	* sched-vis.c: Ditto.
      	* sel-sched-dump.c: Ditto.
      	* sel-sched-ir.c: Ditto.
      	* sel-sched-ir.h: Ditto.
      	* sel-sched.c: Ditto.
      	* sese.c: Ditto.
      	* shrink-wrap.c: Ditto.
      	* stack-ptr-mod.c: Ditto.
      	* stmt.c: Ditto.
      	* store-motion.c: Ditto.
      	* symtab.c: Ditto.
      	* toplev.c: Ditto.
      	* tracer.c: Ditto.
      	* trans-mem.c: Ditto.
      	* tree-affine.c: Ditto.
      	* tree-call-cdce.c: Ditto.
      	* tree-cfg.c: Ditto.
      	* tree-cfgcleanup.c: Ditto.
      	* tree-chrec.c: Ditto.
      	* tree-complex.c: Ditto.
      	* tree-data-ref.c: Ditto.
      	* tree-dfa.c: Ditto.
      	* tree-eh.c: Ditto.
      	* tree-emutls.c: Ditto.
      	* tree-if-conv.c: Ditto.
      	* tree-inline.c: Ditto.
      	* tree-into-ssa.c: Ditto.
      	* tree-loop-distribution.c: Ditto.
      	* tree-nested.c: Ditto.
      	* tree-nrv.c: Ditto.
      	* tree-object-size.c: Ditto.
      	* tree-outof-ssa.c: Ditto.
      	* tree-parloops.c: Ditto.
      	* tree-phinodes.c: Ditto.
      	* tree-predcom.c: Ditto.
      	* tree-pretty-print.c: Ditto.
      	* tree-profile.c: Ditto.
      	* tree-scalar-evolution.c: Ditto.
      	* tree-sra.c: Ditto.
      	* tree-ssa-address.c: Ditto.
      	* tree-ssa-alias.c: Ditto.
      	* tree-ssa-ccp.c: Ditto.
      	* tree-ssa-coalesce.c: Ditto.
      	* tree-ssa-copy.c: Ditto.
      	* tree-ssa-copyrename.c: Ditto.
      	* tree-ssa-dce.c: Ditto.
      	* tree-ssa-dom.c: Ditto.
      	* tree-ssa-dse.c: Ditto.
      	* tree-ssa-forwprop.c: Ditto.
      	* tree-ssa-ifcombine.c: Ditto.
      	* tree-ssa-live.c: Ditto.
      	* tree-ssa-loop-ch.c: Ditto.
      	* tree-ssa-loop-im.c: Ditto.
      	* tree-ssa-loop-ivcanon.c: Ditto.
      	* tree-ssa-loop-ivopts.c: Ditto.
      	* tree-ssa-loop-manip.c: Ditto.
      	* tree-ssa-loop-niter.c: Ditto.
      	* tree-ssa-loop-prefetch.c: Ditto.
      	* tree-ssa-loop-unswitch.c: Ditto.
      	* tree-ssa-loop.c: Ditto.
      	* tree-ssa-math-opts.c: Ditto.
      	* tree-ssa-operands.c: Ditto.
      	* tree-ssa-phiopt.c: Ditto.
      	* tree-ssa-phiprop.c: Ditto.
      	* tree-ssa-pre.c: Ditto.
      	* tree-ssa-propagate.c: Ditto.
      	* tree-ssa-reassoc.c: Ditto.
      	* tree-ssa-sccvn.c: Ditto.
      	* tree-ssa-sink.c: Ditto.
      	* tree-ssa-strlen.c: Ditto.
      	* tree-ssa-structalias.c: Ditto.
      	* tree-ssa-tail-merge.c: Ditto.
      	* tree-ssa-ter.c: Ditto.
      	* tree-ssa-threadedge.c: Ditto.
      	* tree-ssa-threadupdate.c: Ditto.
      	* tree-ssa-uncprop.c: Ditto.
      	* tree-ssa-uninit.c: Ditto.
      	* tree-ssa.c: Ditto.
      	* tree-ssanames.c: Ditto.
      	* tree-stdarg.c: Ditto.
      	* tree-streamer-in.c: Ditto.
      	* tree-streamer-out.c: Ditto.
      	* tree-streamer.c: Ditto.
      	* tree-switch-conversion.c: Ditto.
      	* tree-tailcall.c: Ditto.
      	* tree-vect-data-refs.c: Ditto.
      	* tree-vect-generic.c: Ditto.
      	* tree-vect-loop-manip.c: Ditto.
      	* tree-vect-loop.c: Ditto.
      	* tree-vect-patterns.c: Ditto.
      	* tree-vect-slp.c: Ditto.
      	* tree-vect-stmts.c: Ditto.
      	* tree-vectorizer.c: Ditto.
      	* tree-vrp.c: Ditto.
      	* tree.c: Ditto.
      	* tsan.c: Ditto.
      	* ubsan.c: Ditto.
      	* valtrack.c: Ditto.
      	* valtrack.h: Ditto.
      	* value-prof.c: Ditto.
      	* var-tracking.c: Ditto.
      	* varasm.c: Ditto.
      	* varpool.c: Ditto.
      	* vtable-verify.c: Ditto.
      	* web.c: Ditto.
      	* config/aarch64/aarch64-builtins.c: Ditto.
      	* config/aarch64/aarch64.c: Ditto.
      	* config/alpha/alpha.c: Ditto.
      	* config/arc/arc.c: Ditto.
      	* config/arm/arm.c: Ditto.
      	* config/avr/avr.c: Ditto.
      	* config/bfin/bfin.c: Ditto.
      	* config/c6x/c6x.c: Ditto.
      	* config/cr16/cr16.c: Ditto.
      	* config/cris/cris.c: Ditto.
      	* config/darwin-c.c: Ditto.
      	* config/darwin.c: Ditto.
      	* config/epiphany/epiphany.c: Ditto.
      	* config/epiphany/mode-switch-use.c: Ditto.
      	* config/epiphany/resolve-sw-modes.c: Ditto.
      	* config/fr30/fr30.c: Ditto.
      	* config/frv/frv.c: Ditto.
      	* config/h8300/h8300.c: Ditto.
      	* config/i386/i386.c: Ditto.
      	* config/i386/winnt.c: Ditto.
      	* config/ia64/ia64.c: Ditto.
      	* config/iq2000/iq2000.c: Ditto.
      	* config/lm32/lm32.c: Ditto.
      	* config/m32c/m32c.c: Ditto.
      	* config/m32r/m32r.c: Ditto.
      	* config/m68k/m68k.c: Ditto.
      	* config/mcore/mcore.c: Ditto.
      	* config/mep/mep.c: Ditto.
      	* config/microblaze/microblaze.c: Ditto.
      	* config/mips/mips.c: Ditto.
      	* config/mmix/mmix.c: Ditto.
      	* config/mn10300/mn10300.c: Ditto.
      	* config/moxie/moxie.c: Ditto.
      	* config/msp430/msp430.c: Ditto.
      	* config/nds32/nds32-cost.c: Ditto.
      	* config/nds32/nds32-fp-as-gp.c: Ditto.
      	* config/nds32/nds32-intrinsic.c: Ditto.
      	* config/nds32/nds32-isr.c: Ditto.
      	* config/nds32/nds32-md-auxiliary.c: Ditto.
      	* config/nds32/nds32-memory-manipulation.c: Ditto.
      	* config/nds32/nds32-pipelines-auxiliary.c: Ditto.
      	* config/nds32/nds32-predicates.c: Ditto.
      	* config/nds32/nds32.c: Ditto.
      	* config/nios2/nios2.c: Ditto.
      	* config/pa/pa.c: Ditto.
      	* config/pdp11/pdp11.c: Ditto.
      	* config/rl78/rl78.c: Ditto.
      	* config/rs6000/rs6000.c: Ditto.
      	* config/rx/rx.c: Ditto.
      	* config/s390/s390.c: Ditto.
      	* config/sh/sh-mem.cc: Ditto.
      	* config/sh/sh.c: Ditto.
      	* config/sh/sh_optimize_sett_clrt.cc: Ditto.
      	* config/sh/sh_treg_combine.cc: Ditto.
      	* config/sparc/sparc.c: Ditto.
      	* config/spu/spu.c: Ditto.
      	* config/stormy16/stormy16.c: Ditto.
      	* config/tilegx/tilegx.c: Ditto.
      	* config/tilepro/tilepro.c: Ditto.
      	* config/v850/v850.c: Ditto.
      	* config/vax/vax.c: Ditto.
      	* config/xtensa/xtensa.c: Ditto.
      
      From-SVN: r216735
      Andrew MacLeod committed
  23. 22 Oct, 2014 1 commit
    • cfgbuild.h: New. · 893479de
      
      2014-10-22  Andrew MacLeod  <amacleod@redhat.com>
      
      	* cfgbuild.h: New.  Add prototypes for cfgbuild.c.
      	* cfgcleanup.h: New.  Add prototypes for cfgcleanup.c.
      	* cfgloopmanip.h: New.  Add prototypes for cfgloopmanip.c.
      	* dominance.h: New.  Add prototypes for dominance.c.
      	* cfgloop.h: Move some prototypes/enum to cfgloopmanip.h and include it.
      	* cfghooks.h: (struct profile_record) Relocate here.
      	Relocate 2 prototypes from basic-block.h.
      	* basic-block.h: Move prototypes and struct to new header files.
      	Include cfgbuild.h, cfgcleanup.h, and dominance.h.
      	* rtl.h: Move a few prototypes to new header files.
      	* cfgcleanup.c (merge_memattrs): Make static.
      	* genopinit.c (main): Add predict.h to list of includes.
      	* predict.h: Update prototype list to match predict.c.
      	* predict.c (maybe_hot_count_p): Export.
      	(cgraph_edge::maybe_hot_p): Move to cgraph.c.
      	(cgraph_node::optimize_for_size_p): Move to cgraph.h.
      	* cgraph.h (cgraph_node::optimize_for_size_p): Relocate here.
      	* cgraph.c (cgraph_edge::maybe_hot_p): Relocate here.
      	* profile.h: Adjust prototypes.
      	* ifcvt.h: New.  Relocate struct ce_if_block here.
      	* ifcvt.c: Include ifcvt.h.
      
      	* config/frv/frv.c: Include ifcvt.h.
      	* config/frv/frv-protos.h: Add 'struct' to ce_if_block * parameters.
      
      From-SVN: r216559
      Andrew MacLeod committed
  24. 21 Oct, 2014 1 commit
    • State cleanups from jit branch · 3edf64aa
      gcc/ChangeLog:
      	* cgraph.c (cgraph_c_finalize): New function.
      	* cgraph.h (cgraph_c_finalize): New prototype.
      	(cgraphunit_c_finalize): New prototype.
      	* cgraphunit.c (first_analyzed): Move from analyze_functions
      	to file-scope.
      	(first_analyzed_var): Likewise.
      	(analyze_functions): Move static variables into file-scope.
      	(cgraphunit_c_finalize): New function.
      	* diagnostic.c (diagnostic_finish): Free the memory for
      	context->classify_diagnostic and context->printer, running the
      	destructor for the latter.
      	(bt_stop): Use toplev::main.
      	* dwarf2out.c (dwarf2out_finalize): New function.
      	* dwarf2out.h (dwarf2out_c_finalize): New prototype.
      	* gcse.c (gcse_c_finalize): New function.
      	* gcse.h (gcse_c_finalize): New prototype.
      	* ggc-page.c (init_ggc): Make idempotent.
      	* input.c (input_location): Initialize to UNKNOWN_LOCATION.
      	* ipa-cp.c (ipa_cp_c_finalize): New function.
      	* ipa-prop.h (ipa_cp_c_finalize): New prototype.
      	* ipa-pure-const.c (function_insertion_hook_holder): Move to be
      	a field of class pass_ipa_pure_const.
      	(node_duplication_hook_holder): Likewise.
      	(node_removal_hook_holder): Likewise.
      	(register_hooks): Convert to method...
      	(pass_ipa_pure_const::register_hooks): ...here, converting
      	static variable init_p into...
      	(pass_ipa_pure_const::init_p): ...new field.
      	(pure_const_generate_summary): Update invocation of
      	register_hooks to invoke as a method of current_pass.
      	(pure_const_read_summary): Likewise.
      	(propagate): Convert to...
      	(pass_ipa_pure_const::execute): ...method.
      	* ipa-reference.c (ipa_init): Move static bool init_p from here
      	to...
      	(ipa_init_p): New file-scope variable, so that it can be reset
      	when repeatedly invoking the compiler within one process by...
      	(ipa_reference_c_finalize): New function.
      	* ipa-reference.h (ipa_reference_c_finalize): New.
      	* main.c (main): Replace invocation of toplev_main with
      	construction of a toplev instance, and call its "main" method.
      	* params.c (global_init_params): Add an assert that
      	params_finished is false.
      	(params_c_finalize): New.
      	* params.h (params_c_finalize): New.
      	* passes.c (execute_ipa_summary_passes): Set "current_pass" before
      	invoking generate_summary, for the benefit of pass_ipa_pure_const.
      	(ipa_write_summaries_2): Assign "pass" to "current_pass" global
      	before calling write_summary hook.
      	(ipa_write_optimization_summaries_1): Likewise when calling
      	write_optimization_summary hook.
      	(ipa_read_summaries_1): Likewise for read_summary hook.
      	(ipa_read_optimization_summaries_1): Likewise for
      	read_optimization_summary hook.
      	(execute_ipa_stmt_fixups): Likewise.
      	* stringpool.c (init_stringpool): Clean up if we're called more
      	than once.
      	* timevar.c (timevar_init): Ignore repeated calls.
      	* toplev.c: Include "dwarf2out.h", "ipa-reference.h", "gcse.h",
      	"ipa-prop.h".
      	(general_init): Reset "input_location" to UNKNOWN_LOCATION.
      	(initialize_rtl): Move static local "initialized_once"
      	into file scope, and rename to...
      	(rtl_initialized): New variable.
      	(do_compile): Move timevar initialization from here to
      	toplev::start_timevars.
      	(toplev::toplev, toplev::~toplev, toplev::start_timevars,
      	toplev::finalize): New functions.
      	(toplev_main): Rename to...
      	(toplev::main): ...this.
      	* toplev.h (class toplev): New class.
      
      From-SVN: r216522
      David Malcolm committed
  25. 16 Oct, 2014 2 commits
    • function.h: Flatten file. · 83685514
      2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
      
      	* function.h: Flatten file.  Remove includes, adjust prototypes to 
      	reflect only what is in function.h.
      	(enum direction, struct args_size, struct locate_and_pad_arg_data,
      	ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Relocate
      	from expr.h.
      	(ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD): Relocate from rtl.h.
      	(optimize_function_for_size_p, optimize_function_for_speed_p): Move
      	prototypes to predict.h.
      	(init_varasm_status): Move prototype to varasm.h.
      	* expr.h: Adjust include files.
      	(enum direction, struct args_size, struct locate_and_pad_arg_data,
      	ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Move
      	to function.h.
      	(locate_and_pad_parm): Move prototype to function.h.
      	* rtl.h: (assign_stack_local, ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD,
      	assign_stack_local_1, assign_stack_temp, assign_stack_temp_for_type,
      	assign_temp, reposition_prologue_and_epilogue_notes,
      	prologue_epilogue_contains, sibcall_epilogue_contains,
      	update_temp_slot_address, maybe_copy_prologue_epilogue_insn,
      	set_return_jump_label): Move prototypes to function.h.
      	* predict.h (optimize_function_for_size_p,
      	optimize_function_for_speed_p): Relocate prototypes from function.h.
      	* shrink-wrap.h (emit_return_into_block, active_insn_between,
      	convert_jumps_to_returns, emit_return_for_exit): Move prototypes to
      	function.h.
      	* varasm.h (init_varasm_status): Relocate prototype from function.h.
      	* genattrtab.c (write_header): Add predict.h to include list.
      	* genconditions.c (write_header): Add predict.h to include list.
      	* genemit.c (main): Adjust header file includes.
      	* gengtype.c (ifiles): Add flattened function.h header files.
      	* genoutput.c (output_prologue): Add predict.h to include list.
      	* genpreds.c (write_insn_preds_c): Adjust header file includes.
      	* genrecog.c (write_header): Add flattened function.h header files.
      	* alias.c: Adjust include files.
      	* auto-inc-dec.c: Likewise.
      	* basic-block.h: Likewise.
      	* bb-reorder.c: Likewise.
      	* bt-load.c: Likewise.
      	* builtins.c: Likewise.
      	* caller-save.c: Likewise.
      	* calls.c: Likewise.
      	* cfgbuild.c: Likewise.
      	* cfgcleanup.c: Likewise.
      	* cfgexpand.c: Likewise.
      	* cfgloop.c: Likewise.
      	* cfgloop.h: Likewise.
      	* cfgrtl.c: Likewise.
      	* cgraph.h: Likewise.
      	* cgraphclones.c: Likewise.
      	* cgraphunit.c: Likewise.
      	* combine-stack-adj.c: Likewise.
      	* combine.c: Likewise.
      	* coverage.c: Likewise.
      	* cprop.c: Likewise.
      	* cse.c: Likewise.
      	* cselib.c: Likewise.
      	* dbxout.c: Likewise.
      	* ddg.c: Likewise.
      	* df-core.c: Likewise.
      	* df-problems.c: Likewise.
      	* df-scan.c: Likewise.
      	* dojump.c: Likewise.
      	* dwarf2cfi.c: Likewise.
      	* dwarf2out.c: Likewise.
      	* emit-rtl.c: Likewise.
      	* except.c: Likewise.
      	* explow.c: Likewise.
      	* expr.c: Likewise.
      	* final.c: Likewise.
      	* function.c: Likewise.
      	* gcse.c: Likewise.
      	* gimple-fold.c: Likewise.
      	* gimple-low.c: Likewise.
      	* gimple-streamer.h: Likewise.
      	* haifa-sched.c: Likewise.
      	* ifcvt.c: Likewise.
      	* ira.c: Likewise.
      	* jump.c: Likewise.
      	* lcm.c: Likewise.
      	* loop-invariant.c: Likewise.
      	* lra-assigns.c: Likewise.
      	* lra-coalesce.c: Likewise.
      	* lra-constraints.c: Likewise.
      	* lra-eliminations.c: Likewise.
      	* lra-lives.c: Likewise.
      	* lra-spills.c: Likewise.
      	* lra.c: Likewise.
      	* lto-cgraph.c: Likewise.
      	* lto-section-in.c: Likewise.
      	* lto-section-out.c: Likewise.
      	* lto-streamer-in.c: Likewise.
      	* lto-streamer-out.c: Likewise.
      	* mode-switching.c: Likewise.
      	* modulo-sched.c: Likewise.
      	* omp-low.c: Likewise.
      	* optabs.c: Likewise.
      	* passes.c: Likewise.
      	* postreload-gcse.c: Likewise.
      	* postreload.c: Likewise.
      	* predict.c: Likewise.
      	* profile.c: Likewise.
      	* recog.c: Likewise.
      	* ree.c: Likewise.
      	* reg-stack.c: Likewise.
      	* regcprop.c: Likewise.
      	* reginfo.c: Likewise.
      	* regrename.c: Likewise.
      	* reload.c: Likewise.
      	* reload1.c: Likewise.
      	* reorg.c: Likewise.
      	* resource.c: Likewise.
      	* rtlanal.c: Likewise.
      	* sched-deps.c: Likewise.
      	* sched-ebb.c: Likewise.
      	* sched-rgn.c: Likewise.
      	* sel-sched-dump.c: Likewise.
      	* sel-sched-ir.c: Likewise.
      	* sel-sched.c: Likewise.
      	* shrink-wrap.c: Likewise.
      	* simplify-rtx.c: Likewise.
      	* statistics.c: Likewise.
      	* stmt.c: Likewise.
      	* stor-layout.c: Likewise.
      	* store-motion.c: Likewise.
      	* symtab.c: Likewise.
      	* targhooks.c: Likewise.
      	* toplev.c: Likewise.
      	* trans-mem.c: Likewise.
      	* tree-cfg.c: Likewise.
      	* tree-cfgcleanup.c: Likewise.
      	* tree-dfa.c: Likewise.
      	* tree-eh.c: Likewise.
      	* tree-inline.c: Likewise.
      	* tree-into-ssa.c: Likewise.
      	* tree-nested.c: Likewise.
      	* tree-nrv.c: Likewise.
      	* tree-profile.c: Likewise.
      	* tree-ssa-alias.c: Likewise.
      	* tree-ssa-ccp.c: Likewise.
      	* tree-ssa-copy.c: Likewise.
      	* tree-ssa-copyrename.c: Likewise.
      	* tree-ssa-dom.c: Likewise.
      	* tree-ssa-operands.c: Likewise.
      	* tree-ssa-propagate.c: Likewise.
      	* tree-ssa-structalias.c: Likewise.
      	* tree-ssa-tail-merge.c: Likewise.
      	* tree-ssa-threadedge.c: Likewise.
      	* tree-ssa-threadupdate.c: Likewise.
      	* tree-ssa-uncprop.c: Likewise.
      	* tree-ssa-uninit.c: Likewise.
      	* tree-ssa.c: Likewise.
      	* tree-stdarg.c: Likewise.
      	* tree-tailcall.c: Likewise.
      	* tree.c: Likewise.
      	* tsan.c: Likewise.
      	* valtrack.c: Likewise.
      	* varasm.c: Likewise.
      	* vmsdbgout.c: Likewise.
      	* web.c: Likewise.
      	* testsuite/g++.dg/plugin/pragma_plugin.c: Adjust include files.
      	* config/aarch64/aarch64.c: Add flattened includes from function.h.
      	* config/alpha/alpha.c: Likewise.
      	* config/arc/arc.c: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/avr/avr-log.c: Likewise.
      	* config/avr/avr.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/c6x/c6x.c: Likewise.
      	* config/cr16/cr16.c: Likewise.
      	* config/cris/cris.c: Likewise.
      	* config/darwin.c: Likewise.
      	* config/epiphany/epiphany.c: Likewise.
      	* config/epiphany/mode-switch-use.c: Likewise.
      	* config/epiphany/resolve-sw-modes.c: Likewise.
      	* config/fr30/fr30.c: Likewise.
      	* config/frv/frv.c: Likewise.
      	* config/h8300/h8300.c: Likewise.
      	* config/i386/i386.c: Likewise.
      	* config/ia64/ia64.c: Likewise.
      	* config/iq2000/iq2000.c: Likewise.
      	* config/lm32/lm32.c: Likewise.
      	* config/m32c/m32c.c: Likewise.
      	* config/m32r/m32r.c: Likewise.
      	* config/m68k/m68k.c: Likewise.
      	* config/mcore/mcore.c: Likewise.
      	* config/mep/mep-pragma.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/microblaze/microblaze.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/mmix/mmix.c: Likewise.
      	* config/mn10300/mn10300.c: Likewise.
      	* config/moxie/moxie.c: Likewise.
      	* config/msp430/msp430.c: Likewise.
      	* config/nds32/nds32-cost.c: Likewise.
      	* config/nds32/nds32-fp-as-gp.c: Likewise.
      	* config/nds32/nds32-intrinsic.c: Likewise.
      	* config/nds32/nds32-isr.c: Likewise.
      	* config/nds32/nds32-md-auxiliary.c: Likewise.
      	* config/nds32/nds32-memory-manipulation.c: Likewise.
      	* config/nds32/nds32-pipelines-auxiliary.c: Likewise.
      	* config/nds32/nds32-predicates.c: Likewise.
      	* config/nds32/nds32.c: Likewise.
      	* config/nios2/nios2.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/pdp11/pdp11.c: Likewise.
      	* config/rl78/rl78.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/rx/rx.c: Likewise.
      	* config/s390/s390.c: Likewise.
      	* config/score/score.c: Likewise.
      	* config/sh/sh.c: Likewise.
      	* config/sparc/sparc.c: Likewise.
      	* config/spu/spu.c: Likewise.
      	* config/stormy16/stormy16.c: Likewise.
      	* config/tilegx/tilegx.c: Likewise.
      	* config/tilepro/tilepro.c: Likewise.
      	* config/v850/v850.c: Likewise.
      	* config/vax/vax.c: Likewise.
      	* config/xtensa/xtensa.c: Likewise.
      
      
      2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
      
      	* ada/gcc-interface/misc.c: Adjust include files.
      
      2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
      
      	* c/c-decl.c: Adjust include files.
      
      2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
      
      	* c-family/c-pragma.c: Adjust include files.
      	* c-family/c-semantics.c: Likewise.
      
      2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
      
      	* cp/cp-tree.h: Adjust include files.
      
      2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
      
      	* fortran/f95-lang.c: Adjust include files.
      	* fortran/trans-decl.c: Likewise.
      
      2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
      
      	* java/class.c: Adjust include files.
      	* java/resource.c: Likewise.
      
      2014-10-16  Andrew MacLeod  <amacleod@redhat.com>
      
      	* objc/objc-act.c: Adjust include files.
      
      From-SVN: r216337
      Andrew MacLeod committed
    • IPA ICF pass, part 3/5 · b84d4347
      	* Makefile.in: New object files included.
      	* cgraph.c (cgraph_node::dump): New cgraph_node flag icf_merged
      	is printed.
      	(verify_edge_corresponds_to_fndecl): More sensitive verification
      	of nodes that are merged by IPA ICF.
      	* cgraph.h (cgraph_node::num_references): New function.
      	* cgraphunit.c (cgraph_node::expand_thunk): White space fixed.
      	* common.opt: New options ipa-icf, ipa-icf-functions and
      	ipa-icf-variables introduced.
      	* doc/invoke.texi: Documentation of new options introduced.
      	* ipa-icf-gimple.c: New file.
      	* ipa-icf-gimple.h: New file.
      	* ipa-icf.c: New file.
      	* ipa-icf.h: New file.
      	* lto-cgraph.c (lto_output_node): Streaming of icf_merged flag added.
      	(input_overwrite_node): Likewise.
      	* lto-section-in.c: New icf section added.
      	* lto-streamer.h (enum lto_section_type): Likewise.
      	* opts.c (common_handle_option): New option added.
      	* passes.def: New pass included.
      	* timevar.def: Time variable for IPA ICF added.
      	* tree-pass.h: New IPA ICF pass entry point added.
      
      
      Co-Authored-By: Jan Hubicka <hubicka@ucw.cz>
      
      From-SVN: r216305
      Martin Liska committed
  26. 12 Oct, 2014 1 commit
    • move many gc hashtab to hash_table · 2a22f99c
      gcc/
      
      * asan.c, cfgloop.c, cfgloop.h, cgraph.c, cgraph.h,
      	config/darwin.c, config/m32c/m32c.c, config/mep/mep.c,
      	config/mips/mips.c, config/rs6000/rs6000.c, dwarf2out.c,
      	function.c, function.h, gimple-ssa.h, libfuncs.h, optabs.c,
      	output.h, rtl.h, sese.c, symtab.c, tree-cfg.c, tree-dfa.c,
      	tree-ssa.c, varasm.c: Use hash-table instead of hashtab.
      	* doc/gty.texi (for_user): Document new option.
      	* gengtype.c (create_user_defined_type): Don't try to get a struct for
      	char.
      	(walk_type): Don't error out on for_user option.
      	(write_func_for_structure): Emit user marking routines if requested by
      	for_user option.
      	(write_local_func_for_structure): Likewise.
      	(main): Mark types with for_user option as used.
      	* ggc.h (gt_pch_nx): Add overload for unsigned int.
      	* hash-map.h (hash_map::hash_entry::pch_nx_helper): AddOverloads.
      	* hash-table.h (ggc_hasher): New struct.
      	(hash_table::create_ggc): New function.
      	(gt_pch_nx): New overload for hash_table.
      
      java/
      
      	* class.c, decl.c, except.c, expr.c, java-tree.h, lang.c: Use
      	hash_table instead of hashtab.
      
      objc/
      
      	* objc-act.c: use hash_table instead of hashtab.
      
      cp/
      
      	* cp-gimplify.c, cp-tree.h, decl.c, mangle.c, name-lookup.c,
      	pt.c, semantics.c, tree.c, typeck2.c: Use hash_table instead of
      	hashtab.
      
      fortran/
      
      	* trans-decl.c, trans.c, trans.h: Use hash_table instead of hashtab.
      
      c-family/
      
      	* c-common.c: Use hash_table instead of hashtab.
      
      From-SVN: r216127
      Trevor Saunders committed
  27. 07 Oct, 2014 1 commit
  28. 05 Oct, 2014 1 commit
    • ipa-polymorphic-call.c (walk_ssa_copies): Recognize NULL pointer checks. · 0127c169
      
      	* ipa-polymorphic-call.c (walk_ssa_copies): Recognize
      	NULL pointer checks.
      	(ipa_polymorphic_call_context::get_dynamic_type): Return true
      	if type doesn't change.
      	* cgraph.h (cgraph_indirect_call_info): New flag.
      	* cgraph.c (cgraph_node::create_indirect_edge): Initialize it.
      	(cgraph_node::dump): Dump it.
      	* ipa-prop.c (ipa_analyze_call_uses):  Ignore return valud
      	of context.get_dynamic_type.
      	(ipa_make_edge_direct_to_target): Do not speculate
      	edge that is already speuclative.
      	(try_make_edge_direct_virtual_call): Use VPTR_CHANGED; Do not
      	speculate to __builtin_unreachable
      	(ipa_write_indirect_edge_info, ipa_read_indirect_edge_info): Stream
      	vptr_changed.
      	* ipa-cp.c (ipa_get_indirect_edge_target_1): Use vptr_changed.
      	* g++.dg/ipa/devirt-47.C: New testcase.
      
      From-SVN: r215898
      Jan Hubicka committed
  29. 03 Oct, 2014 2 commits
    • cgraph.h (struct indirect_call_info): Add IN_POLYMORPHIC_CDTOR · f9bb202b
      	* cgraph.h (struct indirect_call_info): Add IN_POLYMORPHIC_CDTOR
      	* lto-cgraph.c (lto_output_edge, input_edge): Stream
      	in_polymorphic_cdtor
      	* cgraph.c (symbol_table::create_edge): Compute in_polymorphic_cdtor.
      	(cgraph_edge::make_speculative): Copy in_polymorphic_cdtor.
      	* cgraphclones.c (cgraph_edge::clone): Likewise.
      	* ipa-prop.c (update_jump_functions_after_inlining, 
      	try_make_edge_direct_virtual_call): Pass in_polymorphic_cdtor
      	to possible_dynamic_type_change.
      	(decl_maybe_in_construction_p): Allow empty OUTER_TYPE and BASE.
      	(ipa_polymorphic_call_context::possible_dynamic_type_change): Add
      	IN_POLY_CDOTR argument.
      
      From-SVN: r215871
      Jan Hubicka committed
    • cgraph.h (ipa_polymorphic_call_context): Turn bools into bitfields... · 4081ada2
      	* cgraph.h (ipa_polymorphic_call_context):
      	Turn bools into bitfields; add DYNAMIC; make MAKE_SPECULATIVE
      	private, add POSSIBLE_DYNAMIC_TYPE_CHANGE.
      	* ipa-polymorphic-call.c
      	(ipa_polymorphic_call_context::restrict_to_inner_class): Allow accesses
      	past end of dynamic types.
      	(ipa_polymorphic_call_context::stream_out,
      	speculative_outer_type): Stream dynamic flag.
      	(ipa_polymorphic_call_context::set_by_decl): Clear DYNAMIC.
      	(ipa_polymorphic_call_context::ipa_polymorphic_call_context):
      	Clear DYNAMIC.
      	(ipa_polymorphic_call_context::get_dynamic_type): Use DYNAMIC;
      	set it.
      	(ipa_polymorphic_call_context::combine_with): Propagate dynamic.
      	* ipa-prop.c (update_jump_functions_after_inlining,
      	try_make_edge_direct_virtual_call): Use possible_dynamic_type_change.
      
      From-SVN: r215833
      Jan Hubicka committed
  30. 02 Oct, 2014 1 commit
    • * ipa-polymorphic-call.c · 67a1b94c
      	(ipa_polymorphic_call_context::restrict_to_inner_class):
      	Rename EXPECTED_TYPE to OTR_TYPE; Validate speculation late;
      	use speculation_consistent_p to do so; Add CONSDER_BASES
      	and CONSIDER_PLACEMENT_NEW parameters.
      	(contains_type_p): Add CONSDER_PLACEMENT_NEW and CONSIDER_BASES;
      	short circuit obvious cases.
      	(ipa_polymorphic_call_context::dump): Improve formatting.
      	(ipa_polymorphic_call_context::ipa_polymorphic_call_context): Use
      	combine_speculation_with to record speculations; Do not ICE when
      	object is located in pointer type decl; do not ICE for methods
      	of UNION_TYPE; do not record nonpolymorphic types.
      	(ipa_polymorphic_call_context::speculation_consistent_p): New method.
      	(ipa_polymorphic_call_context::combine_speculation_with): New method.
      	(ipa_polymorphic_call_context::combine_with): New method.
      	(ipa_polymorphic_call_context::make_speculative): Move here; use
      	combine speculation.
      	* cgraph.h (ipa_polymorphic_call_context): Update
      	restrict_to_inner_class prototype; add offset_by, make_speculative, 
      	combine_with, useless_p, combine_speculation_with and
      	speculation_consistent_p methods.
      	(ipa_polymorphic_call_context::offset_by): New method.
      	(ipa_polymorphic_call_context::useless_p): New method.
      
      From-SVN: r215790
      Jan Hubicka committed
  31. 26 Sep, 2014 1 commit
    • cgraph.c (cgraph_node::release_body): New argument keep_arguments introduced. · bf898b30
      	* cgraph.c (cgraph_node::release_body): New argument keep_arguments
      	introduced.
      	* cgraph.h: Likewise.
      	* cgraphunit.c (cgraph_node::create_wrapper): Usage of new argument introduced.
      	* ipa-utils.h (polymorphic_type_binfo_p): Safe check for binfos created by Java.
      	* tree-ssa-alias.c (ao_ref_base_alias_set): Static function transformed to global.
      	* tree-ssa-alias.h: Likewise.
      
      From-SVN: r215640
      Martin Liska committed
  32. 25 Sep, 2014 1 commit
    • cgraph.h (class ipa_polymorphic_call_context): Move here from ipa-utils.h; add… · ba392339
      cgraph.h (class ipa_polymorphic_call_context): Move here from ipa-utils.h; add stream_int and stream_out methods.
      
      
      	* cgraph.h (class ipa_polymorphic_call_context): Move here from
      	ipa-utils.h; add stream_int and stream_out methods.
      	(cgraph_indirect_call_info): Remove SPECILATIVE_OFFSET,
      	OUTER_TYPE, SPECULATIVE_OUTER_TYPE, MAYBE_IN_CONSTRUCTION
      	MAYBE_DERIVED_TYPE and SPECULATIEVE_MAYBE_DERIVED_TYPE;
      	add CONTEXT.
      	(ipa_polymorphic_call_context::ipa_polymorphic_call_context,
      	ipa_polymorphic_call_context::ipa_polymorphic_call_context,
      	ipa_polymorphic_call_context::clear_speculation,
      	ipa_polymorphic_call_context::clear_outer_type): Move here from
      	ipa-utils.h
      	* ipa-utils.h (class ipa_polymorphic_call_context): Move to cgraph.h
      	(ipa_polymorphic_call_context::ipa_polymorphic_call_context,
      	ipa_polymorphic_call_context::ipa_polymorphic_call_context,
      	ipa_polymorphic_call_context::clear_speculation,
      	ipa_polymorphic_call_context::clear_outer_type): Likewise.
      	* ipa-devirt.c: Include data-streamer.h, lto-streamer.h and
      	streamer-hooks.h
      	(ipa_polymorphic_call_context::stream_out): New method.
      	(ipa_polymorphic_call_context::stream_in): New method.
      	(noncall_stmt_may_be_vtbl_ptr_store): Add forgotten static.
      	* ipa-prop.c (ipa_analyze_indirect_call_uses): Do not care about
      	OUTER_TYPE.
      	(ipa_analyze_call_uses): Simplify.
      	(update_indirect_edges_after_inlining): Do not care about outer_type.
      	(ipa_write_indirect_edge_info): Update.
      	(ipa_write_indirect_edge_info): Likewise.
      	* cgraph.c (cgraph_node::create_indirect_edge): Simplify.
      	(dump_edge_flags): Break out from ...
      	(cgraph_node::dump): ... here; dump indirect edges.
      
      From-SVN: r215575
      Jan Hubicka committed
  33. 24 Sep, 2014 2 commits
    • cgraph.h, [...]: Rename all instances of DECL_ABSTRACT to DECL_ABSTRACT_P. · 00de328a
          	* cgraph.h, dbxout.c, dwarfout2.c, gimple-fold.c,
          	lto-streamer-out.c, print-tree.c, symtab.c, tree-inline.c,
          	tree-streamer-in.c, tree-streamer-out.c, tree.c, tree.h,
          	varpool.c: Rename all instances of DECL_ABSTRACT to
          	DECL_ABSTRACT_P.
      
          cp/
          	* class.c, decl.c, optimize.c: Rename all instances of
          	DECL_ABSTRACT to DECL_ABSTRACT_P.
      
          lto/
          	* lto-symtab.c, lto.c: Rename all instances of DECL_ABSTRACT to
          	DECL_ABSTRACT_P.
      
      From-SVN: r215567
      Aldy Hernandez committed
    • Add an no_reorder attribute for LTO · 7861b648
      Some projects need to prevent reordering of specific top level
      declarations with LTO, in particular declarations defining init calls.
      
      The only way to do that with LTO was to use -fno-toplevel-reorder,
      which stops reordering for all declarations and makes LTO partitioning
      less efficient.
      
      This patch adds a new no_reorder attribute that stops reordering only
      for the marked declaration. The program can then only mark e.g. the
      initcalls and leave all the other declarations alone.
      
      The patch does:
      
      - Adds the new no_reorder attribute for the C family.
      - Initializes a new no_reorder flag in the symtab_nodes in the
      function visibility flag.
      - Maintains the no_reorder flag when creating new nodes.
      - Changes the partition code to always keep a separate
      sorted queue of ordered nodes and flush them in order with the other
      nodes. This is used by all nodes with -fno-toplevel-reorder,
      and only the marked ones without it.
      Parts of the old -fno-toplevel-reorder code paths are reused.
      - Adds various checks throughout the tree to make no_reorder
      marked functions behave the same as with -fno-toplevel-reorder
      - Changes the LTO streamer to serialize the no_reorder attribute.
      
      gcc/c-family/:
      
      2014-09-23  Andi Kleen  <ak@linux.intel.com>
      
      	* c-common.c (handle_no_reorder_attribute): New function.
      	(c_common_attribute_table): Add no_reorder attribute.
      
      gcc/:
      
      2014-09-23  Andi Kleen  <ak@linux.intel.com>
      
      	* cgraph.h (symtab_node): Add no_reorder attribute.
      	(symbol_table::output_asm_statements): Remove.
      	* cgraphclones.c (cgraph_node::create_clone): Copy no_reorder.
      	(cgraph_node::create_version_clone): Dito.
      	(symbol_table::output_asm_statements): Remove.
      	* trans-mem.c (ipa_tm_create_version_alias): Dito.
      	* cgraphunit.c (varpool_node::finalize_decl): Check no_reorder.
      	(output_in_order): Add no_reorder flag. Only handle no_reorder
      	nodes when set.
      	(symbol_table::compile): Add separate pass for no_reorder nodes.
      	(process_common_attributes): Set no_reorder flag in symtab node.
      	Add node argument.
      	(process_function_and_variable_attributes): Pass symtab nodes to
      	process_common_attributes.
      	* doc/extend.texi (no_reorder): Document no_reorder attribute.
      	* lto-cgraph.c (lto_output_node): Serialize no_reorder.
      	(lto_output_varpool_node): Dito.
      	(input_overwrite_node): Dito.
      	(input_varpool_node): Dito.
      	* varpool.c (varpool_node::add): Set no_reorder attribute.
      	(symbol_table::remove_unreferenced_decls): Handle no_reorder.
      	(symbol_table::output_variables): Dito.
      	* symtab.c (symtab_node::dump_base): Print no_reorder.
      
      gcc/lto/:
      
      2014-09-23  Andi Kleen  <ak@linux.intel.com>
      
      	* lto-partition.c (node_cmp): Update comment.
      	(varpool_node_cmp): Use symtab_node for comparison.
      	(add_sorted_nodes): New function.
      	(lto_balanced_map): Change to keep ordered queue
      	of ordered node. Handle no_reorder attribute.
      
      From-SVN: r215537
      Andi Kleen committed
  34. 19 Sep, 2014 1 commit
    • re PR c++/61825 (g++.dg/cpp0x/static_assert9.C FAILs) · f7217cde
      	PR c++/61825
      	* c-family/c-common.c (handle_alias_ifunc_attribute): Check
      	that visibility change is possible
      	(handle_weakref_attribute): Likewise.
      	* cgraph.h (symtab_node): Add method get_create and
      	field refuse_visibility_changes.
      	(symtab_node::get_create): New method.
      	* fold-const.c (tree_single_nonzero_warnv_p): Use get_create.
      	* varasm.c (mark_weak): Verify that visibility change is
      	possible.
      
      	* gcc.dg/tree-ssa/nonzero-1.c: Require error to be output.
      
      From-SVN: r215409
      Jan Hubicka committed