Commit Graph

82 Commits

Author SHA1 Message Date
Jakub Jelinek ff304c0111 re PR middle-end/79399 (GCC fails to compile big source at -O0)
PR middle-end/79399
	* ira-int.h (struct target_ira_int): Change x_max_struct_costs_size
	type from int to size_t.
	* ira-costs.c (struct_costs_size): Change type from int to size_t.

Co-Authored-By: Richard Biener <rguenther@suse.de>

From-SVN: r245256
2017-02-07 22:51:21 +01:00
Jakub Jelinek cbe34bb5ed Update copyright years.
From-SVN: r243994
2017-01-01 13:07:43 +01:00
Jakub Jelinek 818ab71a41 Update copyright years.
From-SVN: r232055
2016-01-04 15:30:50 +01:00
Mikhail Maltsev b2b293775a [PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE
[PATCH 7/9] ENABLE_CHECKING refactoring: middle-end, LTO FE
gcc/lto/ChangeLog:
2015-10-27  Mikhail Maltsev  <maltsevm@gmail.com>

	* lto.c (unify_scc): Use flag_checking and remove ENABLE_CHECKING
	conditionals.
	(lto_fixup_state): Likewise.
	(do_whole_program_analysis): Use
	symtab_node::checking_verify_symtab_nodes and remove ENABLE_CHECKING
	conditionals.

gcc/ChangeLog:

2015-10-27  Mikhail Maltsev  <maltsevm@gmail.com>

	* attribs.c (check_attribute_tables): New function, broken out from...
	(init_attributes): Use it.
	* cfgcleanup.c (try_optimize_cfg): Use flag_checking, CHECKING_P
	gcc_checking_assert and checking_* functions to eliminate
	ENABLE_CHECKING conditionals.
	* cfgexpand.c (expand_goto, expand_debug_expr): Likewise.
	(pass_expand::execute): Likewise.
	* cgraphclones.c (symbol_table::materialize_all_clones): Likewise.
	* cgraphunit.c (mark_functions_to_output): Likewise.
	(cgraph_node::expand_thunk): Likewise.
	(symbol_table::compile): Likewise.
	* ddg.c (add_cross_iteration_register_deps): Likewise.
	(create_ddg_all_sccs): Likewise.
	* df-core.c (df_finish_pass, df_analyze): Likewise.
	* diagnostic-core.h: Likewise.
	* diagnostic.c (diagnostic_report_diagnostic): Likewise.
	* dominance.c (calculate_dominance_info): Likewise.
	* dwarf2out.c (add_AT_die_ref): Likewise.
	(const_ok_for_output_1, mem_loc_descriptor): Likewise.
	(loc_list_from_tree, gen_lexical_block_die): Likewise.
	gen_type_die_with_usage, gen_type_die): Likewise.
	(dwarf2out_decl): Likewise.
	* emit-rtl.c (verify_rtx_sharing, reorder_insns_nobb): Likewise.
	* except.c (duplicate_eh_regions): Likewise.
	* fwprop.c (register_active_defs, update_df_init): Likewise.
	(fwprop_init, fwprop_done): Likewise.
	(update_uses): Likewise.
	* ggc-page.c (ggc_grow): Likewise.
	* gimplify.c (gimplify_body): Likewise.
	(gimplify_hasher::equal): Likewise.
	* graphite-isl-ast-to-gimple.c (graphite_verify): Likewise.
	* graphite-scop-detection.c (canonicalize_loop_closed_ssa_form):
	Likewise.
	* graphite-sese-to-poly.c (rewrite_reductions_out_of_ssa): Likewise.
	(rewrite_cross_bb_scalar_deps_out_of_ssa): Likwise.
	* hash-table.h (::find_empty_slot_for_expand): Likewise.
	* ifcvt.c (if_convert): Likewise.
	* ipa-cp.c (ipcp_propagate_stage): Likewise.
	* ipa-devirt.c (type_in_anonymous_namespace_p): Likewise.
	(odr_type_p, odr_types_equivalent_p): Likewise.
	(add_type_duplicate, get_odr_type): Likewise.
	* ipa-icf.c (sem_item_optimizer::execute): Likewise.
	(sem_item_optimizer::subdivide_classes_by_equality): Likewise.
	(sem_item_optimizer::verify_classes): Likewise.
	(sem_item_optimizer::traverse_congruence_split): Likewise.
	(sem_item_optimizer::checking_verify_classes): New.
	* ipa-icf.h (sem_item_optimizer::checking_verify_classes): Add new
	method.
	* cfgrtl.c (commit_edge_insertions): Likewise.
	(fixup_reorder_chain, cfg_layout_finalize): Likewise.
	(rtl_flow_call_edges_add): Likewise.
	* cgraph.c (symbol_table::create_edge): Likewise.
	(cgraph_edge::redirect_call_stmt_to_callee): Likewise.
	* cgraph.h (symtab_node): Likewise.
	(symtab_node::checking_verify_symtab_nodes): Define.
	(cgraph_node::checking_verify_cgraph_nodes): Define.
	* cfghooks.h (checking_verify_flow_info): Define.
	* cfgloop.h (checking_verify_loop_structure): Define.
	* dominance.h (checking_verify_dominators): Define.
	* et-forest.c: Fix comment.
	* ipa-inline-analysis.c (compute_inline_parameters): Use flag_checking,
	CHECKING_P gcc_checking_assert and checking_* functions to eliminate
	ENABLE_CHECKING conditionals.
	* ipa-inline-transform.c (save_inline_function_body): Likewise.
	* ipa-inline.c (inline_small_functions): Likewise.
	(early_inliner): Likewise.
	* ipa-inline.h (estimate_edge_growth): Likewise.
	* ipa-visibility.c (function_and_variable_visibility): Likewise.
	* ipa.c (symbol_table::remove_unreachable_nodes): Likewise.
	(ipa_single_use): Likewise.
	* ira-int.h: Likewise.
	* ira.c (ira): Likewise.
	* loop-doloop.c (doloop_optimize_loops): Likewise.
	* loop-init.c (loop_optimizer_init, fix_loop_structure): Likewise.
	* loop-invariant.c (move_loop_invariants): Likewise.
	* lra-assigns.c (lra_assign): Likewise.
	* lra-constraints.c (lra_constraints): Likewise.
	* lra-eliminations.c (lra_eliminate): Likewise.
	* lra-int.h (struct lra_reg): Likewise.
	* lra-lives.c (check_pseudos_live_through_calls): Likewise.
	(lra_create_live_ranges_1): Likewise.
	* lra-remat.c (create_remat_bb_data): Likewise.
	* lra.c (lra_update_insn_recog_data, restore_scratches): Likewise.
	(lra): Likewise.
	(check_rtl): Always define. Remove incorrect guard around
	extract_constrain_insn call.
	* lto-cgraph.c (input_cgraph_1: Use flag_checking,
	CHECKING_P gcc_checking_assert and checking_* functions to eliminate
	ENABLE_CHECKING conditionals.
	* lto-streamer-out.c (DFS::DFS): Likewise.
	(lto_output): Likewise.
	* lto-streamer.c (lto_streamer_init): Likewise.
	* omp-low.c (scan_omp_target, expand_omp_taskreg): Likewise.
	expand_omp_target, execute_expand_omp): Likewise.
	(lower_omp_target): Likewise.
	* passes.c (execute_function_todo): Likewise.
	(execute_todo, execute_one_pass): Likewise.
	(verify_curr_properties): Always define.
	* predict.c (tree_estimate_probability: Use flag_checking,
	CHECKING_P gcc_checking_assert and checking_* functions to eliminate
	ENABLE_CHECKING conditionals.
	(propagate_freq): Likewise.
	* pretty-print.c (pp_format): Likewise.
	* real.c (real_to_decimal_for_mode): Likewise.
	* recog.c (split_all_insns): Likewise.
	* regcprop.c (kill_value_one_regno): Likewise.
	(copy_value): Likewise.
	(validate_value_data): Define unconditionally.
	* reload.c: Fix comment.
	* timevar.c: Include options.h
	* tree-ssa.h (checking_verify_ssa): Define.
	* tree-ssa-loop-manip.h (checking_verify_loop_closed_ssa): Define.
	* sched-deps.c (CHECK): Remove unused macro.
	(add_or_update_dep_1, sd_add_dep: Use flag_checking, CHECKING_P
	gcc_checking_assert and checking_* functions to eliminate
	ENABLE_CHECKING conditionals.
	* sel-sched-ir.c (free_regset_pool, tidy_control_flow): Likewise.
	* sel-sched.c (struct moveop_static_params): Likewise.
	(find_best_reg_for_expr, move_cond_jump): Likewise.
	(move_op_orig_expr_not_found): Likewise.
	(code_motion_process_successors, move_op): Likewise.
	* ssa-iterators.h (first_readonly_imm_use): Likewise.
	(next_readonly_imm_use): Likewise.
	* store-motion.c (compute_store_table): Likewise.
	* symbol-summary.h (function_summary::function_summary): Likewise.
	* target.h (cumulative_args_t): Likewise.
	(get_cumulative_args, pack_cumulative_args): Likewise.
	* timevar.c: (timer::print): Likewise.
	* trans-mem.c (ipa_tm_execute): Likewise.
	* tree-cfg.c (move_stmt_op): Likewise.
	(move_sese_region_to_fn): Likewise.
	(gimple_flow_call_edges_add): Likewise.
	* tree-cfgcleanup.c (cleanup_tree_cfg_noloop, repair_loop_structures):
	Likewise.
	* tree-eh.c (remove_unreachable_handlers): Likewise.
	* tree-if-conv.c (pass_if_conversion::execute): Likewise.
	* tree-inline.c (expand_call_inline, optimize_inline_calls): Likewise.
	* tree-into-ssa.c (update_ssa): Likewise.
	* tree-loop-distribution.c (pass_loop_distribution::execute): Likewise.
	* tree-outof-ssa.c (eliminate_useless_phis, rewrite_trees): Likewise.
	* tree-parloops.c (pass_parallelize_loops::execute): Likewise.
	* tree-predcom.c (suitable_component_p): Likewise.
	* tree-profile.c (gimple_gen_const_delta_profiler): Likewise.
	* tree-ssa-alias.c (refs_may_alias_p_1): Likewise.
	* tree-ssa-live.c (verify_live_on_entry): Likewise.
	* tree-ssa-live.h (register_ssa_partition): Likewise.
	* tree-ssa-loop-ivcanon.c (tree_unroll_loops_completely): Likewise.
	* tree-ssa-loop-manip.c (add_exit_phi): Likewise.
	(tree_transform_and_unroll_loop): Likewise.
	* tree-ssa-math-opts.c (pass_cse_reciprocals::execute): Likewise.
	* tree-ssa-operands.c (get_expr_operands): Likewise.
	* tree-ssa-propagate.c (replace_exp_1): Likewise.
	* tree-ssa-structalias.c (rewrite_constraints): Likewise.
	* tree-ssa-ter.c (free_temp_expr_table): Likewise.
	* tree-ssa-threadupdate.c (duplicate_thread_path): Likewise.
	* tree-ssanames.c (release_ssa_name_fn): Likewise.
	* tree-stdarg.c (expand_ifn_va_arg): Likewise.
	* tree-vect-loop-manip.c
	(slpeel_tree_duplicate_loop_to_edge_cfg): Likewise.
	(slpeel_checking_verify_cfg_after_peeling): Likewise.
	(vect_do_peeling_for_loop_bound): Likewise.
	(vect_do_peeling_for_alignment): Likewise.
	* tree-vrp.c (supports_overflow_infinity): Likewise.
	(set_value_range): Likewise.
	* tree.c (free_lang_data_in_cgraph): Likewise.
	* value-prof.c (gimple_remove_histogram_value): Likewise.
	(free_hist): Likewise.
	* var-tracking.c (canonicalize_values_star): Likewise.
	(compute_bb_dataflow, vt_find_locations, vt_emit_notes): Likewise.

From-SVN: r229470
2015-10-27 19:05:53 -06:00
Andrew MacLeod 68c6cacb78 ira-int.h: Include recog.h.
* ira-int.h: Include recog.h.
	* ira-build.c: Don't include recog.h.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* sched-deps.c: Likewise.
	* sel-sched.c: Likewise.
	* target-globals.c: Likewise.

From-SVN: r226876
2015-08-13 21:39:03 +00:00
H.J. Lu 8f3f5ac089 Add alternative_mask to ira_implicitly_set_insn_hard_regs
Since ira_implicitly_set_insn_hard_regs may be called outside of
ira-lives.c, it can't use the local variable, preferred_alternatives.
This patch adds an alternative_mask argument to
ira_implicitly_set_insn_hard_regs.

gcc/

	PR rtl-optimization/67029
	* ira-color.c: Include "recog.h" before including "ira-int.h".
	* target-globals.c: Likewise.
	* ira-lives.c (ira_implicitly_set_insn_hard_regs): Add an
	adds an alternative_mask argument and use it instead of
	preferred_alternatives.
	* ira.h (ira_implicitly_set_insn_hard_regs): Moved to ...
	* ira-int.h (ira_implicitly_set_insn_hard_regs): Here.
	* sched-deps.c: Include "ira-int.h" after including "ira.h".
	(sched_analyze_insn): Update call to
	ira_implicitly_set_insn_hard_regs.
	* sel-sched.c: Include "ira-int.h" after including "ira.h".
	(implicit_clobber_conflict_p): Update call to
	ira_implicitly_set_insn_hard_regs.

gcc/testsuite/

	PR rtl-optimization/67029
	* gcc.dg/pr67029.c: New test.

From-SVN: r226724
2015-08-07 09:18:09 -07:00
Andrew MacLeod c7131fb2b5 tree-core.h: Include symtab.h.
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* tree-core.h: Include symtab.h.
	* rtl.h: Include hard-reg-set.h but not flags.h.
	(HARD_CONST): Remove condition compilation involving HARD_CONST since 
	hard-reg-set.h is always included.
	* regs.h: Don't include hard-reg-set.h or rtl.h.
	* cfg.h: Include dominance.h.
	* gimple.h: Include tree-ssa-alias.h and gimple-expr.h.
	* backend.h: New.  Aggregate commonly used backend header files.
	* gimple-ssa.h: Don't include tree-hasher.h.
	* ssa.h: New.  Aggregate commonly used SSA header files.
	* regset.h: Remove bitmap.h and hard-reg-set.h #includes.
	* sel-sched-ir.h: Flatten includes.
	* lra-int.h: Flatten completely.
	* sel-sched-dump.h: Flatten includes.
	* ira-int.h: Flatten includes.
	* gimple-streamer.h: Remove all includes.
	* cfgloop.h: Remove all #includes except cfgloopmanip.h.
	* resource.h: Flatten hard-reg-set.h and df.h.
	* sched-int.h: Flatten insn-arrt.h and df.h.
	* valtrack.h: flatten bitmap.h, df.h, and rtl.h
	* df.h: Flatten includes, leaving regset.h, alloc-pool.h and timevar.h.
	* genattrtab.c (write_header): Adjust generated includes.
	* genautomata.c (main): Likewise.
	* genconditions.c (write-header): Likewise.
	* genemit.c (main): Likewise.
	* gengtype.c (open_base_files): Likewise.
	* genopinit.c (main): Likewise.
	* genoutput.c (output_prologue): Likewise.
	* genpeep.c (main): Likewise.
	* genpreds.c (write_insn_preds_c): Likewise.
	* genrecog.c (write_header): Likewise.
	* alias.c: Adjust includes.
	* asan.c: Likewise.
	* attribs.c: Likewise.
	* auto-inc-dec.c: Likewise.
	* auto-profile.c: Likewise.
	* bb-reorder.c: Likewise.
	* bt-load.c: Likewise.
	* builtins.c: Likewise.
	* caller-save.c: Likewise.
	* calls.c: Likewise.
	* ccmp.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgbuild.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfgloop.c: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraphbuild.c: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* cilk-common.c: Likewise.
	* combine-stack-adj.c: Likewise.
	* combine.c: Likewise.
	* compare-elim.c: Likewise.
	* convert.c: Likewise.
	* coverage.c: Likewise.
	* cppbuiltin.c: Likewise.
	* cprop.c: Likewise.
	* cse.c: Likewise.
	* cselib.c: Likewise.
	* data-streamer-in.c: Likewise.
	* data-streamer-out.c: Likewise.
	* data-streamer.c: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* ddg.c: Likewise.
	* debug.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dfp.c: Likewise.
	* dojump.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* double-int.c: Likewise.
	* dse.c: Likewise.
	* dumpfile.c: Likewise.
	* dwarf2asm.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* fixed-value.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* fwprop.c: Likewise.
	* gcc-plugin.h: Likewise.
	* gcse-common.c: Likewise.
	* gcse.c: Likewise.
	* generic-match-head.c: Likewise.
	* ggc-page.c: Likewise.
	* gimple-builder.c: Likewise.
	* gimple-expr.c: Likewise.
	* gimple-fold.c: Likewise.
	* gimple-iterator.c: Likewise.
	* gimple-low.c: Likewise.
	* gimple-match-head.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.
	* gimple.c: Likewise.
	* gimplify-me.c: Likewise.
	* gimplify.c: Likewise.
	* godump.c: Likewise.
	* graph.c: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-isl-ast-to-gimple.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* haifa-sched.c: Likewise.
	* hw-doloop.c: Likewise.
	* ifcvt.c: Likewise.
	* init-regs.c: Likewise.
	* internal-fn.c: Likewise.
	* ipa-chkp.c: Likewise.
	* ipa-comdats.c: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-devirt.c: Likewise.
	* ipa-icf-gimple.c: Likewise.
	* ipa-icf.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-polymorphic-call.c: Likewise.
	* ipa-profile.c: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-ref.c: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-visibility.c: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-conflicts.c: Likewise.
	* ira-costs.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-lives.c: Likewise.
	* ira.c: Likewise.
	* jump.c: Likewise.
	* langhooks.c: Likewise.
	* lcm.c: Likewise.
	* loop-doloop.c: Likewise.
	* loop-init.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-iv.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lra-assigns.c: Likewise.
	* lra-coalesce.c: Likewise.
	* lra-constraints.c: Likewise.
	* lra-eliminations.c: Likewise.
	* lra-lives.c: Likewise.
	* lra-remat.c: Likewise.
	* lra-spills.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-compress.c: Likewise.
	* lto-opts.c: Likewise.
	* lto-section-in.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.c: Likewise.
	* mcf.c: Likewise.
	* mode-switching.c: Likewise.
	* modulo-sched.c: Likewise.
	* omega.c: Likewise.
	* omp-low.c: Likewise.
	* optabs.c: Likewise.
	* opts-global.c: Likewise.
	* passes.c: Likewise.
	* plugin.c: Likewise.
	* postreload-gcse.c: Likewise.
	* postreload.c: Likewise.
	* predict.c: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* real.c: Likewise.
	* realmpfr.c: Likewise.
	* recog.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regcprop.c: Likewise.
	* reginfo.c: Likewise.
	* regrename.c: Likewise.
	* regstat.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* rtl-chkp.c: Likewise.
	* rtlanal.c: Likewise.
	* rtlhooks.c: Likewise.
	* sanopt.c: Likewise.
	* sched-deps.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* sched-vis.c: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched.c: Likewise.
	* sese.c: Likewise.
	* shrink-wrap.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stack-ptr-mod.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* stringpool.c: Likewise.
	* symtab.c: Likewise.
	* target-globals.c: Likewise.
	* targhooks.c: Likewise.
	* toplev.c: Likewise.
	* tracer.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-affine.c: Likewise.
	* tree-browser.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chkp-opt.c: Likewise.
	* tree-chkp.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-dfa.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-nested.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-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-profile.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: 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-dse.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-ifcombine.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-loop-ch.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-loop.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-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-scopedtables.c: Likewise.
	* tree-ssa-sink.c: Likewise.
	* tree-ssa-strlen.c: Likewise.
	* tree-ssa-structalias.c: Likewise.
	* tree-ssa-tail-merge.c: Likewise.
	* tree-ssa-ter.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-ssanames.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-streamer.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.c: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tsan.c: Likewise.
	* ubsan.c: Likewise.
	* valtrack.c: Likewise.
	* value-prof.c: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vmsdbgout.c: Likewise.
	* vtable-verify.c: Likewise.
	* web.c: Likewise.
	* wide-int.cc: Likewise.
	* xcoffout.c: Likewise.
	* config/aarch64/aarch64-builtins.c: Likewise.
	* config/aarch64/aarch64.c: Likewise.
	* config/aarch64/cortex-a57-fma-steering.c: Likewise.
	* config/alpha/alpha.c: Likewise.
	* config/arc/arc.c: Likewise.
	* config/arm/aarch-common.c: Likewise.
	* config/arm/arm-builtins.c: Likewise.
	* config/arm/arm-c.c: Likewise.
	* config/arm/arm.c: Likewise.
	* config/avr/avr-c.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.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/ft32/ft32.c: Likewise.
	* config/h8300/h8300.c: Likewise.
	* config/i386/i386-c.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/i386/msformat-c.c: Likewise.
	* config/i386/winnt-cxx.c: Likewise.
	* config/i386/winnt-stubs.c: Likewise.
	* config/i386/winnt.c: Likewise.
	* config/ia64/ia64-c.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/iq2000/iq2000.c: Likewise.
	* config/lm32/lm32.c: Likewise.
	* config/m32c/m32c-pragma.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.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.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/nvptx/nvptx.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/pdp11/pdp11.c: Likewise.
	* config/rl78/rl78-c.c: Likewise.
	* config/rl78/rl78.c: Likewise.
	* config/rs6000/rs6000-c.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/s390/s390-c.c: Likewise.
	* config/s390/s390.c: Likewise.
	* config/sh/sh-c.c: Likewise.
	* config/sh/sh-mem.cc: Likewise.
	* config/sh/sh.c: Likewise.
	* config/sh/sh_optimize_sett_clrt.cc: Likewise.
	* config/sh/sh_treg_combine.cc: Likewise.
	* config/sol2-c.c: Likewise.
	* config/sol2-cxx.c: Likewise.
	* config/sol2-stubs.c: Likewise.
	* config/sol2.c: Likewise.
	* config/sparc/sparc-c.c: Likewise.
	* config/sparc/sparc.c: Likewise.
	* config/spu/spu-c.c: Likewise.
	* config/spu/spu.c: Likewise.
	* config/stormy16/stormy16.c: Likewise.
	* config/tilegx/mul-tables.c: Likewise.
	* config/tilegx/tilegx-c.c: Likewise.
	* config/tilegx/tilegx.c: Likewise.
	* config/tilepro/mul-tables.c: Likewise.
	* config/tilepro/tilepro-c.c: Likewise.
	* config/tilepro/tilepro.c: Likewise.
	* config/v850/v850-c.c: Likewise.
	* config/v850/v850.c: Likewise.
	* config/vax/vax.c: Likewise.
	* config/visium/visium.c: Likewise.
	* config/vms/vms-c.c: Likewise.
	* config/vms/vms.c: Likewise.
	* config/vxworks.c: Likewise.
	* config/xtensa/xtensa.c: Likewise.

ada
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* gcc-interface/cuintp.c: Adjust includes.
	* gcc-interface/decl.c: Likewise.
	* gcc-interface/misc.c: Likewise.
	* gcc-interface/targtyps.c: Likewise.
	* gcc-interface/trans.c: Likewise.
	* gcc-interface/utils.c: Likewise.
	* gcc-interface/utils2.c: Likewise.

c
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* c-array-notation.c: Adjust includes.
	* c-aux-info.c: Likewise.
	* c-convert.c: Likewise.
	* c-decl.c: Likewise.
	* c-errors.c: Likewise.
	* c-lang.c: Likewise.
	* c-objc-common.c: Likewise.
	* c-parser.c: Likewise.
	* c-typeck.c: Likewise.

c-family
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* array-notation-common.c: Adjust includes.
	* c-ada-spec.c: Likewise.
	* c-cilkplus.c: Likewise.
	* c-common.h: Likewise.
	* c-cppbuiltin.c: Likewise.
	* c-dump.c: Likewise.
	* c-format.c: Likewise.
	* c-gimplify.c: Likewise.
	* c-indentation.c: Likewise.
	* c-lex.c: Likewise.
	* c-omp.c: Likewise.
	* c-opts.c: Likewise.
	* c-pch.c: Likewise.
	* c-ppoutput.c: Likewise.
	* c-pragma.c: Likewise.
	* c-pretty-print.c: Likewise.
	* c-semantics.c: Likewise.
	* c-ubsan.c: Likewise.
	* cilk.c: Likewise.
	* stub-objc.c: Likewise.

cp
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* call.c: Adjust includes.
	* class.c: Likewise.
	* constexpr.c: Likewise.
	* cp-array-notation.c: Likewise.
	* cp-gimplify.c: Likewise.
	* cp-lang.c: Likewise.
	* cp-objcp-common.c: Likewise.
	* cp-ubsan.c: Likewise.
	* cvt.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* dump.c: Likewise.
	* error.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* init.c: Likewise.
	* lambda.c: Likewise.
	* lex.c: Likewise.
	* mangle.c: Likewise.
	* method.c: Likewise.
	* name-lookup.c: Likewise.
	* optimize.c: Likewise.
	* parser.c: Likewise.
	* pt.c: Likewise.
	* ptree.c: Likewise.
	* repo.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

fortran
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* convert.c: Adjust includes.
	* cpp.c: Likewise.
	* decl.c: Likewise.
	* f95-lang.c: Likewise.
	* iresolve.c: Likewise.
	* match.c: Likewise.
	* module.c: Likewise.
	* options.c: Likewise.
	* target-memory.c: Likewise.
	* trans-array.c: Likewise.
	* trans-common.c: Likewise.
	* trans-const.c: Likewise.
	* trans-decl.c: Likewise.
	* trans-expr.c: Likewise.
	* trans-intrinsic.c: Likewise.
	* trans-io.c: Likewise.
	* trans-openmp.c: Likewise.
	* trans-stmt.c: Likewise.
	* trans-types.c: Likewise.
	* trans.c: Likewise.

go
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* go-backend.c: Adjust includes.
	* go-gcc.cc: Likewise.
	* go-lang.c: Likewise.

java
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* boehm.c: Adjust includes.
	* builtins.c: Likewise.
	* class.c: Likewise.
	* constants.c: Likewise.
	* decl.c: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* java-gimplify.c: Likewise.
	* jcf-dump.c: Likewise.
	* jcf-io.c: Likewise.
	* jcf-parse.c: Likewise.
	* jvgenmain.c: Likewise.
	* lang.c: Likewise.
	* mangle.c: Likewise.
	* mangle_name.c: Likewise.
	* resource.c: Likewise.
	* typeck.c: Likewise.
	* verify-glue.c: Likewise.

jit
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* dummy-frontend.c: Adjust includes.
	* jit-common.h: Likewise.
	* jit-playback.c: Likewise.

lto
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* lto-lang.c: Adjust includes.
	* lto-object.c: Likewise.
	* lto-partition.c: Likewise.
	* lto-symtab.c: Likewise.
	* lto.c: Likewise.

objc
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* objc-act.c: Adjust includes.
	* objc-encoding.c: Likewise.
	* objc-gnu-runtime-abi-01.c: Likewise.
	* objc-lang.c: Likewise.
	* objc-map.c: Likewise.
	* objc-next-runtime-abi-01.c: Likewise.
	* objc-next-runtime-abi-02.c: Likewise.
	* objc-runtime-shared-support.c: Likewise.

objcp
2015-07-07  Andrew MacLeod  <amacleod@redhat.com>

	* objcp-decl.c: Adjust includes.
	* objcp-lang.c: Likewise.

From-SVN: r225531
2015-07-08 00:53:03 +00:00
Jakub Jelinek 5624e564d2 Update copyright years.
From-SVN: r219188
2015-01-05 13:33:28 +01:00
Vladimir Makarov 2bf7560bd3 re PR rtl-optimization/63397 (signed integer overflows in ira.c)
2014-12-15  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/63397
	* ira-int.h (ira_overall_cost, ira_reg_cost, ira_mem_cost): Use
	int64_t.
	(ira_load_cost, ira_store_cost, ira_shuffle_cost): Ditto.
	* ira.c (ira_overall_cost, ira_overall_cost_before): Ditto.
	(ira_reg_cost, ira_mem_cost): Ditto.
	(ira_load_cost, ira_store_cost, ira_shuffle_cost): Ditto.
	(calculate_allocation_cost, do_reload): Use the right
	format for int64_t values.

From-SVN: r218766
2014-12-15 22:18:51 +00:00
Vladimir Makarov 7b6e0c544a ira-int.h (ira_prohibited_class_mode_regs): Remove.
2014-12-15  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-int.h (ira_prohibited_class_mode_regs): Remove.
	(struct target_ira_int): Move x_ira_prohibited_class_mode_regs to
	...
	* ira.h (struct target_ira_int): ... here.
	(ira_prohibited_class_mode_regs): Define.
	* lra-constraints.c (process_alt_operands): Add one more condition
	to refuse alternative when reload pseudo of given class can not
	hold value of given mode.

From-SVN: r218760
2014-12-15 19:51:31 +00:00
Richard Sandiford ef4bddc299 decl.c, [...]: Remove redundant enum from machine_mode.
gcc/ada/
	* gcc-interface/decl.c, gcc-interface/gigi.h, gcc-interface/misc.c,
	gcc-interface/trans.c, gcc-interface/utils.c, gcc-interface/utils2.c:
	Remove redundant enum from machine_mode.

gcc/c-family/
	* c-common.c, c-common.h, c-cppbuiltin.c, c-lex.c: Remove redundant
	enum from machine_mode.

gcc/c/
	* c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
	machine_mode.

gcc/cp/
	* constexpr.c: Remove redundant enum from machine_mode.

gcc/fortran/
	* trans-types.c, trans-types.h: Remove redundant enum from
	machine_mode.

gcc/go/
	* go-lang.c: Remove redundant enum from machine_mode.

gcc/java/
	* builtins.c, java-tree.h, typeck.c: Remove redundant enum from
	machine_mode.

gcc/lto/
	* lto-lang.c: Remove redundant enum from machine_mode.

gcc/
	* addresses.h, alias.c, asan.c, auto-inc-dec.c, bt-load.c, builtins.c,
	builtins.h, caller-save.c, calls.c, calls.h, cfgexpand.c, cfgloop.h,
	cfgrtl.c, combine.c, compare-elim.c, config/aarch64/aarch64-builtins.c,
	config/aarch64/aarch64-protos.h, config/aarch64/aarch64-simd.md,
	config/aarch64/aarch64.c, config/aarch64/aarch64.h,
	config/aarch64/aarch64.md, config/alpha/alpha-protos.h,
	config/alpha/alpha.c, config/arc/arc-protos.h, config/arc/arc.c,
	config/arc/arc.h, config/arc/predicates.md,
	config/arm/aarch-common-protos.h, config/arm/aarch-common.c,
	config/arm/arm-protos.h, config/arm/arm.c, config/arm/arm.h,
	config/arm/arm.md, config/arm/neon.md, config/arm/thumb2.md,
	config/avr/avr-log.c, config/avr/avr-protos.h, config/avr/avr.c,
	config/avr/avr.md, config/bfin/bfin-protos.h, config/bfin/bfin.c,
	config/c6x/c6x-protos.h, config/c6x/c6x.c, config/c6x/c6x.md,
	config/cr16/cr16-protos.h, config/cr16/cr16.c,
	config/cris/cris-protos.h, config/cris/cris.c, config/cris/cris.md,
	config/darwin-protos.h, config/darwin.c,
	config/epiphany/epiphany-protos.h, config/epiphany/epiphany.c,
	config/epiphany/epiphany.md, config/fr30/fr30.c,
	config/frv/frv-protos.h, config/frv/frv.c, config/frv/predicates.md,
	config/h8300/h8300-protos.h, config/h8300/h8300.c,
	config/i386/i386-builtin-types.awk, config/i386/i386-protos.h,
	config/i386/i386.c, config/i386/i386.md, config/i386/predicates.md,
	config/i386/sse.md, config/i386/sync.md, config/ia64/ia64-protos.h,
	config/ia64/ia64.c, config/iq2000/iq2000-protos.h,
	config/iq2000/iq2000.c, config/iq2000/iq2000.md,
	config/lm32/lm32-protos.h, config/lm32/lm32.c,
	config/m32c/m32c-protos.h, config/m32c/m32c.c,
	config/m32r/m32r-protos.h, config/m32r/m32r.c,
	config/m68k/m68k-protos.h, config/m68k/m68k.c,
	config/mcore/mcore-protos.h, config/mcore/mcore.c,
	config/mcore/mcore.md, config/mep/mep-protos.h, config/mep/mep.c,
	config/microblaze/microblaze-protos.h, config/microblaze/microblaze.c,
	config/mips/mips-protos.h, config/mips/mips.c,
	config/mmix/mmix-protos.h, config/mmix/mmix.c,
	config/mn10300/mn10300-protos.h, config/mn10300/mn10300.c,
	config/moxie/moxie.c, config/msp430/msp430-protos.h,
	config/msp430/msp430.c, config/nds32/nds32-cost.c,
	config/nds32/nds32-intrinsic.c, config/nds32/nds32-md-auxiliary.c,
	config/nds32/nds32-protos.h, config/nds32/nds32.c,
	config/nios2/nios2-protos.h, config/nios2/nios2.c,
	config/pa/pa-protos.h, config/pa/pa.c, config/pdp11/pdp11-protos.h,
	config/pdp11/pdp11.c, config/rl78/rl78-protos.h, config/rl78/rl78.c,
	config/rs6000/altivec.md, config/rs6000/rs6000-c.c,
	config/rs6000/rs6000-protos.h, config/rs6000/rs6000.c,
	config/rs6000/rs6000.h, config/rx/rx-protos.h, config/rx/rx.c,
	config/s390/predicates.md, config/s390/s390-protos.h,
	config/s390/s390.c, config/s390/s390.h, config/s390/s390.md,
	config/sh/predicates.md, config/sh/sh-protos.h, config/sh/sh.c,
	config/sh/sh.md, config/sparc/predicates.md,
	config/sparc/sparc-protos.h, config/sparc/sparc.c,
	config/sparc/sparc.md, config/spu/spu-protos.h, config/spu/spu.c,
	config/stormy16/stormy16-protos.h, config/stormy16/stormy16.c,
	config/tilegx/tilegx-protos.h, config/tilegx/tilegx.c,
	config/tilegx/tilegx.md, config/tilepro/tilepro-protos.h,
	config/tilepro/tilepro.c, config/v850/v850-protos.h,
	config/v850/v850.c, config/v850/v850.md, config/vax/vax-protos.h,
	config/vax/vax.c, config/vms/vms-c.c, config/xtensa/xtensa-protos.h,
	config/xtensa/xtensa.c, coverage.c, cprop.c, cse.c, cselib.c, cselib.h,
	dbxout.c, ddg.c, df-problems.c, dfp.c, dfp.h, doc/md.texi,
	doc/rtl.texi, doc/tm.texi, doc/tm.texi.in, dojump.c, dse.c,
	dwarf2cfi.c, dwarf2out.c, dwarf2out.h, emit-rtl.c, emit-rtl.h,
	except.c, explow.c, expmed.c, expmed.h, expr.c, expr.h, final.c,
	fixed-value.c, fixed-value.h, fold-const.c, function.c, function.h,
	fwprop.c, gcse.c, gengenrtl.c, genmodes.c, genopinit.c, genoutput.c,
	genpreds.c, genrecog.c, gensupport.c, gimple-ssa-strength-reduction.c,
	graphite-clast-to-gimple.c, haifa-sched.c, hooks.c, hooks.h, ifcvt.c,
	internal-fn.c, ira-build.c, ira-color.c, ira-conflicts.c, ira-costs.c,
	ira-emit.c, ira-int.h, ira-lives.c, ira.c, ira.h, jump.c, langhooks.h,
	libfuncs.h, lists.c, loop-doloop.c, loop-invariant.c, loop-iv.c,
	loop-unroll.c, lower-subreg.c, lower-subreg.h, lra-assigns.c,
	lra-constraints.c, lra-eliminations.c, lra-int.h, lra-lives.c,
	lra-spills.c, lra.c, lra.h, machmode.h, omp-low.c, optabs.c, optabs.h,
	output.h, postreload.c, print-tree.c, read-rtl.c, real.c, real.h,
	recog.c, recog.h, ree.c, reg-stack.c, regcprop.c, reginfo.c,
	regrename.c, regs.h, reload.c, reload.h, reload1.c, rtl.c, rtl.h,
	rtlanal.c, rtlhash.c, rtlhooks-def.h, rtlhooks.c, sched-deps.c,
	sel-sched-dump.c, sel-sched-ir.c, sel-sched-ir.h, sel-sched.c,
	simplify-rtx.c, stmt.c, stor-layout.c, stor-layout.h, target.def,
	targhooks.c, targhooks.h, tree-affine.c, tree-call-cdce.c,
	tree-complex.c, tree-data-ref.c, tree-dfa.c, tree-if-conv.c,
	tree-inline.c, tree-outof-ssa.c, tree-scalar-evolution.c,
	tree-ssa-address.c, tree-ssa-ccp.c, tree-ssa-loop-ivopts.c,
	tree-ssa-loop-ivopts.h, tree-ssa-loop-manip.c,
	tree-ssa-loop-prefetch.c, tree-ssa-math-opts.c, tree-ssa-reassoc.c,
	tree-ssa-sccvn.c, tree-streamer-in.c, tree-switch-conversion.c,
	tree-vect-data-refs.c, tree-vect-generic.c, tree-vect-loop.c,
	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c,
	tree-vrp.c, tree.c, tree.h, tsan.c, ubsan.c, valtrack.c,
	var-tracking.c, varasm.c: Remove redundant enum from
	machine_mode.
gcc/
	* gengtype.c (main): Treat machine_mode as a scalar typedef.
	* genmodes.c (emit_insn_modes_h): Hide inline functions if
	USED_FOR_TARGET.

From-SVN: r216834
2014-10-29 12:02:45 +00:00
Kito Cheng df3e34938d ira.c: Fix typo in comment.
2014-10-14  Kito Cheng  <kito@0xlab.org>

	* ira.c: Fix typo in comment.
	* ira.h: Ditto.
	* ira-build.c: Ditto.
	* ira-color.c: Ditto.
	* ira-emit.c: Ditto.
	* ira-int.h: Ditto.
	* ira-lives.c: Ditto.

From-SVN: r216218
2014-10-14 13:13:33 -06:00
David Sherwood 8684302d34 ira-int.h (ira_allocno): Mark hard_regno as signed.
gcc/
2014-10-03  David Sherwood  <david.sherwood@arm.com>

	* ira-int.h (ira_allocno): Mark hard_regno as signed.

From-SVN: r215842
2014-10-03 10:11:46 +00:00
David Sherwood d1bb282efb ira-int.h (ira_allocno): Add "wmode" field.
gcc/
2014-09-26  David Sherwood  <david.sherwood@arm.com>

	* ira-int.h (ira_allocno): Add "wmode" field.
	* ira-build.c (create_insn_allocnos): Add new "parent" function
	parameter.
	* ira-conflicts.c (ira_build_conflicts): Add conflicts for registers
	that cannot be accessed in wmode.

From-SVN: r215707
2014-09-30 08:04:32 +00:00
Kito Cheng f1717f8df9 Add header guard to several header files.
2014-09-19  Kito Cheng  <kito@0xlab.org>

	* except.h: Fix header guard.
	* addresses.h: Add missing header guard.
	* cfghooks.h: Likewise.
	* collect-utils.h: Likewise.
	* collect2-aix.h: Likewise.
	* conditions.h: Likewise.
	* cselib.h: Likewise.
	* dwarf2asm.h: Likewise.
	* graphds.h: Likewise.
	* graphite-scop-detection.h: Likewise.
	* gsyms.h: Likewise.
	* hw-doloop.h: Likewise.
	* incpath.h: Likewise.
	* ipa-inline.h: Likewise.
	* ipa-ref.h: Likewise.
	* ira-int.h: Likewise.
	* ira.h: Likewise.
	* lra-int.h: Likewise.
	* lra.h: Likewise.
	* lto-section-names.h: Likewise.
	* read-md.h: Likewise.
	* reload.h: Likewise.
	* rtl-error.h: Likewise.
	* sdbout.h: Likewise.
	* targhooks.h: Likewise.
	* tree-affine.h: Likewise.
	* xcoff.h: Likewise.
	* xcoffout.h: Likewise.

From-SVN: r215365
2014-09-18 23:34:23 +01:00
Richard Sandiford 19c708dc83 ira.h (ira_finish_once): Delete.
gcc/
	* ira.h (ira_finish_once): Delete.
	* ira-int.h (target_ira_int::~target_ira_int): Declare.
	(target_ira_int::free_ira_costs): Likewise.
	(target_ira_int::free_register_move_costs): Likewise.
	(ira_finish_costs_once): Delete.
	* ira.c (free_register_move_costs): Replace with...
	(target_ira_int::free_register_move_costs): ...this new function.
	(target_ira_int::~target_ira_int): Define.
	(ira_init): Call free_register_move_costs as a member function rather
	than a global function.
	(ira_finish_once): Delete.
	* ira-costs.c (free_ira_costs): Replace with...
	(target_ira_int::free_ira_costs): ...this new function.
	(ira_init_costs): Call free_ira_costs as a member function rather
	than a global function.
	(ira_finish_costs_once): Delete.
	* target-globals.c (target_globals::~target_globals): Call the
	target_ira_int destructor.
	* toplev.c: Include lra.h.
	(finalize): Call lra_finish_once rather than ira_finish_once.

From-SVN: r215200
2014-09-12 07:27:10 +00:00
David Malcolm 647d790d2f recog_memoized works on an rtx_insn *
gcc/ChangeLog:
2014-09-09  David Malcolm  <dmalcolm@redhat.com>

	* caller-save.c (rtx saveinsn): Strengthen this variable from rtx
	to rtx_insn *.
	(restinsn): Likewise.
	* config/aarch64/aarch64-protos.h (aarch64_simd_attr_length_move):
	Likewise for param.
	* config/aarch64/aarch64.c (aarch64_simd_attr_length_move):
	Likewise.
	* config/arc/arc-protos.h (arc_adjust_insn_length): Likewise for
	first param.
	(arc_hazard): Likewise for both params.
	* config/arc/arc.c (arc600_corereg_hazard): Likewise, adding
	checked casts to rtx_sequence * and uses of the insn method for
	type-safety.
	(arc_hazard): Strengthen both params from rtx to rtx_insn *.
	(arc_adjust_insn_length): Likewise for param "insn".
	(struct insn_length_parameters_s): Likewise for first param of
	"get_variants" callback field.
	(arc_get_insn_variants): Likewise for first param and local
	"inner".  Replace a check of GET_CODE with a dyn_cast to
	rtx_sequence *, using methods for type-safety and clarity.
	* config/arc/arc.h (ADJUST_INSN_LENGTH): Use casts to
	rtx_sequence * and uses of the insn method for type-safety when
	invoking arc_adjust_insn_length.
	* config/arm/arm-protos.h (arm_attr_length_move_neon): Likewise
	for param.
	(arm_address_offset_is_imm): Likewise.
	(struct tune_params): Likewise for params 1 and 3 of the
	"sched_adjust_cost" callback field.
	* config/arm/arm.c (cortex_a9_sched_adjust_cost): Likewise for
	params 1 and 3 ("insn" and "dep").
	(xscale_sched_adjust_cost): Likewise.
	(fa726te_sched_adjust_cost): Likewise.
	(cortexa7_older_only): Likewise for param "insn".
	(cortexa7_younger): Likewise.
	(arm_attr_length_move_neon): Likewise.
	(arm_address_offset_is_imm): Likewise.
	* config/avr/avr-protos.h (avr_notice_update_cc): Likewise.
	* config/avr/avr.c (avr_notice_update_cc): Likewise.
	* config/bfin/bfin.c (hwloop_pattern_reg): Likewise.
	(workaround_speculation): Likewise for local "last_condjump".
	* config/c6x/c6x.c (shadow_p): Likewise for param "insn".
	(shadow_or_blockage_p): Likewise.
	(get_unit_reqs): Likewise.
	(get_unit_operand_masks): Likewise.
	(c6x_registers_update): Likewise.
	(returning_call_p): Likewise.
	(can_use_callp): Likewise.
	(convert_to_callp): Likewise.
	(find_last_same_clock): Likwise for local "t".
	(reorg_split_calls): Likewise for local "shadow".
	(hwloop_pattern_reg): Likewise for param "insn".
	* config/frv/frv-protos.h (frv_final_prescan_insn): Likewise.
	* config/frv/frv.c (frv_final_prescan_insn): Likewise.
	(frv_extract_membar): Likewise.
	(frv_optimize_membar_local): Strengthen param "last_membar" from
	rtx * to rtx_insn **.
	(frv_optimize_membar_global): Strengthen param "membar" from rtx
	to rtx_insn *.
	(frv_optimize_membar): Strengthen local "last_membar" from rtx *
	to rtx_insn **.
	* config/ia64/ia64-protos.h (ia64_st_address_bypass_p): Strengthen
	both params from rtx to rtx_insn *.
	(ia64_ld_address_bypass_p): Likewise.
	* config/ia64/ia64.c (ia64_safe_itanium_class): Likewise for param
	"insn".
	(ia64_safe_type): Likewise.
	(group_barrier_needed): Likewise.
	(safe_group_barrier_needed): Likewise.
	(ia64_single_set): Likewise.
	(is_load_p): Likewise.
	(record_memory_reference): Likewise.
	(get_mode_no_for_insn): Likewise.
	(important_for_bundling_p): Likewise.
	(unknown_for_bundling_p): Likewise.
	(ia64_st_address_bypass_p): Likewise for both params.
	(ia64_ld_address_bypass_p): Likewise.
	(expand_vselect): Introduce new local rtx_insn * "insn", using it
	in place of rtx "x" after the emit_insn call.
	* config/i386/i386-protos.h (x86_extended_QIreg_mentioned_p):
	Strengthen param from rtx to rtx_insn *.
	(ix86_agi_dependent): Likewise for both params.
	(ix86_attr_length_immediate_default): Likewise for param 1.
	(ix86_attr_length_address_default): Likewise for param.
	(ix86_attr_length_vex_default): Likewise for param 1.
	* config/i386/i386.c (ix86_attr_length_immediate_default):
	Likewise for param "insn".
	(ix86_attr_length_address_default): Likewise.
	(ix86_attr_length_vex_default): Likewise.
	(ix86_agi_dependent): Likewise for both params.
	(x86_extended_QIreg_mentioned_p): Likewise for param "insn".
	(vselect_insn): Likewise for this variable.
	* config/m68k/m68k-protos.h (m68k_sched_attr_opx_type): Likewise
	for param 1.
	(m68k_sched_attr_opy_type): Likewise.
	* config/m68k/m68k.c (sched_get_operand): Likewise.
	(sched_attr_op_type): Likewise.
	(m68k_sched_attr_opx_type): Likewise.
	(m68k_sched_attr_opy_type): Likewise.
	(sched_get_reg_operand): Likewise.
	(sched_get_mem_operand): Likewise.
	(m68k_sched_address_bypass_p): Likewise for both params.
	(sched_get_indexed_address_scale): Likewise.
	(m68k_sched_indexed_address_bypass_p): Likewise.
	* config/m68k/m68k.h (m68k_sched_address_bypass_p): Likewise.
	(m68k_sched_indexed_address_bypass_p): Likewise.
	* config/mep/mep.c (mep_jmp_return_reorg): Strengthen locals
	"label", "ret" from rtx to rtx_insn *, adding a checked cast and
	removing another.
	* config/mips/mips-protos.h (mips_linked_madd_p): Strengthen both
	params from rtx to rtx_insn *.
	(mips_fmadd_bypass): Likewise.
	* config/mips/mips.c (mips_fmadd_bypass): Likewise.
	(mips_linked_madd_p): Likewise.
	(mips_macc_chains_last_hilo): Likewise for this variable.
	(mips_macc_chains_record): Likewise for param.
	(vr4130_last_insn): Likewise for this variable.
	(vr4130_swap_insns_p): Likewise for both params.
	(mips_ls2_variable_issue): Likewise for param.
	(mips_need_noat_wrapper_p): Likewise for param "insn".
	(mips_expand_vselect): Add a new local rtx_insn * "insn", using it
	in place of "x" after the emit_insn.
	* config/pa/pa-protos.h (pa_fpstore_bypass_p): Strengthen both
	params from rtx to rtx_insn *.
	* config/pa/pa.c (pa_fpstore_bypass_p): Likewise.
	(pa_combine_instructions): Introduce local "par" for result of
	gen_rtx_PARALLEL, moving decl and usage of new_rtx for after call
	to make_insn_raw.
	(pa_can_combine_p): Strengthen param "new_rtx" from rtx to rtx_insn *.
	* config/rl78/rl78.c (insn_ok_now): Likewise for param "insn".
	(rl78_alloc_physical_registers_op1): Likewise.
	(rl78_alloc_physical_registers_op2): Likewise.
	(rl78_alloc_physical_registers_ro1): Likewise.
	(rl78_alloc_physical_registers_cmp): Likewise.
	(rl78_alloc_physical_registers_umul): Likewise.
	(rl78_alloc_address_registers_macax): Likewise.
	(rl78_alloc_physical_registers): Likewise for locals "insn", "curr".
	* config/s390/predicates.md (execute_operation): Likewise for
	local "insn".
	* config/s390/s390-protos.h (s390_agen_dep_p): Likewise for both
	params.
	* config/s390/s390.c (s390_safe_attr_type): Likewise for param.
	(addr_generation_dependency_p): Likewise for param "insn".
	(s390_agen_dep_p): Likewise for both params.
	(s390_fpload_toreg): Likewise for param "insn".
	* config/sh/sh-protos.h (sh_loop_align): Likewise for param.
	* config/sh/sh.c (sh_loop_align): Likewise for param and local
	"next".
	* config/sh/sh.md (define_peephole2): Likewise for local "insn2".
	* config/sh/sh_treg_combine.cc
	(sh_treg_combine::make_inv_ccreg_insn): Likewise for return type
	and local "i".
	(sh_treg_combine::try_eliminate_cstores): Likewise for local "i".
	* config/stormy16/stormy16.c (combine_bnp): Likewise for locals
	"and_insn", "load", "shift".
	* config/tilegx/tilegx.c (match_pcrel_step2): Likewise for param
	"insn".
	* final.c (final_scan_insn): Introduce local rtx_insn * "other"
	for XEXP (note, 0) of the REG_CC_SETTER note.
	(cleanup_subreg_operands): Strengthen param "insn" from rtx to
	rtx_insn *, eliminating a checked cast made redundant by this.
	* gcse.c (process_insert_insn): Strengthen local "insn" from rtx
	to rtx_insn *.
	* genattr.c (main): When writing out the prototype to
	const_num_delay_slots, strengthen the param from rtx to
	rtx_insn *.
	* genattrtab.c (write_const_num_delay_slots): Likewise when
	writing out the implementation of const_num_delay_slots.
	* hw-doloop.h (struct hw_doloop_hooks): Strengthen the param
	"insn" of callback field "end_pattern_reg" from rtx to rtx_insn *.
	* ifcvt.c (noce_emit_store_flag): Eliminate local rtx "tmp" in
	favor of new rtx locals "src" and "set" and new local rtx_insn *
	"insn" and "seq".
	(noce_emit_move_insn): Strengthen locals "seq" and "insn" from rtx
	to rtx_insn *.
	(noce_emit_cmove): Eliminate local rtx "tmp" in favor of new rtx
	locals "cond", "if_then_else", "set" and new rtx_insn * locals
	"insn" and "seq".
	(noce_try_cmove_arith): Strengthen locals "insn_a" and "insn_b",
	"last" from rtx to rtx_insn *.  Likewise for a local "tmp",
	renaming to "tmp_insn".  Eliminate the other local rtx "tmp" from
	the top-level scope, replacing with new more tightly-scoped rtx
	locals "reg", "pat", "mem" and rtx_insn * "insn", "copy_of_a",
	"new_insn", "copy_of_insn_b", and make local rtx "set" more
	tightly-scoped.
	* ira-int.h (ira_setup_alts): Strengthen param "insn" from rtx to
	rtx_insn *.
	* ira.c (setup_prohibited_mode_move_regs): Likewise for local
	"move_insn".
	(ira_setup_alts): Likewise for param "insn".
	* lra-constraints.c (emit_inc): Likewise for local "add_insn".
	* lra.c (emit_add3_insn): Split local rtx "insn" in two, an rtx
	and an rtx_insn *.
	(lra_emit_add): Eliminate top-level local rtx "insn" in favor of
	new more-tightly scoped rtx locals "add3_insn", "insn",
	"add2_insn" and rtx_insn * "move_insn".
	* postreload-gcse.c (eliminate_partially_redundant_load): Add
	checked cast on result of gen_move_insn when invoking
	extract_insn.
	* recog.c (insn_invalid_p): Strengthen param "insn" from rtx to
	rtx_insn *.
	(verify_changes): Add a checked cast on "object" when invoking
	insn_invalid_p.
	(extract_insn_cached): Strengthen param "insn" from rtx to
	rtx_insn *.
	(extract_constrain_insn_cached): Likewise.
	(extract_insn): Likewise.
	* recog.h (insn_invalid_p): Likewise for param 1.
	(recog_memoized): Likewise for param.
	(extract_insn): Likewise.
	(extract_constrain_insn_cached): Likewise.
	(extract_insn_cached): Likewise.
	* reload.c (can_reload_into): Likewise for local "test_insn".
	* reload.h (cleanup_subreg_operands): Likewise for param.
	* reload1.c (emit_insn_if_valid_for_reload): Rename param from
	"insn" to "pat", reintroducing "insn" as an rtx_insn * on the
	result of emit_insn.  Remove a checked cast made redundant by this
	change.
	* sel-sched-ir.c (sel_insn_rtx_cost): Strengthen param "insn" from
	rtx to rtx_insn *.
	* sel-sched.c (get_reg_class): Likewise.

From-SVN: r215087
2014-09-09 16:34:56 +00:00
David Malcolm 070a1983b3 ira: Use rtx_insn in various places
gcc/
	* ira-int.h (struct ira_allocno_copy): Strengthen field "insn"
	from rtx to rtx_insn *insn.
	(ira_create_copy): Strengthen param "insn" from rtx to rtx_insn *.
	(ira_add_allocno_copy): Likewise.
	* ira-build.c (find_allocno_copy): Strengthen param "insn" from
	rtx to rtx_insn *.
	(ira_create_copy): Likewise.
	(ira_add_allocno_copy): Likewise.
	(create_bb_allocnos): Likewise for local "insn".
	* ira-conflicts.c (process_regs_for_copy): Likewise for param "insn".
	(process_reg_shuffles): Update NULL_RTX to NULL in invocation of
	process_regs_for_copy for rtx_insn * param.
	(add_insn_allocno_copies): Strengthen param "insn" from rtx to
	rtx_insn *insn.  Update NULL_RTX to NULL in invocation of
	process_regs_for_copy for rtx_insn * param.
	(add_copies): Strengthen local "insn" from rtx to rtx_insn *insn.
	* ira-costs.c (record_reg_classes): Likewise for param "insn".
	(record_operand_costs): Likewise.
	(scan_one_insn): Likewise for return type, and for param "insn".
	(process_bb_for_costs): Likewise for local "insn".
	(process_bb_node_for_hard_reg_moves): Likewise.
	* ira-emit.c (struct move): Likewise for field "insn".
	(create_move): Eliminate use of NULL_RTX when dealing with an
	rtx_insn *.
	(emit_move_list): Strengthen return type and locals "result",
	"insn" from rtx to rtx_insn *insn.
	(emit_moves): Likewise for locals "insns", "tmp".
	(ira_emit): Likewise for local "insn".
	* ira-lives.c (mark_hard_reg_early_clobbers): Likewise for param
	"insn".
	(find_call_crossed_cheap_reg): Likewise.
	(process_bb_node_lives): Likewise for local "insn".
	* ira.c (decrease_live_ranges_number): Likewise.
	(compute_regs_asm_clobbered): Likewise.
	(build_insn_chain): Likewise.
	(find_moveable_pseudos): Likewise, also locals "def_insn",
	"use_insn", "x".  Also strengthen local "closest_uses" from rtx *
	to rtx_insn **.  Add a checked cast when assigning from
	"closest_use" into closest_uses array in a region where we know
	it's a non-NULL insn.
	(interesting_dest_for_shprep): Strengthen param "insn" from rtx
	to rtx_insn *.
	(split_live_ranges_for_shrink_wrap): Likewise for locals "insn",
	"last_interesting_insn", "uin".
	(move_unallocated_pseudos): Likewise for locals "def_insn",
	"move_insn", "newinsn".

From-SVN: r214339
2014-08-22 17:48:40 +00:00
Radovan Obradovic c2ba7e7a62 -fuse-caller-save - Use collected register usage information
2014-05-28  Radovan Obradovic  <robradovic@mips.com>
            Tom de Vries  <tom@codesourcery.com>

	* df-scan.c (df_get_call_refs): Use get_call_reg_set_usage.
	* caller-save.c (setup_save_areas, save_call_clobbered_regs): Use
	get_call_reg_set_usage.
	* resource.c (mark_set_resources, mark_target_live_regs): Use
	get_call_reg_set_usage.
	* ira-int.h (struct ira_allocno): Add crossed_calls_clobbered_regs
	field.
	(ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS): Define.
	* ira-lives.c (process_bb_node_lives): Use get_call_reg_set_usage.
	Calculate ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS.
	* ira-build.c (ira_create_allocno): Init
	ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS.
	(create_cap_allocno, propagate_allocno_info)
	(propagate_some_info_from_allocno)
	(copy_info_to_removed_store_destinations): Handle
	ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS.
	* ira-costs.c (ira_tune_allocno_costs): Use
	ALLOCNO_CROSSED_CALLS_CLOBBERED_REGS to adjust costs.

Co-Authored-By: Tom de Vries <tom@codesourcery.com>

From-SVN: r211007
2014-05-28 09:43:21 +00:00
Dehao Chen cf40f9734f ira-int.h (REG_FREQ_FROM_EDGE_FREQ): Use optimize_function_for_size_p.
2014-05-16  Dehao Chen  <dehao@google.com>

        * ira-int.h (REG_FREQ_FROM_EDGE_FREQ): Use optimize_function_for_size_p.
        * regs.h (REG_FREQ_FROM_BB): Likewise.

From-SVN: r210536
2014-05-16 23:01:26 +00:00
Richard Sandiford 23a5b65a92 Update copyright years in gcc/
From-SVN: r206289
2014-01-02 22:23:26 +00:00
Oleg Endo 84562394e2 cgraph.h (cgraph_node_set_iterator, [...]): Remove typedef.
* gcc/cgraph.h (cgraph_node_set_iterator, varpool_node_set_iterator):
	Remove typedef.
	(cgraph_inline_failed_enum, cgraph_inline_failed_t): Remove typedef and
	rename to cgraph_inline_failed_t.
	* gcc/tree-ssa-alias.h (ao_ref_s, ao_ref): Remove typedef and rename
	to ao_ref.
	* gcc/reload.h (reg_equivs_s, reg_equivs_t): Remove typedef and rename
	to reg_equivs_t.
	* gcc/conditions.h (CC_STATUS): Remove typedef.
	* gcc/bitmap.h (bitmap_obstack): Remove typedef.
	(bitmap_element_def, bitmap_element): Remove typedef and rename to
	bitmap_element.
	(bitmap_head_def, bitmap_head): Remove typedef and rename to
	bitmap_head.
	(bitmap_iterator): Remove typedef.
	* gcc/target.h (cumulative_args_t, print_switch_type,
	secondary_reload_info): Remove typedef.
	* gcc/dwarf2out.h (dw_cfi_oprnd_struct, dw_cfi_oprnd): Remove
	dw_cfi_oprnd_struct alias.
	(dw_cfi_struct, dw_cfi_node): Remove typedef and rename to dw_cfi_node.
	(dw_fde_struct, dw_fde_node): Remove typedef and rename to dw_fde_node.
	(cfa_loc, dw_cfa_location): Remove typedef and rename to
	dw_cfa_location.
	(dw_vec_struct, dw_vec_const): Remove typedef and rename to
	dw_vec_const.
	(dw_val_struct, dw_val_node): Remove typedef and rename to dw_val_node.
	(dw_loc_descr_struct, dw_loc_descr_node): Remove typedef and rename to
	dw_loc_descr_node.
	* gcc/params.h (param_info, compiler_param): Remove typedef.
	* gcc/opts.h (cl_deferred_param): Remove typedef.
	* gcc/sreal.h (sreal): Remove typedef.
	* gcc/ddg.h (dep_type, dep_data_type): Remove typedef.
	* gcc/graphite-clast-to-gimple.h (cloog_prog_clast, bb_pbb_def): Remove
	typedef.
	* gcc/lto-streamer.h (lto_decl_stream_e_t, lto_encoder_entry,
	lto_symtab_encoder_iterator, res_pair): Remove typedef.
	* gcc/tree-affine.h (affine_tree_combination, aff_tree): Remove typedef
	and rename to aff_tree.
	* gcc/sched-int.h (region): Remove typedef.
	* gcc/diagnostic.h (diagnostic_info,
	diagnostic_classification_change_t): Remove typedef.
	* gcc/tree-ssa-loop.h (affine_iv_d): Remove typedef and rename to
	affine_iv.
	* gcc/sbitmap.h (sbitmap_iterator): Remove typedef.
	* gcc/ssa-iterators.h (immediate_use_iterator_d, imm_use_iterator):
	Remove typedef and rename to imm_use_iterator.
	(ssa_operand_iterator_d, ssa_op_iter): Remove typedef and rename to
	ssa_op_iter.
	* gcc/ggc-internal.h (ggc_statistics): Remove typedef.
	* gcc/cselib.h (cselib_val_struct, cselib_val): Remove typedef and
	rename to cselib_val.
	* gcc/tree-core.h (alias_pair): Remove typedef.
	(constructor_elt_d, constructor_elt): Remove typedef and rename to
	constructor_elt.
	(ssa_use_operand_d, ssa_use_operand_t): Remove typedef and rename to
	ssa_use_operand_t.
	* gcc/graphite-sese-to-poly.h (base_alias_pair): Remove typedef.
	* gcc/tree-data-ref.h (conflict_function): Remove typedef.
	* gcc/tree-inline.h (copy_body_data): Remove typedef.
	* gcc/ipa-inline.h (condition, size_time_entry, inline_param_summary_t,
	edge_growth_cache_entry): Remove typedef.
	* gcc/regrename.h (operand_rr_info, insn_rr_info): Remove typedef.
	* gcc/gimple-iterator.h (gimple_stmt_iterator_d, gimple_stmt_iterator):
	Remove typedef and rename to gimple_stmt_iterator.
	* gcc/basic-block.h (ce_if_block, ce_if_block_t): Remove typedef and
	rename to ce_if_block.
	(edge_iterator): Remove typedef.
	* gcc/ipa-prop.h (ipa_agg_jf_item, ipa_agg_jf_item_t): Remove typedef
	and rename to ipa_agg_jf_item.
	(ipa_agg_jump_function_t, ipa_param_descriptor_t, ipa_node_params_t,
	ipa_parm_adjustment_t): Remove typedef.
	(ipa_jump_func, ipa_jump_func_t): Remove typedef and rename to
	ipa_jump_func.
	(ipa_edge_args, ipa_edge_args_t): Remove typedef and rename to
	ipa_edge_args.
	* gcc/gcov-io.h (gcov_bucket_type): Remove typedef.
	(gcov_working_set_info, gcov_working_set_t): Remove typedef and rename
	to gcov_working_set_t.
	* gcc/ira-int.h (minmax_set_iterator, ira_allocno_iterator,
	ira_object_iterator, ira_allocno_object_iterator, ira_pref_iterator,
	ira_copy_iterator, ira_object_conflict_iterator): Remove typedef.
	* gcc/tree-iterator.h (tree_stmt_iterator): Remove typedef.
	* gcc/rtl.h (addr_diff_vec_flags, mem_attrs, reg_attrs,
	replace_label_data): Remove typedef.
	(rtunion_def, rtunion): Remove typedef and rename to rtunion.
	* gcc/hard-reg-set.h (hard_reg_set_iterator): Remove typedef.
	* gcc/sel-sched-ir.h (_list_iterator, sel_global_bb_info_def,
	sel_region_bb_info_def, succ_iterator): Remove typedef.
	(deps_where_def, deps_where_t): Remove typedef and rename to
	deps_where_t.
	* gcc/coretypes.h: Adapt forward declarations.
	* gcc/tree-scalar-evolution.h: Likewise.
	* gcc/tree-ssa-address.h: Likewise.
	* gcc/tree-ssa-operands.h: Likewise.
	* gcc/function.h: Likewise.
	* gcc/config/frv/frv-protos.h: Likewise.
	* gcc/targhooks.h: Likewise.
	* gcc/basic_block.h: Likewise.
	* gcc/rtl.def: Adapt documentation.
	* gcc/doc/tm.texi: Likewise.
	* gcc/ipa-cp.c: Adapt uses.
	* gcc/bitmap.c: Likewise.
	* gcc/dwarf2out.c: Likewise.
	* gcc/target.def: Likewise.
	* gcc/ipa-inline-analysis.c: Likewise.
	* gcc/dwarf2cfi.c: Likewise.
	* gcc/tree-ssa-loop-ivopts.c: Likewise.
	* gcc/lto-cgraph.c: Likewise.
	* gcc/config/frv/frv.c: Likewise.
	* gcc/ifcvt.c: Likewise.
	* gcc/ipa-prop.c: Likewise.

From-SVN: r205863
2013-12-10 16:48:44 +00:00
David Malcolm fefa31b568 Eliminate ENTRY_BLOCK_PTR and EXIT_BLOCK_PTR macros
gcc/

	* basic-block.h (ENTRY_BLOCK_PTR_FOR_FUNCTION): Rename macro to...
	(EXIT_BLOCK_PTR_FOR_FUNCTION): ...this.
	(ENTRY_BLOCK_PTR_FOR_FN): Renamed macro to...
	(EXIT_BLOCK_PTR_FOR_FN): ...this.
	(ENTRY_BLOCK_PTR): Eliminate macro as work towards making uses of
	cfun be explicit.
	(EXIT_BLOCK_PTR): Likewise.
	(FOR_ALL_BB): Rework for now to eliminate use of "ENTRY_BLOCK_PTR".
	(FOR_ALL_BB_FN): Update for renaming of
	"ENTRY_BLOCK_PTR_FOR_FUNCTION" to "ENTRY_BLOCK_PTR_FOR_FN".

	* cfg.c (init_flow): Likewise.
	(check_bb_profile): Likewise.
	* cfganal.c (pre_and_rev_post_order_compute_fn): Likewise.
	* cfgcleanup.c (walk_to_nondebug_insn): Likewise.
	* cfghooks.c (account_profile_record): Likewise.
	* cfgloop.c (init_loops_structure): Likewise.
	* cgraphbuild.c (record_eh_tables): Likewise.
	(compute_call_stmt_bb_frequency): Likewise.
	* ipa-inline-analysis.c (compute_bb_predicates): Likewise.
	* lto-streamer-in.c (input_cfg): Likewise.
	* predict.c (maybe_hot_frequency_p): Likewise.
	* tree-cfg.c (init_empty_tree_cfg_for_function): Likewise.
	* tree-inline.c (initialize_cfun): Likewise.
	(copy_cfg_body): Likewise.
	(copy_body): Likewise.
	(tree_function_versioning): Likewise.

	* bb-reorder.c (add_labels_and_missing_jumps): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(duplicate_computed_gotos): Remove usage of EXIT_BLOCK_PTR macro.
	(find_rarely_executed_basic_blocks_and_crossing_edges): Remove uses of
	macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(connect_traces): Likewise.
	(rest_of_handle_reorder_blocks): Remove usage of EXIT_BLOCK_PTR macro.
	(bb_to_key): Remove usage of ENTRY_BLOCK_PTR macro.
	(fix_crossing_conditional_branches): Remove usage of EXIT_BLOCK_PTR
	macro.
	(find_traces_1_round): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(fix_up_fall_thru_edges): Remove usage of EXIT_BLOCK_PTR macro.
	(find_traces): Remove usage of ENTRY_BLOCK_PTR macro.
	(fix_up_crossing_landing_pad): Remove usage of EXIT_BLOCK_PTR macro.
	(rotate_loop): Likewise.
	* bt-load.c (migrate_btr_def): Remove usage of ENTRY_BLOCK_PTR macro.
	* cfg.c (clear_aux_for_edges): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(alloc_aux_for_edges): Likewise.
	(clear_bb_flags): Remove usage of ENTRY_BLOCK_PTR macro.
	(cached_make_edge): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(compact_blocks): Likewise.
	(clear_edges): Likewise.
	* cfganal.c (single_pred_before_succ_order): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(bitmap_union_of_succs): Remove usage of EXIT_BLOCK_PTR macro.
	(bitmap_union_of_preds): Remove usage of ENTRY_BLOCK_PTR macro.
	(bitmap_intersection_of_succs): Remove usage of EXIT_BLOCK_PTR macro.
	(bitmap_intersection_of_preds): Remove usage of ENTRY_BLOCK_PTR macro.
	(inverted_post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(compute_dominance_frontiers_1): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(post_order_compute): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(connect_infinite_loops_to_exit): Remove usage of EXIT_BLOCK_PTR
	macro.
	(remove_fake_edges): Remove usage of ENTRY_BLOCK_PTR macro.
	(add_noreturn_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro.
	(find_pdom): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(remove_fake_exit_edges): Remove usage of EXIT_BLOCK_PTR macro.
	(verify_edge_list): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(print_edge_list): Likewise.
	(create_edge_list): Likewise.
	(find_unreachable_blocks): Remove usage of ENTRY_BLOCK_PTR macro.
	(mark_dfs_back_edges): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	* cfgbuild.c (find_bb_boundaries): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(find_many_sub_basic_blocks): Remove usage of EXIT_BLOCK_PTR macro.
	(make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	* cfgcleanup.c (delete_unreachable_blocks): Likewise.
	(try_optimize_cfg): Likewise.
	(try_head_merge_bb): Remove usage of EXIT_BLOCK_PTR macro.
	(try_crossjump_to_edge): Remove usage of ENTRY_BLOCK_PTR macro.
	(try_crossjump_bb): Remove usage of EXIT_BLOCK_PTR macro.
	(merge_blocks_move): Remove usage of ENTRY_BLOCK_PTR macro.
	(outgoing_edges_match): Remove usage of EXIT_BLOCK_PTR macro.
	(try_forward_edges): Likewise.
	(try_simplify_condjump): Likewise.
	* cfgexpand.c (gimple_expand_cfg): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(construct_exit_block): Remove usage of EXIT_BLOCK_PTR macro.
	(construct_init_block): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(expand_gimple_basic_block): Remove usage of EXIT_BLOCK_PTR macro.
	(expand_gimple_tailcall): Likewise.
	* cfghooks.c (can_duplicate_block_p): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(tidy_fallthru_edges): Likewise.
	(verify_flow_info): Likewise.
	* cfgloop.c (flow_bb_inside_loop_p): Likewise.
	(num_loop_branches): Remove usage of EXIT_BLOCK_PTR macro.
	(disambiguate_multiple_latches): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(get_loop_exit_edges): Remove usage of EXIT_BLOCK_PTR macro.
	(bb_loop_header_p): Remove usage of ENTRY_BLOCK_PTR macro.
	(get_loop_body_in_bfs_order): Remove usage of EXIT_BLOCK_PTR macro.
	(get_loop_body_in_dom_order): Likewise.
	(get_loop_body): Likewise.
	* cfgloopanal.c (mark_irreducible_loops): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	* cfgloopmanip.c (create_preheader): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(remove_path): Remove usage of EXIT_BLOCK_PTR macro.
	(fix_bb_placement): Likewise.
	* cfgrtl.c (rtl_block_empty_p): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(rtl_can_remove_branch_p): Remove usage of EXIT_BLOCK_PTR macro.
	(cfg_layout_split_edge): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(rtl_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro.
	(cfg_layout_can_merge_blocks_p): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(cfg_layout_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(fixup_fallthru_exit_predecessor): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(fixup_reorder_chain): Likewise.
	(relink_block_chain): Likewise.
	(cfg_layout_delete_block): Remove usage of EXIT_BLOCK_PTR macro.
	(rtl_verify_bb_layout): Remove usage of ENTRY_BLOCK_PTR macro.
	(cfg_layout_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro.
	(force_one_exit_fallthru): Likewise.
	(rtl_verify_fallthru): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(rtl_verify_edges): Likewise.
	(commit_edge_insertions): Likewise.
	(commit_one_edge_insertion): Likewise.
	(rtl_split_edge): Likewise.
	(force_nonfallthru_and_redirect): Likewise.
	(outof_cfg_layout_mode): Remove usage of EXIT_BLOCK_PTR macro.
	(skip_insns_after_block): Likewise.
	(fixup_partition_crossing): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(purge_dead_edges): Remove usage of EXIT_BLOCK_PTR macro.
	(rtl_can_merge_blocks): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(contains_no_active_insn_p): Likewise.
	(emit_insn_at_entry): Remove usage of ENTRY_BLOCK_PTR macro.
	(entry_of_function): Likewise.
	(last_bb_in_partition): Remove usage of EXIT_BLOCK_PTR macro.
	(fixup_new_cold_bb): Likewise.
	(patch_jump_insn): Likewise.
	(try_redirect_by_replacing_jump): Likewise.
	(block_label): Likewise.
	(could_fall_through): Likewise.
	(can_fallthru): Likewise.
	* cgraphbuild.c (cgraph_rebuild_references): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(rebuild_cgraph_edges): Likewise.
	* cgraphunit.c (init_lowered_empty_function): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(expand_thunk): Remove usage of EXIT_BLOCK_PTR macro.
	* combine.c (get_last_value): Remove usage of ENTRY_BLOCK_PTR macro.
	(distribute_links): Remove usage of EXIT_BLOCK_PTR macro.
	(get_last_value_validate): Remove usage of ENTRY_BLOCK_PTR macro.
	(try_combine): Remove usage of EXIT_BLOCK_PTR macro.
	(reg_num_sign_bit_copies_for_combine): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(reg_nonzero_bits_for_combine): Likewise.
	(set_nonzero_bits_and_sign_copies): Likewise.
	(combine_instructions): Likewise.
	* cprop.c (one_cprop_pass): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(bypass_conditional_jumps): Likewise.
	(bypass_block): Remove usage of EXIT_BLOCK_PTR macro.
	(find_implicit_sets): Likewise.
	(cprop_jump): Likewise.
	* cse.c (cse_cc_succs): Likewise.
	(cse_find_path): Likewise.
	* df-problems.c (df_lr_confluence_0): Likewise.
	* df-scan.c (df_entry_block_defs_collect): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(df_exit_block_uses_collect): Remove usage of EXIT_BLOCK_PTR macro.
	* dominance.c (iterate_fix_dominators): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(calc_idoms): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(determine_dominators_for_sons): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(calc_dfs_tree): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(prune_bbs_to_update_dominators): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(calc_dfs_tree_nonrec): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	* domwalk.c (cmp_bb_postorder): Likewise.
	* dse.c (dse_step1): Remove usage of EXIT_BLOCK_PTR macro.
	* except.c (finish_eh_generation): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(sjlj_emit_function_enter): Likewise.
	* final.c (compute_alignments): Likewise.
	* function.c (thread_prologue_and_epilogue_insns): Remove uses of
	macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(reposition_prologue_and_epilogue_notes): Remove usage of
	EXIT_BLOCK_PTR macro.
	(convert_jumps_to_returns): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(regno_clobbered_at_setjmp): Remove usage of ENTRY_BLOCK_PTR macro.
	(next_block_for_reg): Remove usage of EXIT_BLOCK_PTR macro.
	* gcse.c (hoist_code): Remove usage of ENTRY_BLOCK_PTR macro.
	(update_bb_reg_pressure): Remove usage of EXIT_BLOCK_PTR macro.
	(compute_code_hoist_vbeinout): Likewise.
	(should_hoist_expr_to_dom): Remove usage of ENTRY_BLOCK_PTR macro.
	(pre_expr_reaches_here_p_work): Likewise.
	* gimple-iterator.c (gsi_commit_edge_inserts): Likewise.
	(gimple_find_edge_insert_loc): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	* gimple-ssa-strength-reduction.c (slsr_process_phi): Remove usage of
	ENTRY_BLOCK_PTR macro.
	* graph.c (draw_cfg_nodes_for_loop): Remove usage of EXIT_BLOCK_PTR
	macro.
	* graphite-clast-to-gimple.c (translate_clast_user): Remove usage of
	ENTRY_BLOCK_PTR macro.
	* graphite-scop-detection.c (build_scops): Likewise.
	(create_sese_edges): Remove usage of EXIT_BLOCK_PTR macro.
	(scopdet_basic_block_info): Remove usage of ENTRY_BLOCK_PTR macro.
	* haifa-sched.c (restore_bb_notes): Remove usage of EXIT_BLOCK_PTR
	macro.
	(unlink_bb_notes): Likewise.
	(create_check_block_twin): Likewise.
	(init_before_recovery): Likewise.
	(sched_extend_bb): Likewise.
	(priority): Likewise.
	* hw-doloop.c (reorder_loops): Likewise.
	(discover_loop): Likewise.
	* ifcvt.c (dead_or_predicable): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(find_if_case_1): Remove usage of EXIT_BLOCK_PTR macro.
	(block_has_only_trap): Likewise.
	(cond_exec_find_if_block): Likewise.
	(merge_if_block): Likewise.
	* ipa-inline-analysis.c (param_change_prob): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(record_modified): Likewise.
	* ipa-pure-const.c (execute_warn_function_noreturn): Remove usage of
	EXIT_BLOCK_PTR macro.
	(local_pure_const): Likewise.
	* ipa-split.c (split_function): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(find_split_points): Likewise.
	(consider_split): Likewise.
	(find_return_bb): Remove usage of EXIT_BLOCK_PTR macro.
	(verify_non_ssa_vars): Remove usage of ENTRY_BLOCK_PTR macro.
	* ira-build.c (ira_loop_tree_body_rev_postorder): Likewise.
	* ira-color.c (print_loop_title): Remove usage of EXIT_BLOCK_PTR
	macro.
	* ira-emit.c (entered_from_non_parent_p): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(ira_emit): Remove usage of EXIT_BLOCK_PTR macro.
	* ira-int.h (ira_assert): Remove usage of ENTRY_BLOCK_PTR macro.
	* ira.c (split_live_ranges_for_shrink_wrap): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	* lcm.c (compute_rev_insert_delete): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(compute_nearerout): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(compute_farthest): Likewise.
	(compute_available): Likewise.
	(compute_insert_delete): Remove usage of EXIT_BLOCK_PTR macro.
	(compute_laterin): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(compute_earliest): Likewise.
	(compute_antinout_edge): Likewise.
	* loop-iv.c (simplify_using_initial_values): Remove usage of
	ENTRY_BLOCK_PTR macro.
	* loop-unswitch.c (unswitch_loop): Remove usage of EXIT_BLOCK_PTR
	macro.
	* lra-assigns.c (find_hard_regno_for): Remove usage of ENTRY_BLOCK_PTR
	macro.
	* lra-constraints.c (lra_inheritance): Remove usage of EXIT_BLOCK_PTR
	macro.
	* lra-lives.c (lra_create_live_ranges): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	* lra.c (has_nonexceptional_receiver): Remove usage of EXIT_BLOCK_PTR
	macro.
	* lto-streamer-in.c (input_function): Remove usage of ENTRY_BLOCK_PTR
	macro.
	* lto-streamer-out.c (output_cfg): Likewise.
	* mcf.c (adjust_cfg_counts): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(create_fixup_graph): Remove usage of ENTRY_BLOCK_PTR macro.
	* mode-switching.c (optimize_mode_switching): Likewise.
	(create_pre_exit): Remove usage of EXIT_BLOCK_PTR macro.
	* modulo-sched.c (rest_of_handle_sms): Likewise.
	(canon_loop): Likewise.
	* omp-low.c (build_omp_regions): Remove usage of ENTRY_BLOCK_PTR
	macro.
	* postreload-gcse.c (eliminate_partially_redundant_loads): Remove uses
	of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	* predict.c (rebuild_frequencies): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(propagate_freq): Remove usage of EXIT_BLOCK_PTR macro.
	(estimate_bb_frequencies): Remove usage of ENTRY_BLOCK_PTR macro.
	(tree_estimate_probability_bb): Remove usage of EXIT_BLOCK_PTR macro.
	(expensive_function_p): Remove usage of ENTRY_BLOCK_PTR macro.
	(tree_bb_level_predictions): Remove usage of EXIT_BLOCK_PTR macro.
	(counts_to_freqs): Remove usage of ENTRY_BLOCK_PTR macro.
	(apply_return_prediction): Remove usage of EXIT_BLOCK_PTR macro.
	(estimate_loops): Remove usage of ENTRY_BLOCK_PTR macro.
	(gimple_predict_edge): Likewise.
	(probably_never_executed): Likewise.
	* profile.c (find_spanning_tree): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(branch_prob): Likewise.
	(compute_branch_probabilities): Likewise.
	(compute_frequency_overlap): Remove usage of ENTRY_BLOCK_PTR macro.
	(is_inconsistent): Remove usage of EXIT_BLOCK_PTR macro.
	(read_profile_edge_counts): Remove usage of ENTRY_BLOCK_PTR macro.
	(set_bb_counts): Likewise.
	(correct_negative_edge_counts): Likewise.
	(get_exec_counts): Likewise.
	(instrument_values): Likewise.
	(instrument_edges): Likewise.
	* reg-stack.c (convert_regs): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(compensate_edges): Remove usage of ENTRY_BLOCK_PTR macro.
	(convert_regs_exit): Remove usage of EXIT_BLOCK_PTR macro.
	(convert_regs_entry): Remove usage of ENTRY_BLOCK_PTR macro.
	(reg_to_stack): Likewise.
	* regs.h (REG_N_SETS): Likewise.
	* reload.c (find_dummy_reload): Likewise.
	(combine_reloads): Likewise.
	(push_reload): Likewise.
	* reload1.c (has_nonexceptional_receiver): Remove usage of
	EXIT_BLOCK_PTR macro.
	* resource.c (mark_target_live_regs): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(find_basic_block): Likewise.
	* sched-ebb.c (ebb_add_block): Remove usage of EXIT_BLOCK_PTR macro.
	(schedule_ebbs): Likewise.
	* sched-int.h (sel_sched_p): Likewise.
	* sched-rgn.c (compute_dom_prob_ps): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(rgn_add_block): Remove usage of EXIT_BLOCK_PTR macro.
	(haifa_find_rgns): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(propagate_deps): Remove usage of EXIT_BLOCK_PTR macro.
	(extend_rgns): Likewise.
	(find_single_block_region): Likewise.
	* sel-sched-ir.c (sel_remove_loop_preheader): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(setup_nop_and_exit_insns): Remove usage of EXIT_BLOCK_PTR macro.
	(sel_create_recovery_block): Likewise.
	(bb_ends_ebb_p): Likewise.
	(sel_bb_end): Likewise.
	(sel_bb_head): Likewise.
	(free_lv_sets): Likewise.
	(init_lv_sets): Likewise.
	(tidy_control_flow): Likewise.
	(maybe_tidy_empty_bb): Likewise.
	* sel-sched-ir.h (_succ_iter_cond): Likewise.
	(_succ_iter_start): Likewise.
	(sel_bb_empty_or_nop_p): Likewise.
	(get_loop_exit_edges_unique_dests): Likewise.
	(inner_loop_header_p): Likewise.
	* sel-sched.c (create_block_for_bookkeeping): Likewise.
	(find_block_for_bookkeeping): Likewise.
	* store-motion.c (remove_reachable_equiv_notes): Likewise.
	(insert_store): Likewise.
	* trans-mem.c (ipa_tm_transform_clone): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(tm_memopt_compute_available): Remove usage of EXIT_BLOCK_PTR macro.
	(ipa_tm_scan_irr_function): Remove usage of ENTRY_BLOCK_PTR macro.
	(gate_tm_init): Likewise.
	(tm_region_init): Likewise.
	* tree-cfg.c (execute_fixup_cfg): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(execute_warn_function_return): Remove usage of EXIT_BLOCK_PTR macro.
	(split_critical_edges): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(print_loops): Remove usage of ENTRY_BLOCK_PTR macro.
	(move_sese_region_to_fn): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(gimple_redirect_edge_and_branch): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(gimple_verify_flow_info): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(remove_edge_and_dominated_blocks): Remove usage of EXIT_BLOCK_PTR
	macro.
	(make_edges): Remove uses of macros: ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(gimple_flow_call_edges_add): Remove usage of EXIT_BLOCK_PTR macro.
	(make_blocks): Remove usage of ENTRY_BLOCK_PTR macro.
	(build_gimple_cfg): Likewise.
	(gimple_duplicate_bb): Remove usage of EXIT_BLOCK_PTR macro.
	(gimple_can_merge_blocks_p): Likewise.
	* tree-cfgcleanup.c (tree_forwarder_block_p): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	* tree-complex.c (update_parameter_components): Remove usage of
	ENTRY_BLOCK_PTR macro.
	* tree-if-conv.c (get_loop_body_in_if_conv_order): Remove usage of
	EXIT_BLOCK_PTR macro.
	* tree-inline.c (tree_function_versioning): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(delete_unreachable_blocks_update_callgraph): Likewise.
	(initialize_cfun): Likewise.
	(copy_cfg_body): Remove usage of ENTRY_BLOCK_PTR macro.
	(copy_edges_for_bb): Remove usage of EXIT_BLOCK_PTR macro.
	(remap_ssa_name): Remove usage of ENTRY_BLOCK_PTR macro.
	* tree-into-ssa.c (update_ssa): Likewise.
	(maybe_register_def): Remove usage of EXIT_BLOCK_PTR macro.
	(insert_updated_phi_nodes_for): Remove usage of ENTRY_BLOCK_PTR macro.
	(rewrite_into_ssa): Likewise.
	(rewrite_debug_stmt_uses): Likewise.
	* tree-outof-ssa.c (expand_phi_nodes): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	* tree-profile.c (gimple_gen_ic_func_profiler): Remove usage of
	ENTRY_BLOCK_PTR macro.
	* tree-scalar-evolution.h (block_before_loop): Likewise.
	* tree-sra.c (sra_ipa_reset_debug_stmts): Likewise.
	(dump_dereferences_table): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(analyze_caller_dereference_legality): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(propagate_dereference_distances): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(initialize_parameter_reductions): Remove usage of ENTRY_BLOCK_PTR
	macro.
	* tree-ssa-ccp.c (gsi_prev_dom_bb_nondebug): Likewise.
	(optimize_stack_restore): Remove usage of EXIT_BLOCK_PTR macro.
	* tree-ssa-coalesce.c (create_outofssa_var_map): Likewise.
	* tree-ssa-dce.c (eliminate_unnecessary_stmts): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(remove_dead_stmt): Remove usage of EXIT_BLOCK_PTR macro.
	(propagate_necessity): Remove usage of ENTRY_BLOCK_PTR macro.
	(mark_control_dependent_edges_necessary): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	* tree-ssa-dom.c (eliminate_degenerate_phis): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(tree_ssa_dominator_optimize): Remove usage of EXIT_BLOCK_PTR macro.
	* tree-ssa-live.c (verify_live_on_entry): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(calculate_live_on_exit): Likewise.
	(set_var_live_on_entry): Remove usage of ENTRY_BLOCK_PTR macro.
	(loe_visit_block): Likewise.
	* tree-ssa-live.h (live_on_exit): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(live_on_entry): Likewise.
	* tree-ssa-loop-ivopts.c (find_interesting_uses): Remove usage of
	EXIT_BLOCK_PTR macro.
	* tree-ssa-loop-manip.c (compute_live_loop_exits): Remove usage of
	ENTRY_BLOCK_PTR macro.
	* tree-ssa-loop-niter.c (simplify_using_initial_conditions): Likewise.
	(bound_difference): Likewise.
	* tree-ssa-loop-prefetch.c (may_use_storent_in_loop_p): Remove usage
	of EXIT_BLOCK_PTR macro.
	* tree-ssa-loop-unswitch.c (simplify_using_entry_checks): Remove usage
	of ENTRY_BLOCK_PTR macro.
	* tree-ssa-math-opts.c (register_division_in): Likewise.
	* tree-ssa-phiprop.c (tree_ssa_phiprop): Likewise.
	* tree-ssa-pre.c (compute_avail): Likewise.
	(compute_antic): Remove usage of EXIT_BLOCK_PTR macro.
	(insert): Remove usage of ENTRY_BLOCK_PTR macro.
	* tree-ssa-propagate.c (ssa_prop_init): Likewise.
	(simulate_block): Remove usage of EXIT_BLOCK_PTR macro.
	(cfg_blocks_add): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	(add_control_edge): Remove usage of EXIT_BLOCK_PTR macro.
	* tree-ssa-reassoc.c (do_reassoc): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(build_and_add_sum): Remove usage of ENTRY_BLOCK_PTR macro.
	* tree-ssa-sink.c (nearest_common_dominator_of_uses): Likewise.
	(execute_sink_code): Remove usage of EXIT_BLOCK_PTR macro.
	* tree-ssa-uninit.c (find_dom): Remove usage of ENTRY_BLOCK_PTR macro.
	(compute_control_dep_chain): Remove usage of EXIT_BLOCK_PTR macro.
	(find_pdom): Likewise.
	(warn_uninitialized_vars): Remove usage of ENTRY_BLOCK_PTR macro.
	* tree-stdarg.c (reachable_at_most_once): Likewise.
	* tree-tailcall.c (tree_optimize_tail_calls_1): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(eliminate_tail_call): Likewise.
	* tsan.c (instrument_func_entry): Remove usage of ENTRY_BLOCK_PTR
	macro.
	(instrument_func_exit): Remove usage of EXIT_BLOCK_PTR macro.
	* var-tracking.c (vt_initialize): Remove uses of macros:
	ENTRY_BLOCK_PTR, EXIT_BLOCK_PTR.
	(vt_add_function_parameter): Remove usage of ENTRY_BLOCK_PTR macro.
	(vt_find_locations): Remove usage of EXIT_BLOCK_PTR macro.
	(vt_stack_adjustments): Remove uses of macros: ENTRY_BLOCK_PTR,
	EXIT_BLOCK_PTR.
	* varasm.c (assemble_start_function): Remove usage of ENTRY_BLOCK_PTR
	macro.
	* config/bfin/bfin.c (hwloop_optimize): Likewise.
	* config/nds32/nds32.c (nds32_fp_as_gp_check_available): Remove usage
	of EXIT_BLOCK_PTR macro.
	* config/arm/arm.c (require_pic_register): Remove usage of
	ENTRY_BLOCK_PTR macro.
	(arm_r3_live_at_start_p): Likewise.
	(any_sibcall_could_use_r3): Remove usage of EXIT_BLOCK_PTR macro.
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.
	* config/frv/frv.c (frv_optimize_membar_global): Likewise.
	* config/alpha/alpha.c (alpha_gp_save_rtx): Remove usage of
	ENTRY_BLOCK_PTR macro.
	* config/i386/i386.c (ix86_count_insn): Likewise.
	(ix86_seh_fixup_eh_fallthru): Remove usage of EXIT_BLOCK_PTR macro.
	(ix86_pad_short_function): Likewise.
	(ix86_compute_frame_layout): Remove usage of ENTRY_BLOCK_PTR macro.
	(ix86_pad_returns): Remove usage of EXIT_BLOCK_PTR macro.
	(ix86_eax_live_at_start_p): Remove usage of ENTRY_BLOCK_PTR macro.
	(add_condition_to_bb): Remove usage of EXIT_BLOCK_PTR macro.
	(ix86_expand_epilogue): Likewise.
	* config/ia64/ia64.c (ia64_asm_unwind_emit): Likewise.
	(ia64_expand_prologue): Likewise.

From-SVN: r205055
2013-11-19 21:57:13 +00:00
Vladimir Makarov 3b6d16993b regmove.c: Remove.
2013-10-30  Vladimir Makarov  <vmakarov@redhat.com>

	* regmove.c: Remove.
	* tree-pass.h (make_pass_regmove): Remove.
	* timevar.def (TV_REGMOVE): Remove.
	* passes.def (pass_regmove): Remove.
	* opts.c (default_options_table): Remove entry for regmove.
	* doc/passes.texi: Remove regmove pass description.
	* doc/invoke.texi (-foptimize-register-move, -fregmove): Remove
	options.
	(-fdump-rtl-regmove): Ditto.
	* common.opt (foptimize-register-move, fregmove): Ignore.
	* Makefile.in (OBJS): Remove regmove.o.
	* regmove.c: Remove.
	* ira-int.h (struct ira_allocno_pref, ira_pref_t): New structure
	and type.
	(struct ira_allocno) New member allocno_prefs.
	(ALLOCNO_PREFS): New macro.
	(ira_prefs, ira_prefs_num): New external vars.
	(ira_setup_alts, ira_get_dup_out_num, ira_debug_pref): New
	prototypes.
	(ira_debug_prefs, ira_debug_allocno_prefs, ira_create_pref):
	Ditto.
	(ira_add_allocno_pref, ira_remove_pref, ira_remove_allocno_prefs):
	Ditto.
	(ira_add_allocno_copy_to_list): Remove prototype.
	(ira_swap_allocno_copy_ends_if_necessary): Ditto.
	(ira_pref_iterator): New type.
	(ira_pref_iter_init, ira_pref_iter_cond): New functions.
	(FOR_EACH_PREF): New macro.
	* ira.c (commutative_constraint_p): Move from ira-conflicts.c.
	(ira_get_dup_out_num): Ditto. Rename from get_dup_num.  Modify the
	code.
	(ira_setup_alts): New function.
	(decrease_live_ranges_number): New function.
	(ira): Call the above function.
	* ira-build.c (ira_prefs, ira_prefs_num): New global vars.
	(ira_create_allocno): Initialize allocno prefs.
	(pref_pool, pref_vec): New static vars.
	(initiate_prefs, find_allocno_pref, ira_create_pref): New
	functions.
	(add_allocno_pref_to_list, ira_add_allocno_pref, print_pref): Ditto.
	(ira_debug_pref, print_prefs, ira_debug_prefs): Ditto.
	(print_allocno_prefs, ira_debug_allocno_prefs, finish_pref): Ditto.
	(ira_remove_pref, ira_remove_allocno_prefs, finish_prefs): Ditto.
	(ira_add_allocno_copy_to_list): Make static.  Rename to
	add_allocno_copy_to_list.
	(ira_swap_allocno_copy_ends_if_necessary): Make static.  Rename to
	swap_allocno_copy_ends_if_necessary.
	(remove_unnecessary_allocnos, remove_low_level_allocnos): Call
	ira_remove_allocno_prefs.
	(ira_flattening): Ditto.
	(ira_build): Call initiate_prefs, print_prefs.
	(ira_destroy): Call finish_prefs.
	* ira-color.c (struct update_cost_record): New.
	(struct allocno_color_data): Add new member update_cost_records.
	(update_cost_record_pool): New static var.
	(init_update_cost_records, get_update_cost_record): New functions.
	(free_update_cost_record_list, finish_update_cost_records): Ditto.
	(struct update_cost_queue_elem): Add member from.
	(initiate_cost_update): Call init_update_cost_records.
	(finish_cost_update): Call finish_update_cost_records.
	(queue_update_cost, get_next_update_cost): Add new param from.
	(Update_allocno_cost, update_costs_from_allocno): New functions.
	(update_costs_from_prefs): Ditto.
	(update_copy_costs): Rename to update_costs_from_copies.
	(restore_costs_from_copies): New function.
	(update_conflict_hard_regno_costs): Don't go back.
	(assign_hard_reg): Call restore_costs_from_copies.  Add printing
	more debug info.
	(pop_allocnos): Add priniting more debug info.
	(color_allocnos): Remove prefs for conflicting hard regs.
	Call update_costs_from_prefs.
	* ira-conflicts.c (commutative_constraint_p): Move to ira.c
	(get_dup_num): Rename, modify, and move to ira.c
	(process_regs_for_copy): Add prefs.
	(add_insn_allocno_copies): Put src as first arg of
	process_regs_for_copy.  Remove dead code.  Call ira_setup_alts.
	* ira-costs.c (record_reg_classes): Modify and move code into
	record_operands_costs.
	(find_costs_and_classes): Create prefs for the hard reg of small
	reg class.
	(process_bb_node_for_hard_reg_moves): Add prefs.

2013-10-30  Vladimir Makarov  <vmakarov@redhat.com>

	* gcc.target/i386/fma_double_3.c: Use pattern for
	scan-assembler-times instead of just one insn name.
	* gcc.target/i386/fma_double_5.c: Ditto.
	* gcc.target/i386/fma_float_3.c: Ditto.
	* gcc.target/i386/fma_float_5.c: Ditto.
	* gcc.target/i386/l_fma_double_1.c: Ditto.
	* gcc.target/i386/l_fma_double_2.c: Ditto.
	* gcc.target/i386/l_fma_double_3.c: Ditto.
	* gcc.target/i386/l_fma_double_4.c: Ditto.
	* gcc.target/i386/l_fma_double_5.c: Ditto.
	* gcc.target/i386/l_fma_double_6.c: Ditto.
	* gcc.target/i386/l_fma_float_1.c: Ditto.
	* gcc.target/i386/l_fma_float_2.c: Ditto.
	* gcc.target/i386/l_fma_float_3.c: Ditto.
	* gcc.target/i386/l_fma_float_4.c: Ditto.
	* gcc.target/i386/l_fma_float_5.c: Ditto.
	* gcc.target/i386/l_fma_float_6.c: Ditto.

From-SVN: r204212
2013-10-30 14:27:25 +00:00
Lawrence Crowl 7b3b6ae441 Add uniform debug dump function names.
Add some overloaded functions that provide uniform debug dump
function names.  These names are:

  debug: the general debug dumper
  debug_verbose: for more details
  debug_raw: for the gory details
  debug_head: for the heads of declarations, e.g. function heads
  debug_body: for the bodies of declarations, e.g. function bodies

Not all types have the last four versions.

The debug functions come in two flavors, those that take pointers
to the type, and those that take references to the type.  The first
handles printing of '<nil>' for null pointers.  The second assumes
a valid reference, and prints the content.


Example uses are as follows:

  cp_token t, *p;
  debug (t);
  debug (p);

From the debugger, use

  call debug (t)


The functions sets implemented are:

debug (only)

    basic_block_def, const bitmap_head_def, cp_binding_level,
    cp_parser, cp_token, data_reference, die_struct, edge_def,
    gimple_statement_d, ira_allocno, ira_allocno_copy, live_range,
    lra_live_range, omega_pb_d, pt_solution, const rtx_def, sreal,
    tree_live_info_d, _var_map,

    vec<cp_token, va_gc>, vec<data_reference_p>, vec<ddr_p>,
    vec<rtx>, vec<tree, va_gc>,

debug and debug_raw

    simple_bitmap_def

debug and debug_verbose

    expr_def, struct loop, vinsn_def

debug, debug_raw, debug_verbose, debug_head, debug_body

    const tree_node


This patch is somewhat different from the original plan at
gcc.gnu.org/wiki/cxx-conversion/debugging-dumps.  The reason
is that gdb has an incomplete implementation of C++ call syntax;
requiring explicit specification of template arguments and explicit
specification of function arguments even when they have default
values.  So, the original plan would have required typing

  call dump <cp_token> (t, 0, 0, stderr)

which is undesireable.  Instead instead of templates, we overload
plain functions.  This adds a small burden of manually adding
the pointer version of dump for each type.  Instead of default
function arguments, we simply assume the default values.  Most of
the underlying dump functions did not use the options and indent
parameters anyway.  Several provide FILE* parameters, but we expect
debugging to use stderr anyway.  So, the explicit specification of
arguments was not as valuable as we thought initially.  Finally,
a change of name from dump to debug reflect the implicit output
to stderr.


Index: gcc/ChangeLog

2013-03-28  Lawrence Crowl  <crowl@google.com>

	* Makefile.in: Add several missing include dependences.
	(DUMPFILE_H): New.
	(test-dump.o): New.  This object is not added to any executable,
	but is present for ad-hoc testing.
	* bitmap.c
	(debug (const bitmap_head_def &)): New.
	(debug (const bitmap_head_def *)): New.
	* bitmap.h
	(extern debug (const bitmap_head_def &)): New.
	(extern debug (const bitmap_head_def *)): New.
	* cfg.c
	(debug (edge_def &)): New.
	(debug (edge_def *)): New.
	* cfghooks.c
	(debug (basic_block_def &)): New.
	(debug (basic_block_def *)): New.
	* dumpfile.h
	(dump_node (const_tree, int, FILE *)): Correct source file.
	* dwarf2out.c
	(debug (die_struct &)): New.
	(debug (die_struct *)): New.
	* dwarf2out.h
	(extern debug (die_struct &)): New.
	(extern debug (die_struct *)): New.
	* gimple-pretty-print.c
	(debug (gimple_statement_d &)): New.
	(debug (gimple_statement_d *)): New.
	* gimple-pretty-print.h
	(extern debug (gimple_statement_d &)): New.
	(extern debug (gimple_statement_d *)): New.
	* ira-build.c
	(debug (ira_allocno_copy &)): New.
	(debug (ira_allocno_copy *)): New.
	(debug (ira_allocno &)): New.
	(debug (ira_allocno *)): New.
	* ira-int.h
	(extern debug (ira_allocno_copy &)): New.
	(extern debug (ira_allocno_copy *)): New.
	(extern debug (ira_allocno &)): New.
	(extern debug (ira_allocno *)): New.
	* ira-lives.c
	(debug (live_range &)): New.
	(debug (live_range *)): New.
	* lra-int.h
	(debug (lra_live_range &)): New.
	(debug (lra_live_range *)): New.
	* lra-lives.c
	(debug (lra_live_range &)): New.
	(debug (lra_live_range *)): New.
	* omega.c
	(debug (omega_pb_d &)): New.
	(debug (omega_pb_d *)): New.
	* omega.h
	(extern debug (omega_pb_d &)): New.
	(extern debug (omega_pb_d *)): New.
	* print-rtl.c
	(debug (const rtx_def &)): New.
	(debug (const rtx_def *)): New.
	* print-tree.c
	(debug_tree (tree): Move within file.
	(debug_raw (const tree_node &)): New.
	(debug_raw (const tree_node *)): New.
	(dump_tree_via_hooks (const tree_node *, int)): New.
	(debug (const tree_node &)): New.
	(debug (const tree_node *)): New.
	(debug_verbose (const tree_node &)): New.
	(debug_verbose (const tree_node *)): New.
	(debug_head (const tree_node &)): New.
	(debug_head (const tree_node *)): New.
	(debug_body (const tree_node &)): New.
	(debug_body (const tree_node *)): New.
	(debug_vec_tree (tree): Move and reimplement in terms of dump.
	(debug (vec<tree, va_gc> &)): New.
	(debug (vec<tree, va_gc> *)): New.
	* rtl.h
	(extern debug (const rtx_def &)): New.
	(extern debug (const rtx_def *)): New.
	* sbitmap.c
	(debug_raw (simple_bitmap_def &)): New.
	(debug_raw (simple_bitmap_def *)): New.
	(debug (simple_bitmap_def &)): New.
	(debug (simple_bitmap_def *)): New.
	* sbitmap.h
	(extern debug (simple_bitmap_def &)): New.
	(extern debug (simple_bitmap_def *)): New.
	(extern debug_raw (simple_bitmap_def &)): New.
	(extern debug_raw (simple_bitmap_def *)): New.
	* sel-sched-dump.c
	(debug (vinsn_def &)): New.
	(debug (vinsn_def *)): New.
	(debug_verbose (vinsn_def &)): New.
	(debug_verbose (vinsn_def *)): New.
	(debug (expr_def &)): New.
	(debug (expr_def *)): New.
	(debug_verbose (expr_def &)): New.
	(debug_verbose (expr_def *)): New.
	(debug (vec<rtx> &)): New.
	(debug (vec<rtx> *)): New.
	* sel-sched-dump.h
	(extern debug (vinsn_def &)): New.
	(extern debug (vinsn_def *)): New.
	(extern debug_verbose (vinsn_def &)): New.
	(extern debug_verbose (vinsn_def *)): New.
	(extern debug (expr_def &)): New.
	(extern debug (expr_def *)): New.
	(extern debug_verbose (expr_def &)): New.
	(extern debug_verbose (expr_def *)): New.
	(extern debug (vec<rtx> &)): New.
	(extern debug (vec<rtx> *)): New.
	* sel-sched-ir.h
	(_list_iter_cond_expr): Make inline instead of static.
	* sreal.c
	(debug (sreal &)): New.
	(debug (sreal *)): New.
	* sreal.h
	(extern debug (sreal &)): New.
	(extern debug (sreal *)): New.
	* tree.h
	(extern debug_raw (const tree_node &)): New.
	(extern debug_raw (const tree_node *)): New.
	(extern debug (const tree_node &)): New.
	(extern debug (const tree_node *)): New.
	(extern debug_verbose (const tree_node &)): New.
	(extern debug_verbose (const tree_node *)): New.
	(extern debug_head (const tree_node &)): New.
	(extern debug_head (const tree_node *)): New.
	(extern debug_body (const tree_node &)): New.
	(extern debug_body (const tree_node *)): New.
	(extern debug (vec<tree, va_gc> &)): New.
	(extern debug (vec<tree, va_gc> *)): New.
	* tree-cfg.c
	(debug (struct loop &)): New.
	(debug (struct loop *)): New.
	(debug_verbose (struct loop &)): New.
	(debug_verbose (struct loop *)): New.
	* tree-dump.c: Add header dependence.
	* tree-flow.h
	(extern debug (struct loop &)): New.
	(extern debug (struct loop *)): New.
	(extern debug_verbose (struct loop &)): New.
	(extern debug_verbose (struct loop *)): New.
	* tree-data-ref.c
	(debug (data_reference &)): New.
	(debug (data_reference *)): New.
	(debug (vec<data_reference_p> &)): New.
	(debug (vec<data_reference_p> *)): New.
	(debug (vec<ddr_p> &)): New.
	(debug (vec<ddr_p> *)): New.
	* tree-data-ref.h
	(extern debug (data_reference &)): New.
	(extern debug (data_reference *)): New.
	(extern debug (vec<data_reference_p> &)): New.
	(extern debug (vec<data_reference_p> *)): New.
	(extern debug (vec<ddr_p> &)): New.
	(extern debug (vec<ddr_p> *)): New.
	* tree-ssa-alias.c
	(debug (pt_solution &)): New.
	(debug (pt_solution *)): New.
	* tree-ssa-alias.h
	(extern debug (pt_solution &)): New.
	(extern debug (pt_solution *)): New.
	* tree-ssa-alias.c
	(debug (_var_map &)): New.
	(debug (_var_map *)): New.
	(debug (tree_live_info_d &)): New.
	(debug (tree_live_info_d *)): New.
	* tree-ssa-alias.h
	(extern debug (_var_map &)): New.
	(extern debug (_var_map *)): New.
	(extern debug (tree_live_info_d &)): New.
	(extern debug (tree_live_info_d *)): New.

Index: gcc/cp/ChangeLog

2013-03-28  Lawrence Crowl  <crowl@google.com>

	* Make-lang.in
	(CXX_PARSER_H): Add header dependence.
	* cp-tree.h
	(extern debug (cp_binding_level &)): New.
	(extern debug (cp_binding_level *)): New.
	* name-lookup.h
	(debug (cp_binding_level &)): New.
	(debug (cp_binding_level *)): New.
	* parser.c
	(debug (cp_parser &)): New.
	(debug (cp_parser *)): New.
	(debug (cp_token &)): New.
	(debug (cp_token *)): New.
	(debug (vec<cp_token, va_gc> &)): New.
	(debug (vec<cp_token, va_gc> *)): New.
	* parser.c: Add header dependence.
	(extern debug (cp_parser &)): New.
	(extern debug (cp_parser *)): New.
	(extern debug (cp_token &)): New.
	(extern debug (cp_token *)): New.
	(extern debug (vec<cp_token, va_gc> &)): New.
	(extern debug (vec<cp_token, va_gc> *)): New.

From-SVN: r197224
2013-03-29 03:42:21 +00:00
Richard Biener 661bc682bc cfgloop.c (verify_loop_structure): Properly handle a loop exiting to another loop header.
2013-02-08  Richard Biener  <rguenther@suse.de>

	* cfgloop.c (verify_loop_structure): Properly handle
	a loop exiting to another loop header.
	* ira-int.h (ira_loops): Remove.
	* ira.c (ira_loops): Remove.
	(ira): Use loop_optimizer_init and loop_optimizer_finalize.
	(do_reload): Use loop_optimizer_finalize.
	* ira-build.c (create_loop_tree_nodes): Use get_loops and
	number_of_loops to access the loop tree.
	(more_one_region_p): Likewise.
	(finish_loop_tree_nodes): Likewise.
	(rebuild_regno_allocno_maps): Likewise.
	(mark_loops_for_removal): Likewise.
	(mark_all_loops_for_removal): Likewise.
	(remove_unnecessary_regions): Likewise.
	(ira_build): Likewise.
	* ira-emit.c (setup_entered_from_non_parent_p): Likewise.

From-SVN: r195877
2013-02-08 09:09:38 +00:00
Richard Sandiford d1e082c2c2 Update copyright years in gcc/
From-SVN: r195098
2013-01-10 20:38:27 +00:00
Jakub Jelinek 90d04a445c Update Copyright years for files modified in 2011 and/or 2012.
From-SVN: r194903
2013-01-04 13:49:55 +01:00
Diego Novillo 9771b26396 This patch rewrites the old VEC macro-based interface into a new one based on the template class 'vec'.
This patch rewrites the old VEC macro-based interface into a new one
based on the template class 'vec'.  The user-visible changes are
described in http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec.

I have tested the patch pretty extensively:

- Regular bootstraps on x86_64, ppc, ia64, sparc and hppa.
- Bootstraps with --enable-checking=release
- Bootstraps with --enable-checking=gc,gcac
- Basic builds on all targets (using contrib/config-list.mk).

We no longer access the vectors via VEC_* macros.  The pattern is
"VEC_operation (T, A, V, args)" becomes "V.operation (args)".

The only thing I could not do is create proper ctors and dtors for the
vec class.  Since these vectors are stored in unions, we
have to keep them as PODs (C++03 does not allow non-PODs in unions).

This means that creation and destruction must be explicit.  There is a
new method vec<type, allocation, layout>::create() and another vec<type,
allocation, layout>::destroy() to allocate the internal vector.

For vectors that must be pointers, there is a family of free functions
that implement the operations that need to tolerate NULL vectors.
These functions all start with the prefix 'vec_safe_'.  See the wiki
page for details.

The gengtype change removes the special handling for VEC() that used
to exist in gengtype. Additionally, it allows gengtype to recognize
templates of more than one argument and introduces the concept of an
undefined type (useful for template arguments that may or may not be
types).

When a TYPE_UNDEFINED is reached, gengtype will ignore it if it
happens inside a type marked with GTY((user)).  Otherwise, it will
emit an error.

Finally, gengtype rejects root types marked GTY((user)) that are not
first class pointers.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	VEC API overhaul (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)

	* vec.c (register_overhead): Convert it into
	member function of vec_prefix.
	(release_overhead): Likewise.
	(calculate_allocation): Likewise.
	(vec_heap_free): Remove.
	(vec_gc_o_reserve_1): Remove.
	(vec_heap_o_reserve_1): Remove.
	(vec_stack_o_reserve_1): Remove.
	(vec_stack_o_reserve_exact): Remove.
	(register_stack_vec): New.
	(stack_vec_register_index): New.
	(unregister_stack_vec): New.
	(vec_assert_fail): Remove.
	* vec.h: Conditionally include ggc.h.  Document conditional
	hackery.
	Update top-level documentation.
	(ALONE_VEC_CHECK_INFO): Remove.
	(VEC_CHECK_INFO): Remove.
	(ALONE_VEC_CHECK_DECL): Remove.
	(VEC_CHECK_DECL): Remove.
	(ALONE_VEC_CHECK_PASS): Remove.
	(VEC_CHECK_PASS): Remove.
	(VEC_ASSERT): Remove.
	(vec_prefix): Add friends va_gc, va_gc_atomic, va_heap and
	va_stack.
	Mark fields alloc_ and num_ as protected.
	(struct vec_t): Remove.  Remove all function members.
	(struct vl_embed): Declare.
	(struct vl_ptr): Declare.
	(free): Remove.
	(reserve_exact): Remove.
	(reserve): Remove.
	(safe_splice): Remove.
	(safe_push): Remove.
	(safe_grow): Remove.
	(safe_grow_cleared): Remove.
	(safe_insert): Remove.
	(DEF_VEC_I): Remove.
	(DEF_VEC_ALLOC_I): Remove.
	(DEF_VEC_P): Remove.
	(DEF_VEC_ALLOC_P): Remove.
	(DEF_VEC_O): Remove.
	(DEF_VEC_ALLOC_O): Remove.
	(DEF_VEC_ALLOC_P_STACK): Remove.
	(DEF_VEC_ALLOC_O_STACK): Remove.
	(DEF_VEC_ALLOC_I_STACK): Remove.
	(DEF_VEC_A): Remove.
	(DEF_VEC_ALLOC_A): Remove.
	(vec_stack_p_reserve_exact_1): Remove.
	(vec_stack_o_reserve): Remove.
	(vec_stack_o_reserve_exact): Remove.
	(VEC_length): Remove.
	(VEC_empty): Remove.
	(VEC_address): Remove.
	(vec_address): Remove.
	(VEC_last): Remove.
	(VEC_index): Remove.
	(VEC_iterate): Remove.
	(VEC_embedded_size): Remove.
	(VEC_embedded_init): Remove.
	(VEC_free): Remove.
	(VEC_copy): Remove.
	(VEC_space): Remove.
	(VEC_reserve): Remove.
	(VEC_reserve_exact): Remove.
	(VEC_splice): Remove.
	(VEC_safe_splice): Remove.
	(VEC_quick_push): Remove.
	(VEC_safe_push): Remove.
	(VEC_pop): Remove.
	(VEC_truncate): Remove.
	(VEC_safe_grow): Remove.
	(VEC_replace): Remove.
	(VEC_quick_insert): Remove.
	(VEC_safe_insert): Remove.
	(VEC_ordered_remove): Remove.
	(VEC_unordered_remove): Remove.
	(VEC_block_remove): Remove.
	(VEC_lower_bound): Remove.
	(VEC_alloc): Remove.
	(VEC_qsort): Remove.

	(va_heap): Declare.
	(va_heap::default_layout): New typedef to vl_ptr.
	(va_heap::reserve): New.
	(va_heap::release): New.
	(va_gc): Declare.
	(va_gc::default_layout): New typedef to vl_embed.
	(va_gc::reserve): New.
	(va_gc::release): New.
	(va_gc_atomic): Declare.  Inherit from va_gc.
	(va_stack): Declare.
	(va_stack::default_layout): New typedef to vl_ptr.
	(va_stack::alloc): New.
	(va_stack::reserve): New.
	(va_stack::release): New.
	(register_stack_vec): Declare.
	(stack_vec_register_index): Declare.
	(unregister_stack_vec): Declare.

	(vec<T, A = va_heap, L = typename A::default_layout>): Declare
	empty vec template.
	(vec<T, A, vl_embed>): Partial specialization for embedded
	layout.
	(vec<T, A, vl_embed>::allocated): New.
	(vec<T, A, vl_embed>::length): New.
	(vec<T, A, vl_embed>::is_empty): New.
	(vec<T, A, vl_embed>::address): New.
	(vec<T, A, vl_embed>::operator[]): New.
	(vec<T, A, vl_embed>::last New.
	(vec<T, A, vl_embed>::space): New.
	(vec<T, A, vl_embed>::iterate): New.
	(vec<T, A, vl_embed>::iterate): New.
	(vec<T, A, vl_embed>::copy): New.
	(vec<T, A, vl_embed>::splice): New.
	(vec<T, A, vl_embed>::quick_push New.
	(vec<T, A, vl_embed>::pop New.
	(vec<T, A, vl_embed>::truncate): New.
	(vec<T, A, vl_embed>::quick_insert): New.
	(vec<T, A, vl_embed>::ordered_remove): New.
	(vec<T, A, vl_embed>::unordered_remove): New.
	(vec<T, A, vl_embed>::block_remove): New.
	(vec<T, A, vl_embed>::qsort): New.
	(vec<T, A, vl_embed>::lower_bound): New.
	(vec<T, A, vl_embed>::embedded_size): New.
	(vec<T, A, vl_embed>::embedded_init): New.
	(vec<T, A, vl_embed>::quick_grow): New.
	(vec<T, A, vl_embed>::quick_grow_cleared): New.
	(vec_safe_space): New.
	(vec_safe_length): New.
	(vec_safe_address): New.
	(vec_safe_is_empty): New.
	(vec_safe_reserve): New.
	(vec_safe_reserve_exact): New.
	(vec_alloc): New.
	(vec_free): New.
	(vec_safe_grow): New.
	(vec_safe_grow_cleared): New.
	(vec_safe_iterate): New.
	(vec_safe_push): New.
	(vec_safe_insert): New.
	(vec_safe_truncate): New.
	(vec_safe_copy): New.
	(vec_safe_splice): New.

	(vec<T, A, vl_ptr>): New partial specialization for the space
	efficient layout.
	(vec<T, A, vl_ptr>::exists): New.
	(vec<T, A, vl_ptr>::is_empty): New.
	(vec<T, A, vl_ptr>::length): New.
	(vec<T, A, vl_ptr>::address): New.
	(vec<T, A, vl_ptr>::operator[]): New.
	(vec<T, A, vl_ptr>::operator!=): New.
	(vec<T, A, vl_ptr>::operator==): New.
	(vec<T, A, vl_ptr>::last): New.
	(vec<T, A, vl_ptr>::space): New.
	(vec<T, A, vl_ptr>::iterate): New.
	(vec<T, A, vl_ptr>::copy): New.
	(vec<T, A, vl_ptr>::reserve): New.
	(vec<T, A, vl_ptr>::reserve_exact): New.
	(vec<T, A, vl_ptr>::splice): New.
	(vec<T, A, vl_ptr>::safe_splice): New.
	(vec<T, A, vl_ptr>::quick_push): New.
	(vec<T, A, vl_ptr>::safe_push): New.
	(vec<T, A, vl_ptr>::pop): New.
	(vec<T, A, vl_ptr>::truncate): New.
	(vec<T, A, vl_ptr>::safe_grow): New.
	(vec<T, A, vl_ptr>::safe_grow_cleared): New.
	(vec<T, A, vl_ptr>::quick_grow): New.
	(vec<T, A, vl_ptr>::quick_grow_cleared): New.
	(vec<T, A, vl_ptr>::quick_insert): New.
	(vec<T, A, vl_ptr>::safe_insert): New.
	(vec<T, A, vl_ptr>::ordered_remove): New.
	(vec<T, A, vl_ptr>::unordered_remove): New.
	(vec<T, A, vl_ptr>::block_remove): New.
	(vec<T, A, vl_ptr>::qsort): New.
	(vec<T, A, vl_ptr>::lower_bound): New.
	(vec_stack_alloc): Define.
	(FOR_EACH_VEC_SAFE_ELT): Define.
	* vecir.h: Remove.  Update all users.
	* vecprim.h: Remove.  Update all users.
	Move uchar to coretypes.h.

	* Makefile.in (VEC_H): Add $(GGC_H).
	Remove vecir.h and vecprim.h dependencies everywhere.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	* gengtype-lex.l (VEC): Remove.
	Add characters in the set [\!\>\.-].
	* gengtype-parse.c (token_names): Remove "VEC".
	(require_template_declaration): Remove handling of VEC_TOKEN.
	(type): Likewise.
	Call create_user_defined_type when parsing GTY((user)).
	* gengtype-state.c (type_lineloc): handle TYPE_UNDEFINED.
	(write_state_undefined_type): New.
	(write_state_type): Call write_state_undefined_type for
	TYPE_UNDEFINED.
	(read_state_type): Call read_state_undefined_type for
	TYPE_UNDEFINED.
	* gengtype.c (dbgprint_count_type_at): Handle TYPE_UNDEFINED.
	(create_user_defined_type): Make extern.
	(type_for_name): Factor out of resolve_typedef.
	(create_undefined_type): New
	(resolve_typedef): Call it when we cannot find a previous
	typedef and the type is not a template.
	(find_structure): Accept TYPE_UNDEFINED.
	(set_gc_used_type): Add argument ALLOWED_UNDEFINED_TYPES,
	default to false.
	Emit an error for TYPE_UNDEFINED unless LEVEL is GC_UNUSED or
	ALLOWED_UNDEFINED_TYPES is set.
	Set ALLOWED_UNDEFINED_TYPES to true for TYPE_USER_STRUCT.
	(filter_type_name): Accept templates with more than one
	argument.
	(output_mangled_typename): Handle TYPE_UNDEFINED
	(walk_type): Likewise.
	(write_types_process_field): Likewise.
	(write_func_for_structure): If CHAIN_NEXT is set, ORIG_S
	should not be a user-defined type.
	(write_types_local_user_process_field): Handle TYPE_ARRAY,
	TYPE_NONE and TYPE_UNDEFINED.
	(write_types_local_process_field): Likewise.
	(contains_scalar_p): Return 0 for TYPE_USER_STRUCT.
	(write_root): Reject user-defined types that are not pointers.
	Handle TYPE_NONE, TYPE_UNDEFINED, TYPE_UNION, TYPE_LANG_STRUCT
	and TYPE_PARAM_STRUCT.
	(output_typename): Handle TYPE_NONE, TYPE_UNDEFINED, and
	TYPE_ARRAY.
	(dump_typekind): Handle TYPE_UNDEFINED.
	* gengtype.h (enum typekind): Add TYPE_UNDEFINED.
	(create_user_defined_type): Declare.
	(enum gty_token): Remove VEC_TOKEN.

2012-11-16  Diego Novillo  <dnovillo@google.com>

	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)

	* coretypes.h (uchar): Define.
	* alias.c: Use new vec API in vec.h.
	* asan.c: Likewise.
	* attribs.c: Likewise.
	* basic-block.h: Likewise.
	* bb-reorder.c: Likewise.
	* builtins.c: Likewise.
	* calls.c: Likewise.
	* cfg.c: Likewise.
	* cfganal.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgexpand.c: Likewise.
	* cfghooks.c: Likewise.
	* cfghooks.h: Likewise.
	* cfgloop.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopanal.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* cgraph.c: Likewise.
	* cgraph.h: Likewise.
	* cgraphclones.c: Likewise.
	* cgraphunit.c: Likewise.
	* combine.c: Likewise.
	* compare-elim.c: Likewise.
	* coverage.c: Likewise.
	* cprop.c: Likewise.
	* data-streamer.h: Likewise.
	* dbxout.c: Likewise.
	* dce.c: Likewise.
	* df-core.c: Likewise.
	* df-problems.c: Likewise.
	* df-scan.c: Likewise.
	* dominance.c: Likewise.
	* domwalk.c: Likewise.
	* domwalk.h: Likewise.
	* dse.c: Likewise.
	* dwarf2cfi.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarf2out.h: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* fwprop.c: Likewise.
	* gcc.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* genextract.c: Likewise.
	* genopinit.c: Likewise
	* ggc-common.c: Likewise.
	* ggc.h: Likewise.
	* gimple-low.c: Likewise.
	* gimple-ssa-strength-reduction.c: Likewise.
	* gimple-streamer-in.c: Likewise.
	* gimple.c: Likewise.
	* gimple.h: Likewise.
	* gimplify.c: Likewise.
	* graph.c: Likewise.
	* graphds.c: Likewise.
	* graphds.h: Likewise.
	* graphite-blocking.c: Likewise.
	* graphite-clast-to-gimple.c: Likewise.
	* graphite-dependences.c: Likewise.
	* graphite-interchange.c: Likewise.
	* graphite-optimize-isl.c: Likewise.
	* graphite-poly.c: Likewise.
	* graphite-poly.h: Likewise.
	* graphite-scop-detection.c: Likewise.
	* graphite-scop-detection.h: Likewise.
	* graphite-sese-to-poly.c: Likewise.
	* graphite.c: Likewise.
	* godump.c: Likewise.
	* haifa-sched.c: Likewise.
	* hw-doloop.c: Likewise.
	* hw-doloop.h: Likewise.
	* ifcvt.c: Likewise.
	* insn-addr.h: Likewise.
	* ipa-cp.c: Likewise.
	* ipa-inline-analysis.c: Likewise.
	* ipa-inline-transform.c: Likewise.
	* ipa-inline.c: Likewise.
	* ipa-inline.h: Likewise.
	* ipa-prop.c: Likewise.
	* ipa-prop.h: Likewise.
	* ipa-pure-const.c: Likewise.
	* ipa-ref-inline.h: Likewise.
	* ipa-ref.c: Likewise.
	* ipa-ref.h: Likewise.
	* ipa-reference.c: Likewise.
	* ipa-split.c: Likewise.
	* ipa-utils.c: Likewise.
	* ipa-utils.h: Likewise.
	* ipa.c: Likewise.
	* ira-build.c: Likewise.
	* ira-color.c: Likewise.
	* ira-emit.c: Likewise.
	* ira-int.h: Likewise.
	* ira.c: Likewise.
	* loop-invariant.c: Likewise.
	* loop-unroll.c: Likewise.
	* lower-subreg.c: Likewise.
	* lra-lives.c: Likewise.
	* lra.c: Likewise.
	* lto-cgraph.c: Likewise.
	* lto-section-out.c: Likewise.
	* lto-streamer-in.c: Likewise.
	* lto-streamer-out.c: Likewise.
	* lto-streamer.h: Likewise.
	* lto-symtab.c: Likewise.
	* mcf.c: Likewise.
	* modulo-sched.c: Likewise.
	* omp-low.c: Likewise.
	* opts-common.c: Likewise.
	* opts-global.c: Likewise.
	* opts.c: Likewise.
	* opts.h: Likewise.
	* passes.c: Likewise.
	* predict.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* profile.h: Likewise.
	* read-rtl.c: Likewise.
	* ree.c: Likewise.
	* reg-stack.c: Likewise.
	* regrename.c: Likewise.
	* regrename.h: Likewise.
	* reload.c: Likewise.
	* reload.h: Likewise.
	* reload1.c: Likewise.
	* rtl.h: Likewise.
	* sched-deps.c: Likewise.
	* sched-int.h: Likewise.
	* sdbout.c: Likewise.
	* sel-sched-dump.c: Likewise.
	* sel-sched-ir.c: Likewise.
	* sel-sched-ir.h: Likewise.
	* sel-sched.c: Likewise.
	* sese.c: Likewise.
	* sese.h: Likewise.
	* statistics.h: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* store-motion.c: Likewise.
	* tlink.c: Likewise.
	* toplev.c: Likewise.
	* trans-mem.c: Likewise.
	* tree-browser.c: Likewise.
	* tree-call-cdce.c: Likewise.
	* tree-cfg.c: Likewise.
	* tree-cfgcleanup.c: Likewise.
	* tree-chrec.c: Likewise.
	* tree-chrec.h: Likewise.
	* tree-complex.c: Likewise.
	* tree-data-ref.c: Likewise.
	* tree-data-ref.h: Likewise.
	* tree-dfa.c: Likewise.
	* tree-diagnostic.c: Likewise.
	* tree-dump.c: Likewise.
	* tree-eh.c: Likewise.
	* tree-emutls.c: Likewise.
	* tree-flow.h: Likewise.
	* tree-if-conv.c: Likewise.
	* tree-inline.c: Likewise.
	* tree-inline.h: Likewise.
	* tree-into-ssa.c: Likewise.
	* tree-iterator.c: Likewise.
	* tree-loop-distribution.c: Likewise.
	* tree-mudflap.c: Likewise.
	* tree-optimize.c: Likewise.
	* tree-outof-ssa.c: Likewise.
	* tree-parloops.c: Likewise.
	* tree-phinodes.c: Likewise.
	* tree-predcom.c: Likewise.
	* tree-pretty-print.c: Likewise.
	* tree-scalar-evolution.c: Likewise.
	* tree-sra.c: Likewise.
	* tree-ssa-address.c: Likewise.
	* tree-ssa-alias.c: Likewise.
	* tree-ssa-ccp.c: Likewise.
	* tree-ssa-coalesce.c: Likewise.
	* tree-ssa-dce.c: Likewise.
	* tree-ssa-dom.c: Likewise.
	* tree-ssa-forwprop.c: Likewise.
	* tree-ssa-live.c: Likewise.
	* tree-ssa-live.h: 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-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-reassoc.c: Likewise.
	* tree-ssa-sccvn.c: Likewise.
	* tree-ssa-sccvn.h: Likewise.
	* tree-ssa-strlen.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-ssanames.c: Likewise.
	* tree-stdarg.c: Likewise.
	* tree-streamer-in.c: Likewise.
	* tree-streamer-out.c: Likewise.
	* tree-streamer.c: Likewise.
	* tree-streamer.h: Likewise.
	* tree-switch-conversion.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.c: Likewise.
	* tree-vectorizer.h: Likewise.
	* tree-vrp.c: Likewise.
	* tree.c: Likewise.
	* tree.h: Likewise.
	* value-prof.c: Likewise.
	* value-prof.h: Likewise.
	* var-tracking.c: Likewise.
	* varasm.c: Likewise.
	* varpool.c: Likewise.
	* vmsdbgout.c: Likewise.
	* config/bfin/bfin.c: Likewise.
	* config/c6x/c6x.c: Likewise.
	* config/darwin.c: Likewise.
	* config/i386/i386.c: Likewise.
	* config/ia64/ia64.c: Likewise.
	* config/mep/mep.c: Likewise.
	* config/mips/mips.c: Likewise.
	* config/pa/pa.c: Likewise.
	* config/rs6000/rs6000-c.c: Likewise.
	* config/rs6000/rs6000.c: Likewise.
	* config/rx/rx.c: Likewise.
	* config/spu/spu-c.c: Likewise.
	* config/vms/vms.c: Likewise.
	* config/vxworks.c: Likewise.
	* config/epiphany/resolve-sw-modes.c: Likewise.

From-SVN: r193595
2012-11-17 21:54:30 -05:00
Vladimir Makarov 55a2c3226a dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg.
2012-10-23  Vladimir Makarov  <vmakarov@redhat.com>

	* dbxout.c (dbxout_symbol_location): Pass new argument to
	alter_subreg.
	* dwarf2out.c: Include ira.h and lra.h.
	(based_loc_descr, compute_frame_pointer_to_fb_displacement): Use
	lra_eliminate_regs for LRA instead of eliminate_regs.
	* expr.c (emit_move_insn_1): Pass an additional argument to
	emit_move_via_integer.  Use emit_move_via_integer for LRA only if
	the insn is recognized.
	* emit-rtl.c (gen_rtx_REG): Add lra_in_progress.
	(validate_subreg): Don't check offset for LRA and floating point
	modes.
	* final.c (final_scan_insn, cleanup_subreg_operands): Pass new
	argument to alter_subreg.
	(walk_alter_subreg, output_operand): Ditto.
	(alter_subreg): Add new argument.
	* gcse.c (calculate_bb_reg_pressure): Add parameter to
	ira_setup_eliminable_regset call.
	* ira.c: Include lra.h.
	(ira_init_once, ira_init, ira_finish_once): Call lra_start_once,
	lra_init, lra_finish_once in anyway.
	(ira_setup_eliminable_regset): Add parameter.  Remove need_fp.
	Call lra_init_elimination and mark HARD_FRAME_POINTER_REGNUM as
	living forever if frame_pointer_needed.
	(setup_reg_class_relations): Set up ira_reg_class_subset.
	(ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove.
	(find_reg_equiv_invariant_const): Ditto.
	(setup_reg_renumber): Use ira_equiv_no_lvalue_p instead of
	ira_reg_equiv_invariant_p.  Skip caps for LRA.
	(setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New
	functions.
	(ira_reg_equiv_len, ira_reg_equiv): New externals.
	(ira_reg_equiv): New.
	(ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New
	functions.
	(no_equiv, update_equiv_regs): Use ira_reg_equiv instead of
	reg_equiv_init.
	(setup_reg_equiv): New function.
	(ira_use_lra_p): New global.
	(ira): Set up lra_simple_p and ira_conflicts_p.  Set up and
	restore flag_caller_saves and flag_ira_region.  Move
	initialization of ira_obstack and ira_bitmap_obstack upper.  Call
	init_reg_equiv, setup_reg_equiv, and setup_reg_equiv_init instead
	of initialization of ira_reg_equiv_len, ira_reg_equiv_invariant_p,
	and ira_reg_equiv_const.  Call ira_setup_eliminable_regset with a
	new argument.  Don't flatten IRA IRA for LRA.  Don't reassign
	conflict allocnos for LRA. Call finish_reg_equiv.
        (do_reload): Prepare code for LRA call.  Call LRA.
	* ira.h (ira_use_lra_p): New external.
	(struct target_ira): Add members x_ira_class_subset_p
	x_ira_reg_class_subset, and x_ira_reg_classes_intersect_p.
	(ira_class_subset_p, ira_reg_class_subset): New macros.
	(ira_reg_classes_intersect_p): New macro.
	(struct ira_reg_equiv): New.
	(ira_setup_eliminable_regset): Add an argument.
	(ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New
	prototypes.
	* ira-color.c (color_pass, move_spill_restore, coalesce_allocnos):
	Use ira_equiv_no_lvalue_p.
	(coalesce_spill_slots, ira_sort_regnos_for_alter_reg): Ditto.
	* ira-emit.c (ira_create_new_reg): Call ira_expand_reg_equiv.
	(generate_edge_moves, change_loop) Use ira_equiv_no_lvalue_p.
	(emit_move_list): Simplify code.  Call
	ira_update_equiv_info_by_shuffle_insn.  Use ira_reg_equiv instead
	of ira_reg_equiv_invariant_p and ira_reg_equiv_const.  Change
	assert.
	* ira-int.h (struct target_ira_int): Remove x_ira_class_subset_p
	and x_ira_reg_classes_intersect_p.
	(ira_class_subset_p, ira_reg_classes_intersect_p): Remove.
	(ira_reg_equiv_len, ira_reg_equiv_invariant_p): Ditto.
	(ira_reg_equiv_const): Ditto.
	(ira_equiv_no_lvalue_p): New function.
	* jump.c (true_regnum): Always use hard_regno for subreg_get_info
	when lra is in progress.
	* haifa-sched.c (sched_init): Pass new argument to
	ira_setup_eliminable_regset.
	* loop-invariant.c (calculate_loop_reg_pressure): Pass new
	argument to ira_setup_eliminable_regset.
	* lra.h: New.
	* lra-int.h: Ditto.
	* lra.c: Ditto.
	* lra-assigns.c: Ditto.
	* lra-constraints.c: Ditto.
	* lra-coalesce.c: Ditto.
	* lra-eliminations.c: Ditto.
	* lra-lives.c: Ditto.
	* lra-spills.c: Ditto.
	* Makefile.in (LRA_INT_H): New.
	(OBJS): Add lra.o, lra-assigns.o, lra-coalesce.o,
	lra-constraints.o, lra-eliminations.o, lra-lives.o, and
	lra-spills.o.
	(dwarf2out.o): Add dependence on ira.h and lra.h.
	(ira.o): Add dependence on lra.h.
	(lra.o, lra-assigns.o, lra-coalesce.o, lra-constraints.o): New
	entries.
	(lra-eliminations.o, lra-lives.o, lra-spills.o): Ditto.
	* output.h (alter_subreg): Add new argument.
	* rtlanal.c (simplify_subreg_regno): Permit mode changes for LRA.
	Permit ARG_POINTER_REGNUM and STACK_POINTER_REGNUM for LRA.
	* recog.c (general_operand, register_operand): Accept paradoxical
	FLOAT_MODE subregs for LRA.
	(scratch_operand): Accept pseudos for LRA.
	* rtl.h (lra_in_progress): New external.
	(debug_bb_n_slim, debug_bb_slim, print_value_slim): New
	prototypes.
	(debug_rtl_slim, debug_insn_slim): Ditto.
	* sdbout.c (sdbout_symbol): Pass new argument to alter_subreg.
	* sched-vis.c (print_value_slim): New.
	* target.def (lra_p): New hook.
	(register_priority): Ditto.
	(different_addr_displacement_p): Ditto.
	(spill_class): Ditto.
	* target-globals.h (this_target_lra_int): New external.
	(target_globals): New member lra_int.
	(restore_target_globals): Restore this_target_lra_int.
	* target-globals.c: Include lra-int.h.
	(default_target_globals): Add &default_target_lra_int.
	* targhooks.c (default_lra_p): New function.
	(default_register_priority): Ditto.
	(default_different_addr_displacement_p): Ditto.
	* targhooks.h (default_lra_p): Declare.
	(default_register_priority): Ditto.
	(default_different_addr_displacement_p): Ditto.
	* timevar.def (TV_LRA, TV_LRA_ELIMINATE, TV_LRA_INHERITANCE): New.
	(TV_LRA_CREATE_LIVE_RANGES, TV_LRA_ASSIGN, TV_LRA_COALESCE): New.
	* config/arm/arm.c (load_multiple_sequence): Pass new argument toOB
	alter_subreg.
	(store_multiple_sequence): Ditto.
	* config/i386/i386.h (enum ix86_tune_indices): Add
	X86_TUNE_GENERAL_REGS_SSE_SPILL.
	(TARGET_GENERAL_REGS_SSE_SPILL): New macro.
	* config/i386/i386.c (initial_ix86_tune_features): Set up
	X86_TUNE_GENERAL_REGS_SSE_SPILL for m_COREI7 and m_CORE2I7.
	(ix86_lra_p, ix86_register_priority): New functions.
	(ix86_secondary_reload): Add NON_Q_REGS, SIREG, DIREG.
	(inline_secondary_memory_needed): Change assert.
	(ix86_spill_class): New function.
	(TARGET_LRA_P, TARGET_REGISTER_BANK, TARGET_SPILL_CLASS): New
	macros.
	* config/m68k/m68k.c (emit_move_sequence): Pass new argument to
	alter_subreg.
	* config/m32r/m32r.c (gen_split_move_double): Ditto.
	* config/pa/pa.c (pa_emit_move_sequence): Ditto.
	* config/sh/sh.md: Ditto.
	* config/v850/v850.c (v850_reorg): Ditto.
	* config/xtensa/xtensa.c (fixup_subreg_mem): Ditto.
	* doc/md.texi: Add new interpretation of hint * for LRA.
	* doc/passes.texi: Describe LRA pass.
	* doc/tm.texi.in: Add TARGET_LRA_P, TARGET_REGISTER_PRIORITY,
	TARGET_DIFFERENT_ADDR_DISPLACEMENT_P, and TARGET_SPILL_CLASS.
	* doc/tm.texi: Update.

From-SVN: r192719
2012-10-23 15:51:41 +00:00
Richard Sandiford a2c19e9343 ira-int.h (target_ira_int): Add x_ira_useful_class_mode_regs.
gcc/
	* ira-int.h (target_ira_int): Add x_ira_useful_class_mode_regs.
	(ira_useful_class_mode_regs): New macro.
	* ira.c (clarify_prohibited_class_mode_regs): Set up
	ira_useful_class_mode_regs.
	* ira-color.c (setup_profitable_hard_regs): Use it to initialise
	profitable_hard_regs.

From-SVN: r191996
2012-10-02 19:34:49 +00:00
Vladimir Makarov 165f639cea ira-int.h (struct target_ira_int): Add member x_ira_uniform_class_p.
2012-06-04  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-int.h (struct target_ira_int): Add member
	x_ira_uniform_class_p.
	(ira_uniform_class_p): New macro.

	* ira.c (setup_uniform_class_p): New function.
	(setup_allocno_and_important_classes): Call the function.
	(print_unform_and_important_classes): New function.
	(print_classes): Rename to print_translated_classes.
	(ira_debug_allocno_classes): Add call of
	print_unform_and_important_classes.

	* ira-costs.c (setup_regno_cost_classes_by_aclass): Use uniform
	classes instead of pressure classes.

From-SVN: r188199
2012-06-04 18:27:36 +00:00
Richard Sandiford 7cc61ee413 ira-int.h (target_ira_int): Rename x_move_cost to x_ira_register_move_cost...
gcc/
	* ira-int.h (target_ira_int): Rename x_move_cost to
	x_ira_register_move_cost, x_may_move_in_cost to
	x_ira_may_move_in_cost and x_may_move_out_cost to
	x_ira_may_move_out_cost.  Delete the old fields with
	those names and also x_ira_max_register_move_cost,
	x_ira_max_may_move_in_cost and x_ira_max_may_move_out_cost.
	(move_cost, may_move_in_cost, may_move_out_cost)
	(ira_max_register_move_cost, ira_max_may_move_in_cost)
	(ira_max_may_move_out_cost): Delete.
	* ira.c (init_move_cost): Rename to...
	(ira_init_register_move_cost): ...this, deleting the old
	function with that name.  Apply above variable renamings.
	Retain asserts for null fields.
	(ira_init_once): Don't initialize register move costs here.
	(free_register_move_costs): Apply above variable renamings.
	Remove code for deleted fields.

From-SVN: r188047
2012-05-31 05:30:31 +00:00
Richard Sandiford e80ccebcd8 regs.h (move_table, [...]): Move these definitions and associated target_globals fields to...
gcc/
	* regs.h (move_table, move_cost, may_move_in_cost, may_move_out_cost):
	Move these definitions and associated target_globals fields to...
	* ira-int.h: ...here.
	* rtl.h (init_move_cost): Delete.
	* reginfo.c (last_mode_for_init_move_cost, init_move_cost): Move to...
	* ira.c: ...here, making the latter static.

From-SVN: r188043
2012-05-31 05:29:47 +00:00
Bernd Schmidt e384e6b59c attribs.c (decl_attributes): Avoid emitting a warning if ATTR_FLAG_BUILT_IN.
* attribs.c (decl_attributes): Avoid emitting a warning if
	ATTR_FLAG_BUILT_IN.
	* doc/rtl.texi (CALL_INSN_FUNCTION_USAGE): Use lowercase for rtx
	codes.  Document meaning of sets inside CALL_INSN_FUNCTION_USAGE.
	* c-family/c-common.c (DEF_ATTR_STRING): Define and undefine as
	necessary.
	* builtin-attrs.def (DEF_ATTR_FOR_STRING): Define.  Use it to
	define a string "1".
	(ATTR_RET1_NOTHROW_NONNULL_LEAF): New attr definition.
	* builtins.def (BUILT_IN_MEMCPY, BUILT_IN_MEMMOVE, BUILT_IN_MEMSET,
	BUILT_IN_STRCPY): Use it for these functions.
	* postreload.c (reload_combine): Deal with SETs inside
	CALL_INSN_FUNCTION_USAGE.
	* caller-save.c (setup_save_areas, save_call_clobbered_regs):
	Look for REG_RETURNED notes and use a cheap restore if possible.
	* ira-int.h (struct ira_allocno): New member cheap_calls_crossed_num.
	(ALLOCNO_CHEAP_CALLS_CROSSED_NUM): New macro.
	* ira-build.c (ira_create_allocno, create_cap_allocno,
	propagate_allocno_info, propagate_some_info_from_allocno,
	copy_info_to_removed_store_destination, ira_flattening): Handle it.
	* ira-lives.c (pseudo_regno_single_word_and_live_p,
	find_call_crossed_cheap_reg): New static functions.
	(process_bb_node_lives): Look for SETs in CALL_INSN_FUNCTION_USAGE,
	and set ALLOCNO_CHEAP_CALLS_CROSSED_NUM if possible.  Also make
	a REG_RETURNED note in that case.
	* ira.c (setup_reg_renumber): Change assert to allow cases where
	allocnos only cross calls for which they are cheap to restore.
	* ira-costs.c (ira_tune_allocno_costs): Compare
	ALLOCNO_CALLS_CROSSED_NUM to ALLOCNO_CHEAP_CALLS_CROSSED_NUM rather
	than 0.
	* reg-notes.def (REG_RETURNED): New note.
	* cse.c (cse_insn): Likewise.
	* sched-deps.c (sched_analyze_insn): Likewise.
	* expr.c (init_block_move_fn): Set a "fn spec" attribute.
	* calls.c (decl_return_flags): New static function.
	(expand_call): Generate a SET in CALL_INSN_FUNCTION_USAGE for
	functions that return one of their arguments.
	* lto/lto-lang.c (handle_fnspec_attribute): New static function.
	(lto_attribute_table): Add "fn spec".
	(DEF_ATTR_STRING): Define and undefine along with the other macros.
	* regcprop.c (struct kill_set_value_data): New.
	(kill_set_value): Interpret data as a pointer to such a struct.
	Do nothing if the caller wants the register to be ignored.
	(copyprop_hardreg_forward_1): Handle SETs in CALL_INSN_FUNCTION_USAGE.

testsuite/
	* gcc.target/i386/retarg.c: New test.

From-SVN: r187459
2012-05-14 12:08:31 +00:00
Richard Guenther d0a854af24 ira-int.h (ira_allocno_object_iter_cond): Avoid out-of-bound array access.
2012-04-19  Richard Guenther  <rguenther@suse.de>

	* ira-int.h (ira_allocno_object_iter_cond): Avoid out-of-bound
	array access.

From-SVN: r186590
2012-04-19 12:44:07 +00:00
Bernd Schmidt acf41a74a8 dbgcnt.def (ira_move): New counter.
* dbgcnt.def (ira_move): New counter.
	* ira-int.h (ira_create_new_reg): Declare function.
	(first_moveable_pseudo, last_moveable_pseudo): Declare variables.
	* ira-emit.c (ira_create_new_reg): Renamed from craete_new_reg and
	no longer static.  All callers changed.
	* ira.c: Include "dbgcnt.h".
	(rtx_moveable_p, insn_dominated_by_p, find_moveable_pseudos,
	move_unallocated_pseudos): New static functions.
	(first_moveable_pseudo, last_moveable_pseudo): New global variables.
	(pseudo_replaced_reg, pseudo_move_insn): New static variables.
	(ira): Call find_moveable_pseudos and move_unallocated_pseudos.
	* ira-costs.c (find_costs_and_classes): Assign a memory cost of zero
	to the pseudos generated in find_moveable_pseudos.
	* Makefile.in (ira.o): Add $(DBGCNT_H).

From-SVN: r186378
2012-04-12 12:53:17 +00:00
Vladimir Makarov 2608d84140 re PR rtl-optimization/40761 (IRA memory hog for insanely nested loops)
2012-01-19  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/40761
	* ira-int.h (struct ira_loop_tree_node): Add comment for member
	loop.  Add new member loop_num.
	(IRA_LOOP_NODE_BY_INDEX): Modify the check.
	(ira_build): Remove the parameter.

	* ira.c (ira_print_disposition): Use loop_num instead of
	loop->num.
	(ira.c): Do not build CFG loops for one region allocation.  Remove
	argument from ira_build call.

	* ira-build.c (init_loop_tree_node): New function.
	(create_loop_tree_nodes): Use it.  Separate the case when CFG
	loops are not built.
	(more_one_region_p): Check current_loops.
	(finish_loop_tree_nodes): Separate the case when CFG loops are not
	built.
	(add_loop_to_tree): Process loop equal to NULL too.
	(form_loop_tree): Separate the case when CFG loops are not built.
	Use explicitly number for the root.
	(rebuild_regno_allocno_maps, create_loop_tree_node_allocnos): Add
	an assertion.
	(ira_print_expanded_allocno, loop_compare_func): Use loop_num
	instead of loop->num.
	(mark_loops_for_removal): Ditto.  Use loop_num instead of
	loop->num.
	(mark_all_loops_for_removal): Ditto.
	(remove_unnecessary_regions): Separate the case when CFG loops
	are not built.
	(ira_build): Remove the parameter.  Use explicit number of regions
	when CFG loops are not built.

	* ira-color.c (print_loop_title): Separate the case for the root
	node.  Use loop_num instead of loop->num.
	(move_spill_restore): Use loop_num instead of loop->num.

	* ira-emit.c (setup_entered_from_non_parent_p): Add an assertion.
	(change_loop): Ditto.
	(change_loop): Use loop_num instead of loop->num.

	* ira-lives.c (process_bb_node_lives): Ditto.

	* ira-costs.c (print_allocno_costs, find_costs_and_classes):
	Ditto.

	* ira-conflicts.c (print_allocno_conflicts): Ditto.

From-SVN: r183312
2012-01-19 20:46:31 +00:00
Vladimir Makarov 27508f5fa3 re PR other/50775 (Register allocator sets up frame and frame pointer with low register pressure)
2011-12-05  Vladimir Makarov  <vmakarov@redhat.com>

	PR other/50775
	* ira-int.h (struct ira_object): Remove add_data.
	(OBJECT_ADD_DATA): Remove.

	* ira-build.c (ira_create_object): Remove OBJECT_ADD_DATA
	initialization.

	* ira-color.c (object_hard_regs_t, object_hard_regs): Rename to
	allocno_hard_regs_t, allocno_hard_regs.
	(object_hard_regs_node_t, object_hard_regs_node): Rename to
	allocno_hard_regs_node_t and allocno_hard_regs_node.
	(struct allocno_color_data): Add new member last_process.  Move
	profitable_hard_regs, hard_regs_node, and hard_regs_subnodes_start
	from object_color_data.
	(object_color_data_t, object_color_data, OBJECT_COLOR_DATA):
	Remove.
	(curr_allocno_process): New static variable.
	(object_hard_regs_eq, object_hard_regs_htab): Rename to
	allocno_hard_regs_eq and allocno_hard_regs_htab.
	(init_object_hard_regs, finish_object_hard_regs): Rename to
	init_allocno_hard_regs and finish_allocno_hard_regs.
	(object_hard_regs_compare, object_hard_regs_node_t): Rename to
	allocno_hard_regs_compare and allocno_hard_regs_node_t.
	(create_new_object_hard_regs_node): Rename to
	create_new_allocno_hard_regs_node.
	(add_new_object_hard_regs_node_to_forest): Rename to
	add_new_allocno_hard_regs_node_to_forest.
	(add_object_hard_regs_to_forest, collect_object_hard_regs_cover):
	Rename to add_allocno_hard_regs_to_forest and collect_allocno_hard_regs_cover.
	(setup_object_hard_regs_nodes_parent): Rename to setup_allocno_hard_regs_nodes_parent.
	(remove_unused_object_hard_regs_nodes): Rename to remove_unused_allocno_hard_regs_nodes.
	(enumerate_object_hard_regs_nodes, object_hard_regs_nodes_num):
	Rename to enumerate_allocno_hard_regs_nodes and allocno_hard_regs_nodes_num.
	(object_hard_regs_nodes, object_hard_regs_subnode_t): Rename to
	allocno_hard_regs_nodes and allocno_hard_regs_subnode_t.
	(object_hard_regs_subnode, object_hard_regs_subnodes): Rename to
	allocno_hard_regs_subnode and allocno_hard_regs_subnodes.
	(object_hard_regs_subnode_index): Rename to allocno_hard_regs_subnode_index.
	(setup_object_hard_regs_subnode_index): Rename to
	setup_allocno_hard_regs_subnode_index.
	(get_object_hard_regs_subnodes_num): Rename to get_allocno_hard_regs_subnodes_num.
	(form_object_hard_regs_nodes_forest): Rename to form_allocno_hard_regs_nodes_forest.
	(finish_object_hard_regs_nodes_tree): Rename to form_allocno_hard_regs_nodes_forest
	(finish_object_hard_regs_nodes_forest): Rename to
	finish_allocno_hard_regs_nodes_forest.
	(setup_left_conflict_sizes_p): Use allocno data instead of object
	ones.  Process conflict allocnos once.
	(update_left_conflict_sizes_p): Use allocno data instead of object
	ones.  Change prototype signature.
	(empty_profitable_hard_regs): Use allocno data instead of object
	ones.
	(setup_profitable_hard_regs): Ditto.
	(get_conflict_profitable_regs): Rename to
	get_conflict_and_start_profitable_regs.  Use allocno data for
	profitable regs calculation.
	(check_hard_reg_p): Change prototype signature.  Check profitable
	regs for allocno not the objects.
	(assign_hard_reg): Process conflict allocnos only once for
	updating conflict costs.
	(setup_allocno_available_regs_num): Use allocno data instead of
	object ones.  Modify debug output.
	(color_pass): Remove initialization and finalization of object
	color data.

From-SVN: r182015
2011-12-05 17:02:54 +00:00
Vladimir Makarov 9181a6e5b0 re PR rtl-optimization/50107 ([IRA, i386] allocates registers in very non-optimal way)
2011-08-17  Vladimir Makarov  <vmakarov@redhat.com>

	PR rtl-optimization/50107
	* ira-int.h (ira_hard_reg_not_in_set_p): Remove.
	(ira_hard_reg_in_set_p): New.

	* ira-color.c (calculate_saved_nregs): New.
	(assign_hard_reg): Use it.  Set up allocated_hard_reg_p for all
	hard regs.
	(allocno_reload_assign, fast_allocation): Use
	ira_hard_reg_set_intersection_p instead of
	ira_hard_reg_not_in_set_p.

	* ira.c (setup_reg_renumber): Use
	ira_hard_reg_set_intersection_p instead of
	ira_hard_reg_not_in_set_p.
	(setup_allocno_assignment_flags, calculate_allocation_cost): Use
	ira_hard_reg_in_set_p instead of ira_hard_reg_not_in_set_p.

	* ira-costs.c (ira_tune_allocno_costs): Use
	ira_hard_reg_set_intersection_p instead of
	ira_hard_reg_not_in_set_p.

From-SVN: r177865
2011-08-18 14:56:36 +00:00
Anatoly Sokolov 6f76a8788e reginfo.c (memory_move_cost): Change rclass argument type form 'enum reg_class' to reg_class_t.
* reginfo.c (memory_move_cost): Change rclass argument type form
	'enum reg_class' to reg_class_t.
	* reload.h (memory_move_cost): Update prototype.
	* postreload.c reload_cse_simplify_set): Change type dclass var to
	reg_class_t.
	* ira-int.h (ira_allocate_cost_vector, ira_free_cost_vector):
	Update prototype.
	(ira_allocate_and_set_costs): Change aclass argument type form
	'enum reg_class' to reg_class_t.
	* ira-build.c (ira_allocate_cost_vector, ira_free_cost_vector): 
	Change aclass argument type to reg_class_t.
	(update_conflict_hard_reg_costs): Change type aclass and pref vars
	to reg_class_t.
	* gcc/ira.c (setup_class_subset_and_memory_move_costs): Adjust
	memory_move_cost call.

	* config/ia64/ia64.c (ia64_register_move_cost): Remove 'from' and
	'to' local var. Rename from_i and to_i arguments to 'from' and 'to'.
	Change type tmp var to reg_class_t.

From-SVN: r173232
2011-05-01 16:33:13 +04:00
Mike Stump dd5a833e6e Remove doubled up words.
From-SVN: r172247
2011-04-10 18:46:45 +00:00
Vladimir Makarov 1756cb6614 [multiple changes]
2011-03-28  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-color.c (update_left_conflict_sizes_p): Don't assume that
	conflict object hard regset nodes have intersecting hard reg sets.
	
	* regmove.c (regmove_optimize): Move ira_set_pseudo_classes call
	after regstat_init_n_sets_and_refs.

	* ira.c: Add more comments at the top.
	(setup_stack_reg_pressure_class, setup_pressure_classes):
	Add comments how we compute the register pressure classes.
	(setup_allocno_and_important_classes): Add more comments.
	(setup_class_translate_array, reorder_important_classes)
	(setup_reg_class_relations): Add comments.

	* ira-emit.c: Add 2011 to the Copyright line.  Add comments at the
	start of the file.

	* ira-color.c: Add 2011 to the Copyright line.
	(assign_hard_reg):  Add more comments.
	(improve_allocation): Ditto.

	* ira-costs.c: Add 2011 to the Copyright line.
	(setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more
	comments.
	(setup_regno_cost_classes_by_mode): Ditto.

	Initial patches from ira-improv branch:

	2010-08-13  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-build.c: (ira_create_object): Remove initialization of
	OBJECT_PROFITABLE_HARD_REGS.  Initialize OBJECT_ADD_DATA.
	(ira_create_allocno): Remove initialization of
	ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P,
	ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P,
	ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P,
	ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO,
	ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO.
	Initialize ALLOCNO_ADD_DATA.
	(copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA
	and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and
	ALLOCNO_REG.
	(ira_flattening): Ditto.  Use ALLOCNO_EMIT_DATA instead of
	ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P.

	* ira.c (ira_reallocate): Remove.
	(setup_pressure_classes): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.
	(setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA.
	(ira): Call ira_initiate_emit_data and ira_finish_emit_data.

	* ira-color.c: Use ALLOCNO_COLOR_DATA instead of
	ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P,
	ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO,
	ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA
	instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE,
	OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM.
	Fix formatting.
	(object_hard_regs_t, object_hard_regs_node_t): Move from
	ira-int.h.
	(struct object_hard_regs, struct object_hard_regs_node): Ditto.
	(struct allocno_color_data): New.
	(allocno_color_data_t): New typedef.
	(allocno_color_data): New definition.
	(ALLOCNO_COLOR_DATA): New macro.
	(struct object_color_data): New.
	(object_color_data_t): New typedef.
	(object_color_data): New definition.
	(OBJECT_COLOR_DATA): New macro.
	(update_copy_costs, calculate_allocno_spill_cost): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.
	(move_spill_restore, update_curr_costs): Ditto.
	(allocno_spill_priority): Make it inline.
	(color_pass): Allocate and free allocno_color_dat and
	object_color_data.
	(struct coalesce_data, coalesce_data_t): New.
	(allocno_coalesce_data): New definition.
	(ALLOCNO_COALESCE_DATA): New macro.
	(merge_allocnos, coalesced_allocno_conflict_p): Use
	ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO,
	ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP.
	(coalesce_allocnos): Ditto.
	(setup_coalesced_allocno_costs_and_nums): Ditto.
	(collect_spilled_coalesced_allocnos): Ditto.
	(slot_coalesced_allocno_live_ranges_intersect_p): Ditto.
	(setup_slot_coalesced_allocno_live_ranges): Ditto.
	(coalesce_spill_slots): Ditto.
	(ira_sort_regnos_for_alter_reg): Ditto.  Allocate, initialize and
	free allocno_coalesce_data.

	* ira-conflicts.c: Fix formatting.
	(process_regs_for_copy): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.
	(build_object_conflicts): Optimize.

	* ira-costs.c (record_reg_classes): Optimize.  Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost, ira_may_move_in_cost, and
	ira_may_move_out_cost instead of ira_get_register_move_cost and
	ira_get_may_move_cost.
	(record_address_regs): Ditto.
	(scan_one_insn): Optimize.
	(find_costs_and_classes): Optimize.
	(process_bb_node_for_hard_reg_moves): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.

	* ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of
	ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST,
	ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P.
	(ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New
	definitions.
	(ira_initiate_emit_data, ira_finish_emit_data)
	(create_new_allocno): New functions.
	(modify_move_list): Call create_new_alloc instead of
	ira_create_allocno.
	(emit_move_list): Call ira_init_register_move_cost_if_necessary.
	Use ira_register_move_cost instead of ira_get_register_move_cost.

	* ira-int.h: Fix some comments.
	(object_hard_regs_t, object_hard_regs_node_t): Move
	to ira-color.c.
	(struct object_hard_regs, struct object_hard_regs_node):
	Ditto.
	(struct ira_object): Remove profitable_hard_regs, hard_regs_node,
	hard_regs_subnodes_start, hard_regs_subnodes_num.  Add new member
	add_data.
	(struct ira_allocno): Make mode and aclass a bitfield.  Move other
	bitfield after mode.  Make hard_regno a short int.  Make
	hard_regno short.  Remove first_coalesced_allocno and
	next_coalesced_allocno.  Move mem_optimized_dest_p,
	somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest
	into struct ira_emit_data.  Remove in_graph_p, may_be_spilled_p,
	available_regs_num, next_bucket_allocno, prev_bucket_allocno,
	temp, colorable_p.  Add new member add_data.
	(ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove.
	(ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove.
	(ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove.
	(ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove.
	(ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove.
	(ALLOCNO_ADD_DATA): New macro.
	(ira_emit_data_t): New typedef.
	(struct ira_emit_data): New.  Move mem_optimized_dest_p,
	somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest
	from struct ira_allocno.
	(ALLOCNO_EMIT_DATA): New macro.
	(ira_allocno_emit_data, allocno_emit_reg): New.
	(ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove.
	(OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM):
	Remove.
	(OBJECT_ADD_DATA): New macro.
	(ira_reallocate): Remove.
	(ira_initiate_emit_data, ira_finish_emit_data): New.
	(ira_get_register_move_cost, ira_get_may_move_cost): Remove.
	(ira_init_register_move_cost_if_necessary): New.
	(ira_object_conflict_iter_next): Merge into
	ira_object_conflict_iter_cond.
	(FOR_EACH_OBJECT_CONFLICT): Don't use
	ira_object_conflict_iter_next.

	* ira-live.c: (process_single_reg_class_operands): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.

	2010-08-13  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-int.h (struct target_ira_int): Remove x_cost_classes.

	* ira-costs.c: Fix formatting.
	(cost_classes, cost_classes_num): Remove.
	(struct cost_classes, cost_classes_t, const_cost_classes_t): New.
	(regno_cost_classes, cost_classes_hash, cost_classes_eq): New.
	(cost_classes_del, cost_classes_htab): New.
	(cost_classes_aclass_cache, cost_classes_mode_cache): New.
	(initiate_regno_cost_classes, setup_cost_classes): New.
	(setup_regno_cost_classes_by_aclass): New.
	(setup_regno_cost_classes_by_mode, finish_regno_cost_classes):
	New.
	(record_reg_classes): Use regno_cost_classes instead of
	cost_classes.  Move checking opposite operand up.
	(record_address_regs): Use regno_cost_classes
	instead of cost_classes.
	(scan_one_insn): Ditto.  Use always general register.
	(print_allocno_costs): Use regno_cost_classes instead of
	cost_classes.
	(print_pseudo_costs): Ditto.  Use Reg_N_REFS.
	(find_costs_and_classes): Set up cost classes for each registers.
	Use also their mode for this.  Use regno_cost_classes instead of
	cost_classes.
	(setup_allocno_class_and_costs): Use regno_cost_classes instead of
	cost_classes.
	(free_ira_costs, ira_init_costs): Don't use cost_classes.
	(ira_costs, ira_set_pseudo_classes): Call
	initiate_regno_cost_classes and finish_regno_cost_classes.

	2010-10-04  Vladimir Makarov  <vmakarov@redhat.com>

	* target-def.h (TARGET_IRA_COVER_CLASSES): Remove.

	* target.def (ira_cover_classes): Remove.

	* doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and
	IRA_COVER_CLASSES.

	* doc/tm.texi.in: Ditto.

	* ira-conflicts.c: Remove mentioning cover classes from the file.
	Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS.  Use
	ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST.  Fix
	formatting.

	* targhooks.c (default_ira_cover_classes): Remove.

	* targhooks.h (default_ira_cover_classes): Ditto.

	* haifa-sched.c: Remove mentioning cover classes from the file.
	Use ira_reg_pressure_cover instead of ira_reg_class_cover.  Use
	ira_pressure_classes and ira_pressure_classes_num instead of
	ira_reg_class_cover_size and ira_reg_class_cover.  Use
	sched_regno_pressure_class instead of sched_regno_cover_class.
	(mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use
	ira_reg_class_max_nregs instead of ira_reg_class_nregs.

	* ira-int.h: Add 2010 to Copyright.  Remove mentioning cover
	classes from the file.
	(object_hard_regs_t, object_hard_regs_node_t): New typedefs.
	(struct object_hard_regs, struct object_hard_regs_node): New.
	(struct ira_object): New members profitable_hard_regs,
	hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num.
	(struct ira_allocno): Rename cover_class to aclass.  Rename
	cover_class_cost and updated_cover_class_cost to class_cost and
	updated_class_cost.  Remove splay_removed_p and
	left_conflict_size.  Add new members colorable_p.
	(ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove.
	(ALLOCNO_COLORABLE_P): New macro.
	(ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS.
	(ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST):
	Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST.
	(OBJECT_...): Rename parameter C to O.
	(OBJECT_PROFITABLE_HARD_REGS): New macro.
	(OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START)
	(OBJECT_HARD_REGS_SUBNODES_NUM): New macros.
	(struct target_ira_int): New members x_ira_max_memory_move_cost,
	x_ira_max_register_move_cost, x_ira_max_may_move_in_cost,
	x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p,
	x_ira_reg_pressure_class_p, x_ira_important_class_nums,
	x_ira_reg_class_superunion.  Rename x_prohibited_class_mode_reg to
	x_ira_prohibited_class_mode_reg.  Rename x_ira_reg_class_union to
	x_ira_reg_class_subunion.
	(ira_max_memory_move_cost, ira_max_register_move_cost)
	(ira_max_may_move_in_cost, ira_max_may_move_out_cost)
	(ira_reg_allocno_class_p, ira_reg_pressure_class_p)
	(ira_important_class_nums, ira_reg_class_superunion): New macros.
	(prohibited_class_mode_regs): Rename to
	ira_prohibited_class_mode_regs.
	(ira_reg_class_union): Rename to ira_reg_class_subunion.
	(ira_debug_class_cover): Rename to ira_debug_allocno_classes.
	(ira_set_allocno_cover_class): Rename to ira_set_allocno_class.
	(ira_tune_allocno_costs_and_cover_classes): Rename to
	ira_tune_allocno_costs.
	(ira_debug_hard_regs_forest): New.
	(ira_object_conflict_iter_init, ira_object_conflict_iter_cond)
	(ira_object_conflict_iter_next): Fix comments.
	(ira_hard_reg_set_intersection_p, hard_reg_set_size): New
	functions.
	(ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename
	cover_class to aclass.
	(ira_allocate_and_accumulate_costs): Ditto.
	(ira_allocate_and_set_or_copy_costs): Ditto.

	* opts.c (decode_options): Remove ira_cover_class check.

	* ira-color.c: Remove mentioning cover classes from the file.  Use
	ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST
	instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and
	ALLOCNO_UPDATED_COVER_CLASS_COST.  Fix formatting.
	(splay-tree.h): Remove include.
	(allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move
	before copy_freq_compare_func.
	(allocnos_for_spilling, removed_splay_allocno_vec): Remove.
	(object_hard_regs_vec, object_hard_regs_htab, node_check_tick):
	New definitions.
	(hard_regs_roots, hard_regs_node_vec): Ditto.
	(object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto.
	(insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto.
	(finish_object_hard_regs, object_hard_regs_compare): Ditto.
	(create_new_object_hard_regs_node): Ditto.
	(add_new_object_hard_regs_node_to_forest): Ditto.
	(add_object_hard_regs_to_forest, collect_object_hard_regs_cover):
	Ditto.
	(setup_object_hard_regs_nodes_parent, first_common_ancestor_node):
	Ditto.
	(print_hard_reg_set, print_hard_regs_subforest): Ditto.
	(print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto.
	(remove_unused_object_hard_regs_nodes): Ditto.
	(enumerate_object_hard_regs_nodes): Ditto.
	(object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto.
	(object_hard_regs_subnode_t): Ditto.
	(struct object_hard_regs_subnode): Ditto.
	(object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto.
	(setup_object_hard_regs_subnode_index): Ditto.
	(get_object_hard_regs_subnodes_num): Ditto.
	(form_object_hard_regs_nodes_forest): Ditto.
	(finish_object_hard_regs_nodes_tree): Ditto.
	(finish_object_hard_regs_nodes_forest): Ditto.
	(allocnos_have_intersected_live_ranges_p): Rename to
	allocnos_conflict_by_live_ranges_p.  Move before
	copy_freq_compare_func.
	(pseudos_have_intersected_live_ranges_p): Rename to
	conflict_by_live_ranges_p.  Move before copy_freq_compare_func.
	(setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto.
	(empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto.
	(update_copy_costs): Remove assert.  Skip cost update if the hard
	reg does not belong the class.
	(assign_hard_reg): Process only profitable hard regs.
	(uncolorable_allocnos_num): Make it scalar.
	(allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM
	and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE
	and ira_reg_class_max_nregs.
	(bucket_allocno_compare_func): Check frequency first.
	(sort_bucket): Add compare function as a parameter.
	(add_allocno_to_ordered_bucket): Assume no coalesced allocnos.
	(uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove.
	(push_allocno_to_stack): Rewrite for checking new allocno
	colorability.
	(remove_allocno_from_bucket_and_push): Print cost too.  Remove
	assert.
	(push_only_colorable): Pass new parameter to sort_bucket.
	(push_allocno_to_spill): Remove.
	(allocno_spill_priority_compare): Make it inline and rewrite.
	(splay_tree_allocate, splay_tree_free): Remove.
	(allocno_spill_sort_compare): New function.
	(push_allocnos_to_stack): Sort allocnos for spilling once.  Don't
	build and use splay tree.  Choose first allocno in uncolorable
	allocno bucket to spill.  Remove setting spill cost.
	(all_conflicting_hard_regs): Remove.
	(setup_allocno_available_regs_num): Check only profitable hard
	regs.  Print info about hard regs nodes.
	(setup_allocno_left_conflicts_size): Remove.
	(put_allocno_into_bucket): Don't call
	setup_allocno_left_conflicts_size.  Use
	setup_left_conflict_sizes_p.
	(improve_allocation): New.
	(color_allocnos): Call setup_profitable_hard_regs,
	form_object_hard_regs_nodes_forest, improve_allocation,
	finish_object_hard_regs_nodes_forest.  Setup spill cost.
	(print_loop_title): Use pressure classes.
	(color_allocnso): Ditto.
	(do_coloring): Remove allocation and freeing splay_tree_node_pool
	and allocnos_for_spilling.
	(ira_sort_regnos_for_alter_reg): Don't setup members
	{first,next}_coalesced_allocno.
	(color): Remove allocating and freeing removed_splay_allocno_vec.
	(fast_allocation): Use ira_prohibited_class_mode_regs instead of
	prohibited_class_mode_regs.

	* ira-lives.c: Remove mentioning cover classes from the file.  Fix
	formatting.
	(update_allocno_pressure_excess_length): Use pressure classes.
	(inc_register_pressure, dec_register_pressure): Check for pressure
	class.
	(mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use
	pressure class.  Use ira_reg_class_nregs instead of
	ira_reg_class_max_nregs.
	(mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto.
	(mark_hard_reg_live, mark_hard_reg_dead): Use pressure class.
	(single_reg_class): Use ira_reg_class_nregs instead of
	ira_reg_class_max_nregs.
	(process_bb_node_lives): Use pressure classes.

	* ira-emit.c: Remove mentioning cover classes from the file.  Use
	ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS.  Fix formatting.
	(change_loop): Use pressure classes.
	(modify_move_list): Call ira_set_allocno_class instead of
	ira_set_allocno_cover_class.

	* ira-build.c: Remove mentioning cover classes from the file.  Use
	ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of
	ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST.  Use
	ALLOCNO_UPDATED_CLASS_COST instead of
	ALLOCNO_UPDATED_COVER_CLASS_COST.  Fix formatting.
	(ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS.
	(ira_create_allocno): Remove initialization of
	ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE.  Initialize
	ALLOCNO_COLORABLE_P.
	(ira_set_allocno_cover_class): Rename to ira_set_allocno_class.
	Update conflict regs for the objects.
	(create_cap_allocno): Remove assert.  Don't propagate
	ALLOCNO_AVAILABLE_REGS_NUM.
	(ira_free_allocno_costs): New function.
	(finish_allocno): Change a part of code into call of
	ira_free_allocno_costs.
	(low_pressure_loop_node_p): Use pressure classes.
	(object_range_compare_func): Don't compare classes.
	(setup_min_max_conflict_allocno_ids): Ditto.

	* loop-invariant.c: Remove mentioning cover classes from the file.
	Use ira_pressure_classes and ira_pressure_classes_num instead of
	ira_reg_class_cover_size and ira_reg_class_cover.  Fix formatting.
	(get_cover_class_and_nregs): Rename to
	get_cover_pressure_and_nregs.  Use ira_reg_class_max_nregs instead
	of ira_reg_class_nregs.  Use reg_allocno_class instead of
	reg_cover_class.
	(get_inv_cost): Use instead ira_stack_reg_pressure_class of
	STACK_REG_COVER_CLASS.
	(get_regno_cover_class): Rename to get_regno_pressure_class.
	(move_loop_invariants): Initialize and finalize regstat.

	* ira.c: Remove mentioning cover classes from the file.  Add
	comments about coloring without cover classes.  Use ALLOCNO_CLASS
	instead of ALLOCNO_COVER_CLASS.  Fix formatting.
	(alloc_reg_class_subclasses, setup_reg_subclasses): Move it before
	setup_class_subset_and_memory_move_costs.
	(setup_stack_reg_pressure_class, setup_pressure_classes): New.
	(setup_cover_and_important_classes): Rename to
	setup_allocno_and_important_classes.
	(setup_class_translate_array): New.
	(setup_class_translate): Call it for allocno and pressure classes.
	(cover_class_order): Rename to allocno_class_order.
	(comp_reg_classes_func): Use ira_allocno_class_translate instead
	of ira_class_translate.
	(reorder_important_classes): Set up ira_important_class_nums.
	(setup_reg_class_relations): Set up ira_reg_class_superunion.
	(print_class_cover): Rename to print_classes.  Add parameter.
	(ira_debug_class_cover): Rename to ira_debug_allocno_classes.
	Print pressure classes too.
	(find_reg_class_closure): Rename to find_reg_classes.  Don't call
	setup_reg_subclasses.
	(ira_hard_regno_cover_class): Rename to
	ira_hard_regno_allocno_class.
	(ira_reg_class_nregs): Rename to ira_reg_class_max_nregs.
	(setup_prohibited_class_mode_regs): Use
	ira_prohibited_class_mode_regs instead of
	prohibited_class_mode_regs.
	(clarify_prohibited_class_mode_regs): New function.
	(ira_init_register_move_cost): Set up ira_max_register_move_cost,
	ira_max_may_move_in_cost, and ira_max_may_move_out_cost.
	(ira_init_once): Initialize them.
	(free_register_move_costs): Process them.
	(ira_init): Move calls of find_reg_classes and
	setup_hard_regno_aclass after setup_prohibited_class_mode_regs.
	Call clarify_prohibited_class_mode_regs.
	(ira_no_alloc_reg): Remove.
	(too_high_register_pressure_p): Use pressure classes.

	* sched-deps.c: Remove mentioning cover classes from the file.
	Use ira_reg_pressure_cover instead of ira_reg_class_cover.  Use
	ira_pressure_classes and ira_pressure_classes_num instead of
	ira_reg_class_cover_size and ira_reg_class_cover.
	(mark_insn_hard_regno_birth, mark_hard_regno_death): Use
	sched_regno_pressure_class instead of sched_regno_cover_class.
	(mark_insn_pseudo_birth, mark_pseudo_death): Ditto.  Use
	ira_reg_class_max_nregs instead of ira_reg_class_nregs.

	* ira.h: Add 2010 to Copyright.
	(ira_no_alloc_reg): Remove external.
	(struct target_ira): Rename x_ira_hard_regno_cover_class,
	x_ira_reg_class_cover_size, x_ira_reg_class_cover, and
	x_ira_class_translate to x_ira_hard_regno_allocno_class,
	x_ira_allocno_classes_num, x_ira_allocno_classes, and
	x_ira_allocno_class_translate.  Add x_ira_pressure_classes_num,
	x_ira_pressure_classes, x_ira_pressure_class_translate, and
	x_ira_stack_reg_pressure_class.  Rename x_ira_reg_class_nregs to
	x_ira_reg_class_max_nregs.  Add x_ira_reg_class_min_nregs and
	x_ira_no_alloc_regs.
	(ira_hard_regno_cover_class): Rename to
	ira_hard_regno_allocno_class.
	(ira_reg_class_cover_size, ira_reg_class_cover): Rename to
	ira_allocno_classes_num and ira_allocno_classes.
	(ira_class_translate): Rename to ira_allocno_class_translate.
	(ira_pressure_classes_num, ira_pressure_classes): New definitions.
	(ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto.
	(ira_reg_class_nregs): Rename to ira_reg_class_max_nregs.
	(ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New
	(ira_no_alloc_regs): New.

	* ira-costs.c: Add 2010 to Copyright.  Remove mentioning cover
	classes from the file.  Use ALLOCNO_CLASS instead of
	ALLOCNO_COVER_CLASS.  Use ALLOCNO_CLASS_COST instead of
	ALLOCNO_COVER_CLASS_COST.
	(regno_cover_class): Rename to regno_aclass.
	(record_reg_classes): Use ira_reg_class_subunion instead of
	ira_reg_class_union.
	(record_address_regs): Check overflow.
	(scan_one_insn): Ditto.
	(print_allocno_costs): Print total mem cost fore regional
	allocation.
	(print_pseudo_costs): Use REG_N_REFS.
	(find_costs_and_classes): Use classes intersected with them on the
	1st pass. Check overflow.  Use ira_reg_class_subunion instead of
	ira_reg_class_union.  Use ira_allocno_class_translate and
	regno_aclass instead of ira_class_translate and regno_cover_class.
	Modify code for finding regno_aclass.  Setup preferred classes for
	the next pass.
	(setup_allocno_cover_class_and_costs): Rename to
	setup_allocno_class_and_costs.  Use regno_aclass instead of
	regno_cover_class.  Use ira_set_allocno_class instead of
	ira_set_allocno_cover_class.
	(init_costs, finish_costs): Use regno_aclass instead of
	regno_cover_class.
	(ira_costs): Use setup_allocno_class_and_costs instead of
	setup_allocno_cover_class_and_costs.
	(ira_tune_allocno_costs_and_cover_classes): Rename to
	ira_tune_allocno_costs.  Check overflow.  Skip conflict hard regs
	by processing objects.  Use ira_reg_class_max_nregs instead of
	ira_reg_class_nregs.

	* rtl.h (reg_cover_class): Rename to reg_allocno_class.

	* sched-int.h: Remove mentioning cover classes from the file.
	(sched_regno_cover_class): Rename to sched_regno_pressure_class.

	* reginfo.c: Add 2010 to Copyright.  Remove mentioning cover
	classes from the file.
	(struct reg_pref): Rename coverclass into allocnoclass.
	(reg_cover_class): Rename to reg_allocno_class.

	* Makefile.in (ira-color.o): Remove SPLAY_TREE_H from
	dependencies.

	* config/alpha/alpha.h (IRA_COVER_CLASSES): Remove.

	* config/arm/arm.h (IRA_COVER_CLASSES): Ditto.

	* config/avr/avr.h (IRA_COVER_CLASSES): Ditto.

	* config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto.

	* config/cris/cris.h (IRA_COVER_CLASSES): Ditto.

	* config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto.

	* config/frv/frv.h (IRA_COVER_CLASSES): Ditto.

	* config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto.

	* config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto.

	* config/i386/i386.c (TARGET_IRA_COVER_CLASSES)
	(i386_ira_cover_classes): Ditto.

	* config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto.

	* config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto.

	* config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto.

	* config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto.

	* config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto.

	* config/mep/mep.h (IRA_COVER_CLASSES): Ditto.

	* config/mips/mips.c (TARGET_IRA_COVER_CLASSES)
	(mips_ira_cover_classes): Ditto.

	* config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto.

	* config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto.

	* config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto.

	* config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto.

	* config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto.

	* config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX)
	(IRA_COVER_CLASSES_VSX): Ditto.

	* config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES)
	(rs6000_ira_cover_classes): Ditto.

	* config/rx/rx.h (IRA_COVER_CLASSES): Ditto.

	* config/s390/s390.h (IRA_COVER_CLASSES): Ditto.

	* config/score/score.h (IRA_COVER_CLASSES): Ditto.

	* config/sh/sh.h (IRA_COVER_CLASSES): Ditto.

	* config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto.

	* config/spu/spu.h (IRA_COVER_CLASSES): Ditto.

	* config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto.

	* config/v850/v850.h (IRA_COVER_CLASSES): Ditto.

	* config/vax/vax.h (IRA_COVER_CLASSES): Ditto.

	* config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto.

From-SVN: r171649
2011-03-29 01:02:05 +00:00
Vladimir Makarov 99710245be re PR bootstrap/48307 (Bootstrap failure)
2011-03-27  Vladimir Makarov  <vmakarov@redhat.com>

	PR bootstrap/48307
	Revert the previous patch.

From-SVN: r171589
2011-03-28 01:53:24 +00:00
Vladimir Makarov fe82cdfb59 [multiple changes]
2011-03-27  Vladimir Makarov  <vmakarov@redhat.com>

	* regmove.c (regmove_optimize): Move ira_set_pseudo_classes call
	after regstat_init_n_sets_and_refs.

	* ira.c: Add more comments at the top.
	(setup_stack_reg_pressure_class, setup_pressure_classes):
	Add comments how we compute the register pressure classes.
	(setup_allocno_and_important_classes): Add more comments.
	(setup_class_translate_array, reorder_important_classes)
	(setup_reg_class_relations): Add comments.

	* ira-emit.c: Add 2011 to the Copyright line.  Add comments at the
	start of the file.

	* ira-color.c: Add 2011 to the Copyright line.
	(assign_hard_reg):  Add more comments.
	(improve_allocation): Ditto.

	* ira-costs.c: Add 2011 to the Copyright line.
	(setup_cost_classes, setup_regno_cost_classes_by_aclass): Add more
	comments.
	(setup_regno_cost_classes_by_mode): Ditto.

	Initial patches from ira-improv branch:

	2010-08-13  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-build.c: (ira_create_object): Remove initialization of
	OBJECT_PROFITABLE_HARD_REGS.  Initialize OBJECT_ADD_DATA.
	(ira_create_allocno): Remove initialization of
	ALLOCNO_MEM_OPTIMIZED_DEST, ALLOCNO_MEM_OPTIMIZED_DEST_P,
	ALLOCNO_SOMEWHERE_RENAMED_P, ALLOCNO_CHILD_RENAMED_P,
	ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P,
	ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO,
	ALLOCNO_FIRST_COALESCED_ALLOCNO, ALLOCNO_NEXT_COALESCED_ALLOCNO.
	Initialize ALLOCNO_ADD_DATA.
	(copy_info_to_removed_store_destinations): Use ALLOCNO_EMIT_DATA
	and allocno_emit_reg instead of ALLOCNO_MEM_OPTIMIZED_DEST_P and
	ALLOCNO_REG.
	(ira_flattening): Ditto.  Use ALLOCNO_EMIT_DATA instead of
	ALLOCNO_MEM_OPTIMIZED_DEST and ALLOCNO_SOMEWHERE_RENAMED_P.

	* ira.c (ira_reallocate): Remove.
	(setup_pressure_classes): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.
	(setup_allocno_assignment_flags): Use ALLOCNO_EMIT_DATA.
	(ira): Call ira_initiate_emit_data and ira_finish_emit_data.

	* ira-color.c: Use ALLOCNO_COLOR_DATA instead of
	ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P, ALLOCNO_COLORABLE_P,
	ALLOCNO_AVAILABLE_REGS_NUM, ALLOCNO_NEXT_BUCKET_ALLOCNO,
	ALLOCNO_PREV_BUCKET_ALLOCNO. ALLOCNO_TEMP. Use OBJECT_COLOR_DATA
	instead of OBJECT_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE,
	OBJECT_HARD_REGS_SUBNODES_START, OBJECT_HARD_REGS_SUBNODES_NUM.
	Fix formatting.
	(object_hard_regs_t, object_hard_regs_node_t): Move from
	ira-int.h.
	(struct object_hard_regs, struct object_hard_regs_node): Ditto.
	(struct allocno_color_data): New.
	(allocno_color_data_t): New typedef.
	(allocno_color_data): New definition.
	(ALLOCNO_COLOR_DATA): New macro.
	(struct object_color_data): New.
	(object_color_data_t): New typedef.
	(object_color_data): New definition.
	(OBJECT_COLOR_DATA): New macro.
	(update_copy_costs, calculate_allocno_spill_cost): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.
	(move_spill_restore, update_curr_costs): Ditto.
	(allocno_spill_priority): Make it inline.
	(color_pass): Allocate and free allocno_color_dat and
	object_color_data.
	(struct coalesce_data, coalesce_data_t): New.
	(allocno_coalesce_data): New definition.
	(ALLOCNO_COALESCE_DATA): New macro.
	(merge_allocnos, coalesced_allocno_conflict_p): Use
	ALLOCNO_COALESCED_DATA instead of ALLOCNO_FIRST_COALESCED_ALLOCNO,
	ALLOCNO_NEXT_COALESCED_ALLOCNO, ALLOCNO_TEMP.
	(coalesce_allocnos): Ditto.
	(setup_coalesced_allocno_costs_and_nums): Ditto.
	(collect_spilled_coalesced_allocnos): Ditto.
	(slot_coalesced_allocno_live_ranges_intersect_p): Ditto.
	(setup_slot_coalesced_allocno_live_ranges): Ditto.
	(coalesce_spill_slots): Ditto.
	(ira_sort_regnos_for_alter_reg): Ditto.  Allocate, initialize and
	free allocno_coalesce_data.

	* ira-conflicts.c: Fix formatting.
	(process_regs_for_copy): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.
	(build_object_conflicts): Optimize.

	* ira-costs.c (record_reg_classes): Optimize.  Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost, ira_may_move_in_cost, and
	ira_may_move_out_cost instead of ira_get_register_move_cost and
	ira_get_may_move_cost.
	(record_address_regs): Ditto.
	(scan_one_insn): Optimize.
	(find_costs_and_classes): Optimize.
	(process_bb_node_for_hard_reg_moves): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.

	* ira-emit.c: Use allocno_emit_reg, ALLOCNO_EMIT_DATA instead of
	ALLOCNO_REG, ALLOCNO_CHILD_RENAMED_P, ALLOCNO_MEM_OPTIMIZED_DEST,
	ALLOCNO_MEM_OPTIMIZED_DEST_P, and ALLOCNO_SOMEWHERE_RENAMED_P.
	(ira_allocno_emit_data, void_p, new_allocno_emit_data_vec): New
	definitions.
	(ira_initiate_emit_data, ira_finish_emit_data)
	(create_new_allocno): New functions.
	(modify_move_list): Call create_new_alloc instead of
	ira_create_allocno.
	(emit_move_list): Call ira_init_register_move_cost_if_necessary.
	Use ira_register_move_cost instead of ira_get_register_move_cost.

	* ira-int.h: Fix some comments.
	(object_hard_regs_t, object_hard_regs_node_t): Move
	to ira-color.c.
	(struct object_hard_regs, struct object_hard_regs_node):
	Ditto.
	(struct ira_object): Remove profitable_hard_regs, hard_regs_node,
	hard_regs_subnodes_start, hard_regs_subnodes_num.  Add new member
	add_data.
	(struct ira_allocno): Make mode and aclass a bitfield.  Move other
	bitfield after mode.  Make hard_regno a short int.  Make
	hard_regno short.  Remove first_coalesced_allocno and
	next_coalesced_allocno.  Move mem_optimized_dest_p,
	somewhere_renamed_p, child_renamed_p, reg, and mem_optimized_dest
	into struct ira_emit_data.  Remove in_graph_p, may_be_spilled_p,
	available_regs_num, next_bucket_allocno, prev_bucket_allocno,
	temp, colorable_p.  Add new member add_data.
	(ALLOCNO_IN_GRAPH_P, ALLOCNO_MAY_BE_SPILLED_P): Remove.
	(ALLOCNO_COLORABLE_P, ALLOCNO_AVAILABLE_REGS_NUM): Remove.
	(ALLOCNO_NEXT_BUCKET_ALLOCNO, ALLOCNO_PREV_BUCKET_ALLOCNO): Remove.
	(ALLOCNO_TEMP, ALLOCNO_FIRST_COALESCED_ALLOCNO): Remove.
	(ALLOCNO_NEXT_COALESCED_ALLOCNO): Remove.
	(ALLOCNO_ADD_DATA): New macro.
	(ira_emit_data_t): New typedef.
	(struct ira_emit_data): New.  Move mem_optimized_dest_p,
	somewhere_renamed_p, child_renamed_p, reg, mem_optimized_dest
	from struct ira_allocno.
	(ALLOCNO_EMIT_DATA): New macro.
	(ira_allocno_emit_data, allocno_emit_reg): New.
	(ALLOCNO_PROFITABLE_HARD_REGS, OBJECT_HARD_REGS_NODE): Remove.
	(OBJECT_HARD_REGS_SUBNODES_STAR, OBJECT_HARD_REGS_SUBNODES_NUM):
	Remove.
	(OBJECT_ADD_DATA): New macro.
	(ira_reallocate): Remove.
	(ira_initiate_emit_data, ira_finish_emit_data): New.
	(ira_get_register_move_cost, ira_get_may_move_cost): Remove.
	(ira_init_register_move_cost_if_necessary): New.
	(ira_object_conflict_iter_next): Merge into
	ira_object_conflict_iter_cond.
	(FOR_EACH_OBJECT_CONFLICT): Don't use
	ira_object_conflict_iter_next.

	* ira-live.c: (process_single_reg_class_operands): Call
	ira_init_register_move_cost_if_necessary.  Use
	ira_register_move_cost instead of ira_get_register_move_cost.

	2010-08-13  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-int.h (struct target_ira_int): Remove x_cost_classes.

	* ira-costs.c: Fix formatting.
	(cost_classes, cost_classes_num): Remove.
	(struct cost_classes, cost_classes_t, const_cost_classes_t): New.
	(regno_cost_classes, cost_classes_hash, cost_classes_eq): New.
	(cost_classes_del, cost_classes_htab): New.
	(cost_classes_aclass_cache, cost_classes_mode_cache): New.
	(initiate_regno_cost_classes, setup_cost_classes): New.
	(setup_regno_cost_classes_by_aclass): New.
	(setup_regno_cost_classes_by_mode, finish_regno_cost_classes):
	New.
	(record_reg_classes): Use regno_cost_classes instead of
	cost_classes.  Move checking opposite operand up.
	(record_address_regs): Use regno_cost_classes
	instead of cost_classes.
	(scan_one_insn): Ditto.  Use always general register.
	(print_allocno_costs): Use regno_cost_classes instead of
	cost_classes.
	(print_pseudo_costs): Ditto.  Use Reg_N_REFS.
	(find_costs_and_classes): Set up cost classes for each registers.
	Use also their mode for this.  Use regno_cost_classes instead of
	cost_classes.
	(setup_allocno_class_and_costs): Use regno_cost_classes instead of
	cost_classes.
	(free_ira_costs, ira_init_costs): Don't use cost_classes.
	(ira_costs, ira_set_pseudo_classes): Call
	initiate_regno_cost_classes and finish_regno_cost_classes.

	2010-10-04  Vladimir Makarov  <vmakarov@redhat.com>

	* target-def.h (TARGET_IRA_COVER_CLASSES): Remove.

	* target.def (ira_cover_classes): Remove.

	* doc/tm.texi: Remove TARGET_IRA_COVER_CLASSES and
	IRA_COVER_CLASSES.

	* doc/tm.texi.in: Ditto.

	* ira-conflicts.c: Remove mentioning cover classes from the file.
	Use ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS.  Use
	ALLOCNO_COVER_CLASS_COST instead of ALLOCNO_CLASS_COST.  Fix
	formatting.

	* targhooks.c (default_ira_cover_classes): Remove.

	* targhooks.h (default_ira_cover_classes): Ditto.

	* haifa-sched.c: Remove mentioning cover classes from the file.
	Use ira_reg_pressure_cover instead of ira_reg_class_cover.  Use
	ira_pressure_classes and ira_pressure_classes_num instead of
	ira_reg_class_cover_size and ira_reg_class_cover.  Use
	sched_regno_pressure_class instead of sched_regno_cover_class.
	(mark_regno_birth_or_death, setup_insn_reg_pressure_info): Use
	ira_reg_class_max_nregs instead of ira_reg_class_nregs.

	* ira-int.h: Add 2010 to Copyright.  Remove mentioning cover
	classes from the file.
	(object_hard_regs_t, object_hard_regs_node_t): New typedefs.
	(struct object_hard_regs, struct object_hard_regs_node): New.
	(struct ira_object): New members profitable_hard_regs,
	hard_regs_node, hard_regs_subnodes_start, hard_regs_subnodes_num.
	(struct ira_allocno): Rename cover_class to aclass.  Rename
	cover_class_cost and updated_cover_class_cost to class_cost and
	updated_class_cost.  Remove splay_removed_p and
	left_conflict_size.  Add new members colorable_p.
	(ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICTS_SIZE): Remove.
	(ALLOCNO_COLORABLE_P): New macro.
	(ALLOCNO_COVER_CLASS): Rename to ALLOCNO_CLASS.
	(ALLOCNO_COVER_CLASS_COST, ALLOCNO_UPDATED_COVER_CLASS_COST):
	Rename to ALLOCNO_CLASS_COST and ALLOCNO_UPDATED__CLASS_COST.
	(OBJECT_...): Rename parameter C to O.
	(OBJECT_PROFITABLE_HARD_REGS): New macro.
	(OBJECT_HARD_REGS_NODE, OBJECT_HARD_REGS_SUBNODES_START)
	(OBJECT_HARD_REGS_SUBNODES_NUM): New macros.
	(struct target_ira_int): New members x_ira_max_memory_move_cost,
	x_ira_max_register_move_cost, x_ira_max_may_move_in_cost,
	x_ira_max_may_move_out_cost, x_ira_reg_allocno_class_p,
	x_ira_reg_pressure_class_p, x_ira_important_class_nums,
	x_ira_reg_class_superunion.  Rename x_prohibited_class_mode_reg to
	x_ira_prohibited_class_mode_reg.  Rename x_ira_reg_class_union to
	x_ira_reg_class_subunion.
	(ira_max_memory_move_cost, ira_max_register_move_cost)
	(ira_max_may_move_in_cost, ira_max_may_move_out_cost)
	(ira_reg_allocno_class_p, ira_reg_pressure_class_p)
	(ira_important_class_nums, ira_reg_class_superunion): New macros.
	(prohibited_class_mode_regs): Rename to
	ira_prohibited_class_mode_regs.
	(ira_reg_class_union): Rename to ira_reg_class_subunion.
	(ira_debug_class_cover): Rename to ira_debug_allocno_classes.
	(ira_set_allocno_cover_class): Rename to ira_set_allocno_class.
	(ira_tune_allocno_costs_and_cover_classes): Rename to
	ira_tune_allocno_costs.
	(ira_debug_hard_regs_forest): New.
	(ira_object_conflict_iter_init, ira_object_conflict_iter_cond)
	(ira_object_conflict_iter_next): Fix comments.
	(ira_hard_reg_set_intersection_p, hard_reg_set_size): New
	functions.
	(ira_allocate_and_set_costs, ira_allocate_and_copy_costs): Rename
	cover_class to aclass.
	(ira_allocate_and_accumulate_costs): Ditto.
	(ira_allocate_and_set_or_copy_costs): Ditto.

	* opts.c (decode_options): Remove ira_cover_class check.

	* ira-color.c: Remove mentioning cover classes from the file.  Use
	ALLOCNO_CLASS, ALLOCNO_CLASS_COST, and ALLOCNO_UPDATED_CLASS_COST
	instead of ALLOCNO_COVER_CLASS, ALLOCNO_COVER_CLASS_COST, and
	ALLOCNO_UPDATED_COVER_CLASS_COST.  Fix formatting.
	(splay-tree.h): Remove include.
	(allocno_coalesced_p, processed_coalesced_allocno_bitmap): Move
	before copy_freq_compare_func.
	(allocnos_for_spilling, removed_splay_allocno_vec): Remove.
	(object_hard_regs_vec, object_hard_regs_htab, node_check_tick):
	New definitions.
	(hard_regs_roots, hard_regs_node_vec): Ditto.
	(object_hard_regs_hash, object_hard_regs_eq, find_hard_regs): Ditto.
	(insert_hard_regs, init_object_hard_regs, add_object_hard_regs): Ditto.
	(finish_object_hard_regs, object_hard_regs_compare): Ditto.
	(create_new_object_hard_regs_node): Ditto.
	(add_new_object_hard_regs_node_to_forest): Ditto.
	(add_object_hard_regs_to_forest, collect_object_hard_regs_cover):
	Ditto.
	(setup_object_hard_regs_nodes_parent, first_common_ancestor_node):
	Ditto.
	(print_hard_reg_set, print_hard_regs_subforest): Ditto.
	(print_hard_regs_forest, ira_debug_hard_regs_forest): Ditto.
	(remove_unused_object_hard_regs_nodes): Ditto.
	(enumerate_object_hard_regs_nodes): Ditto.
	(object_hard_regs_nodes_num, object_hard_regs_nodes): Ditto.
	(object_hard_regs_subnode_t): Ditto.
	(struct object_hard_regs_subnode): Ditto.
	(object_hard_regs_subnodes, object_hard_regs_subnode_index): Ditto.
	(setup_object_hard_regs_subnode_index): Ditto.
	(get_object_hard_regs_subnodes_num): Ditto.
	(form_object_hard_regs_nodes_forest): Ditto.
	(finish_object_hard_regs_nodes_tree): Ditto.
	(finish_object_hard_regs_nodes_forest): Ditto.
	(allocnos_have_intersected_live_ranges_p): Rename to
	allocnos_conflict_by_live_ranges_p.  Move before
	copy_freq_compare_func.
	(pseudos_have_intersected_live_ranges_p): Rename to
	conflict_by_live_ranges_p.  Move before copy_freq_compare_func.
	(setup_left_conflict_sizes_p, update_left_conflict_sizes_p): Ditto.
	(empty_profitable_hard_regs, setup_profitable_hard_regs): Ditto.
	(update_copy_costs): Remove assert.  Skip cost update if the hard
	reg does not belong the class.
	(assign_hard_reg): Process only profitable hard regs.
	(uncolorable_allocnos_num): Make it scalar.
	(allocno_spill_priority): Use ALLOCNO_EXCESS_PRESSURE_POINTS_NUM
	and ira_reg_class_max_nregs instead of ALLOCNO_LEFT_CONFLICTS_SIZE
	and ira_reg_class_max_nregs.
	(bucket_allocno_compare_func): Check frequency first.
	(sort_bucket): Add compare function as a parameter.
	(add_allocno_to_ordered_bucket): Assume no coalesced allocnos.
	(uncolorable_allocnos_splay_tree, USE_SPLAY_P): Remove.
	(push_allocno_to_stack): Rewrite for checking new allocno
	colorability.
	(remove_allocno_from_bucket_and_push): Print cost too.  Remove
	assert.
	(push_only_colorable): Pass new parameter to sort_bucket.
	(push_allocno_to_spill): Remove.
	(allocno_spill_priority_compare): Make it inline and rewrite.
	(splay_tree_allocate, splay_tree_free): Remove.
	(allocno_spill_sort_compare): New function.
	(push_allocnos_to_stack): Sort allocnos for spilling once.  Don't
	build and use splay tree.  Choose first allocno in uncolorable
	allocno bucket to spill.  Remove setting spill cost.
	(all_conflicting_hard_regs): Remove.
	(setup_allocno_available_regs_num): Check only profitable hard
	regs.  Print info about hard regs nodes.
	(setup_allocno_left_conflicts_size): Remove.
	(put_allocno_into_bucket): Don't call
	setup_allocno_left_conflicts_size.  Use
	setup_left_conflict_sizes_p.
	(improve_allocation): New.
	(color_allocnos): Call setup_profitable_hard_regs,
	form_object_hard_regs_nodes_forest, improve_allocation,
	finish_object_hard_regs_nodes_forest.  Setup spill cost.
	(print_loop_title): Use pressure classes.
	(color_allocnso): Ditto.
	(do_coloring): Remove allocation and freeing splay_tree_node_pool
	and allocnos_for_spilling.
	(ira_sort_regnos_for_alter_reg): Don't setup members
	{first,next}_coalesced_allocno.
	(color): Remove allocating and freeing removed_splay_allocno_vec.
	(fast_allocation): Use ira_prohibited_class_mode_regs instead of
	prohibited_class_mode_regs.

	* ira-lives.c: Remove mentioning cover classes from the file.  Fix
	formatting.
	(update_allocno_pressure_excess_length): Use pressure classes.
	(inc_register_pressure, dec_register_pressure): Check for pressure
	class.
	(mark_pseudo_regno_live, mark_pseudo_regno_subword_live): Use
	pressure class.  Use ira_reg_class_nregs instead of
	ira_reg_class_max_nregs.
	(mark_pseudo_regno_dead, mark_pseudo_regno_subword_dead): Ditto.
	(mark_hard_reg_live, mark_hard_reg_dead): Use pressure class.
	(single_reg_class): Use ira_reg_class_nregs instead of
	ira_reg_class_max_nregs.
	(process_bb_node_lives): Use pressure classes.

	* ira-emit.c: Remove mentioning cover classes from the file.  Use
	ALLOCNO_CLASS instead of ALLOCNO_COVER_CLASS.  Fix formatting.
	(change_loop): Use pressure classes.
	(modify_move_list): Call ira_set_allocno_class instead of
	ira_set_allocno_cover_class.

	* ira-build.c: Remove mentioning cover classes from the file.  Use
	ALLOCNO_CLASS and ALLOCNO_CLASS_COST instead of
	ALLOCNO_COVER_CLASS and ALLOCNO_COVER_CLASS_COST.  Use
	ALLOCNO_UPDATED_CLASS_COST instead of
	ALLOCNO_UPDATED_COVER_CLASS_COST.  Fix formatting.
	(ira_create_object): Initiate OBJECT_PROFITABLE_HARD_REGS.
	(ira_create_allocno): Remove initialization of
	ALLOCNO_SPLAY_REMOVED_P, ALLOCNO_LEFT_CONFLICT_SIZE.  Initialize
	ALLOCNO_COLORABLE_P.
	(ira_set_allocno_cover_class): Rename to ira_set_allocno_class.
	Update conflict regs for the objects.
	(create_cap_allocno): Remove assert.  Don't propagate
	ALLOCNO_AVAILABLE_REGS_NUM.
	(ira_free_allocno_costs): New function.
	(finish_allocno): Change a part of code into call of
	ira_free_allocno_costs.
	(low_pressure_loop_node_p): Use pressure classes.
	(object_range_compare_func): Don't compare classes.
	(setup_min_max_conflict_allocno_ids): Ditto.

	* loop-invariant.c: Remove mentioning cover classes from the file.
	Use ira_pressure_classes and ira_pressure_classes_num instead of
	ira_reg_class_cover_size and ira_reg_class_cover.  Fix formatting.
	(get_cover_class_and_nregs): Rename to
	get_cover_pressure_and_nregs.  Use ira_reg_class_max_nregs instead
	of ira_reg_class_nregs.  Use reg_allocno_class instead of
	reg_cover_class.
	(get_inv_cost): Use instead ira_stack_reg_pressure_class of
	STACK_REG_COVER_CLASS.
	(get_regno_cover_class): Rename to get_regno_pressure_class.
	(move_loop_invariants): Initialize and finalize regstat.

	* ira.c: Remove mentioning cover classes from the file.  Add
	comments about coloring without cover classes.  Use ALLOCNO_CLASS
	instead of ALLOCNO_COVER_CLASS.  Fix formatting.
	(alloc_reg_class_subclasses, setup_reg_subclasses): Move it before
	setup_class_subset_and_memory_move_costs.
	(setup_stack_reg_pressure_class, setup_pressure_classes): New.
	(setup_cover_and_important_classes): Rename to
	setup_allocno_and_important_classes.
	(setup_class_translate_array): New.
	(setup_class_translate): Call it for allocno and pressure classes.
	(cover_class_order): Rename to allocno_class_order.
	(comp_reg_classes_func): Use ira_allocno_class_translate instead
	of ira_class_translate.
	(reorder_important_classes): Set up ira_important_class_nums.
	(setup_reg_class_relations): Set up ira_reg_class_superunion.
	(print_class_cover): Rename to print_classes.  Add parameter.
	(ira_debug_class_cover): Rename to ira_debug_allocno_classes.
	Print pressure classes too.
	(find_reg_class_closure): Rename to find_reg_classes.  Don't call
	setup_reg_subclasses.
	(ira_hard_regno_cover_class): Rename to
	ira_hard_regno_allocno_class.
	(ira_reg_class_nregs): Rename to ira_reg_class_max_nregs.
	(setup_prohibited_class_mode_regs): Use
	ira_prohibited_class_mode_regs instead of
	prohibited_class_mode_regs.
	(clarify_prohibited_class_mode_regs): New function.
	(ira_init_register_move_cost): Set up ira_max_register_move_cost,
	ira_max_may_move_in_cost, and ira_max_may_move_out_cost.
	(ira_init_once): Initialize them.
	(free_register_move_costs): Process them.
	(ira_init): Move calls of find_reg_classes and
	setup_hard_regno_aclass after setup_prohibited_class_mode_regs.
	Call clarify_prohibited_class_mode_regs.
	(ira_no_alloc_reg): Remove.
	(too_high_register_pressure_p): Use pressure classes.

	* sched-deps.c: Remove mentioning cover classes from the file.
	Use ira_reg_pressure_cover instead of ira_reg_class_cover.  Use
	ira_pressure_classes and ira_pressure_classes_num instead of
	ira_reg_class_cover_size and ira_reg_class_cover.
	(mark_insn_hard_regno_birth, mark_hard_regno_death): Use
	sched_regno_pressure_class instead of sched_regno_cover_class.
	(mark_insn_pseudo_birth, mark_pseudo_death): Ditto.  Use
	ira_reg_class_max_nregs instead of ira_reg_class_nregs.

	* ira.h: Add 2010 to Copyright.
	(ira_no_alloc_reg): Remove external.
	(struct target_ira): Rename x_ira_hard_regno_cover_class,
	x_ira_reg_class_cover_size, x_ira_reg_class_cover, and
	x_ira_class_translate to x_ira_hard_regno_allocno_class,
	x_ira_allocno_classes_num, x_ira_allocno_classes, and
	x_ira_allocno_class_translate.  Add x_ira_pressure_classes_num,
	x_ira_pressure_classes, x_ira_pressure_class_translate, and
	x_ira_stack_reg_pressure_class.  Rename x_ira_reg_class_nregs to
	x_ira_reg_class_max_nregs.  Add x_ira_reg_class_min_nregs and
	x_ira_no_alloc_regs.
	(ira_hard_regno_cover_class): Rename to
	ira_hard_regno_allocno_class.
	(ira_reg_class_cover_size, ira_reg_class_cover): Rename to
	ira_allocno_classes_num and ira_allocno_classes.
	(ira_class_translate): Rename to ira_allocno_class_translate.
	(ira_pressure_classes_num, ira_pressure_classes): New definitions.
	(ira_pressure_class_translate, ira_stack_reg_pressure_class): Ditto.
	(ira_reg_class_nregs): Rename to ira_reg_class_max_nregs.
	(ira_reg_class_min_nregs, ira_stack_reg_pressure_class): New
	(ira_no_alloc_regs): New.

	* ira-costs.c: Add 2010 to Copyright.  Remove mentioning cover
	classes from the file.  Use ALLOCNO_CLASS instead of
	ALLOCNO_COVER_CLASS.  Use ALLOCNO_CLASS_COST instead of
	ALLOCNO_COVER_CLASS_COST.
	(regno_cover_class): Rename to regno_aclass.
	(record_reg_classes): Use ira_reg_class_subunion instead of
	ira_reg_class_union.
	(record_address_regs): Check overflow.
	(scan_one_insn): Ditto.
	(print_allocno_costs): Print total mem cost fore regional
	allocation.
	(print_pseudo_costs): Use REG_N_REFS.
	(find_costs_and_classes): Use classes intersected with them on the
	1st pass. Check overflow.  Use ira_reg_class_subunion instead of
	ira_reg_class_union.  Use ira_allocno_class_translate and
	regno_aclass instead of ira_class_translate and regno_cover_class.
	Modify code for finding regno_aclass.  Setup preferred classes for
	the next pass.
	(setup_allocno_cover_class_and_costs): Rename to
	setup_allocno_class_and_costs.  Use regno_aclass instead of
	regno_cover_class.  Use ira_set_allocno_class instead of
	ira_set_allocno_cover_class.
	(init_costs, finish_costs): Use regno_aclass instead of
	regno_cover_class.
	(ira_costs): Use setup_allocno_class_and_costs instead of
	setup_allocno_cover_class_and_costs.
	(ira_tune_allocno_costs_and_cover_classes): Rename to
	ira_tune_allocno_costs.  Check overflow.  Skip conflict hard regs
	by processing objects.  Use ira_reg_class_max_nregs instead of
	ira_reg_class_nregs.

	* rtl.h (reg_cover_class): Rename to reg_allocno_class.

	* sched-int.h: Remove mentioning cover classes from the file.
	(sched_regno_cover_class): Rename to sched_regno_pressure_class.

	* reginfo.c: Add 2010 to Copyright.  Remove mentioning cover
	classes from the file.
	(struct reg_pref): Rename coverclass into allocnoclass.
	(reg_cover_class): Rename to reg_allocno_class.

	* Makefile.in (ira-color.o): Remove SPLAY_TREE_H from
	dependencies.

	* config/alpha/alpha.h (IRA_COVER_CLASSES): Remove.

	* config/arm/arm.h (IRA_COVER_CLASSES): Ditto.

	* config/avr/avr.h (IRA_COVER_CLASSES): Ditto.

	* config/bfin/bfin.h (IRA_COVER_CLASSES): Ditto.

	* config/cris/cris.h (IRA_COVER_CLASSES): Ditto.

	* config/fr30/fr30.h (IRA_COVER_CLASSES): Ditto.

	* config/frv/frv.h (IRA_COVER_CLASSES): Ditto.

	* config/h8300/h8300.h (IRA_COVER_CLASSES): Ditto.

	* config/i386/i386.h (STACK_REG_COVER_CLASS): Ditto.

	* config/i386/i386.c (TARGET_IRA_COVER_CLASSES)
	(i386_ira_cover_classes): Ditto.

	* config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto.

	* config/iq2000/iq2000.h (IRA_COVER_CLASSES): Ditto.

	* config/m32r/m32r.h (IRA_COVER_CLASSES): Ditto.

	* config/m68k/m68k.h (IRA_COVER_CLASSES): Ditto.

	* config/mcore/mcore.h (IRA_COVER_CLASSES): Ditto.

	* config/mep/mep.h (IRA_COVER_CLASSES): Ditto.

	* config/mips/mips.c (TARGET_IRA_COVER_CLASSES)
	(mips_ira_cover_classes): Ditto.

	* config/mn10300/mn10300.h (IRA_COVER_CLASSES): Ditto.

	* config/moxie/moxie.h (IRA_COVER_CLASSES): Ditto.

	* config/pa/pa64-regs.h (IRA_COVER_CLASSES): Ditto.

	* config/pa/pa32-regs.h (IRA_COVER_CLASSES): Ditto.

	* config/picochip/picochip.h (IRA_COVER_CLASSES): Ditto.

	* config/rs6000/rs6000.h (IRA_COVER_CLASSES_PRE_VSX)
	(IRA_COVER_CLASSES_VSX): Ditto.

	* config/rs6000/rs6000.c (TARGET_IRA_COVER_CLASSES)
	(rs6000_ira_cover_classes): Ditto.

	* config/rx/rx.h (IRA_COVER_CLASSES): Ditto.

	* config/s390/s390.h (IRA_COVER_CLASSES): Ditto.

	* config/score/score.h (IRA_COVER_CLASSES): Ditto.

	* config/sh/sh.h (IRA_COVER_CLASSES): Ditto.

	* config/sparc/sparc.h (IRA_COVER_CLASSES): Ditto.

	* config/spu/spu.h (IRA_COVER_CLASSES): Ditto.

	* config/stormy16/stormy16.h (IRA_COVER_CLASSES): Ditto.

	* config/v850/v850.h (IRA_COVER_CLASSES): Ditto.

	* config/vax/vax.h (IRA_COVER_CLASSES): Ditto.

	* config/xtensa/xtensa.h (IRA_COVER_CLASSES): Ditto.

From-SVN: r171583
2011-03-27 23:16:35 +00:00
Jakub Jelinek d652f226fc Update Copyright years for files modified in 2010.
From-SVN: r168438
2011-01-03 21:52:22 +01:00
Vladimir Makarov 183c87cdb1 ira-int.h (ira_remove_allocno_copy_from_list): Remove.
2010-08-11  Vladimir Makarov  <vmakarov@redhat.com>

	* ira-int.h (ira_remove_allocno_copy_from_list): Remove.

	* ira-build.c (ira_remove_allocno_copy_from_list): Remove.

From-SVN: r163175
2010-08-11 22:09:53 +00:00
Bernd Schmidt ac0ab4f718 ira-build.c (ira_create_object): New arg SUBWORD; all callers changed.
* ira-build.c (ira_create_object): New arg SUBWORD; all callers changed.
	Initialize OBJECT_SUBWORD.
	(ira_create_allocno): Clear ALLOCNO_NUM_OBJECTS.
	(ira_create_allocno_objects): Renamed from ira_create_allocno_object;
	all callers changed.
	(merge_hard_reg_conflicts): Iterate over allocno subobjects.
	(finish_allocno): Likewise.
	(move_allocno_live_ranges, copy_allocno_live_ranges): Likewise.
	(remove_low_level_allocnos): Likewise.
	(update_bad_spill_attribute): Likewise.
	(setup_min_max_allocno_live_range_point): Likewise.
	(sort_conflict_id_map): Likewise.
	(ira_flattening): Likewise.  Use ior_hard_reg_conflicts.
	(ior_hard_reg_conflicts): New function.
	(ior_allocate_object_conflicts): Renamed first argument to OBJ.
	(compress_conflict_vecs): Iterate over objects, not allocnos.
	(ira_add_live_range_to_object): New function.
	(object_range_compare_func): Renamed from allocno_range_compare_func.
	All callers changed.
	(setup_min_max_conflict_allocno_ids): For allocnos with multiple
	subobjects, widen the min/max range of the lowest-order object to
	potentially include all other such low-order objects.
	* ira.c (ira_bad_reload_regno_1): Iterate over allocno subobjects.
	(check_allocation): Likewise.  Use more fine-grained tests for register
	conflicts.
	* ira-color.c (allocnos_have_intersected_live_ranges_p): Iterate over
	allocno subobjects.
	(assign_hard_reg): Keep multiple sets of conflicts.  Make finer-grained
	choices about which bits to set in each set.  Don't use
	ira_hard_reg_not_in_set_p, perform a more elaborate test for conflicts
	using the multiple sets we computed.
	(push_allocno_to_stack): Iterate over allocno subobjects.
	(all_conflicting_hard_regs_coalesced): New static function.
	(setup_allocno_available_regs_num): Use it.
	(setup_allocno_left_conflicts_size): Likewise.  Iterate over allocno
	subobjects.
	(coalesced_allocno_conflict): Test subobject 0 in each allocno.
	(setup_allocno_priorities): Divide ALLOCNO_EXCESS_PRESSURE_POINTS_NUM
	by ALLOCNO_NUM_OBJECTS.
	(calculate_spill_cost): Likewise.
	(color_pass): Express if statement in a more normal way.
	(ira_reassign_conflict_allocnos): Iterate over allocno subobjects.
	(slot_coalesced_allocno_live_ranges_intersect_p): Likewise.
	(setup_slot_coalesced_allocno_live_ranges): Likewise.
	(allocno_reload_assign): Likewise.
	(ira_reassign_pseudos): Likewise.
	(fast_allocation): Likewise.
	* ira-conflicts.c (build_conflict_bit_table): Likewise.
	(print_allocno_conflicts): Likewise.
	(ira_build_conflicts): Likewise.
	(allocnos_conflict_for_copy_p): Renamed from allocnos_conflict_p.  All
	callers changed.  Test subword 0 of each allocno for conflicts.
	(build_object_conflicts): Renamed from build_allocno_conflicts.  All
	callers changed.  Iterate over allocno subobjects.
	* ira-emit.c (modify_move_list): Iterate over allocno subobjects.
	* ira-int.h (struct ira_allocno): New member. num_objects.  Rename object
	to objects and change it into an array.
	(ALLOCNO_OBJECT): Add new argument N.
	(ALLOCNO_NUM_OBJECTS, OBJECT_SUBWORD): New macros.
	(ira_create_allocno_objects): Renamed from ira_create_allocno_object.
	(ior_hard_reg_conflicts): Declare.
	(ira_add_live_range_to_object): Declare.
	(ira_allocno_object_iterator): New.
	(ira_allocno_object_iter_init, ira_allocno_object_iter_cond): New.
	(FOR_EACH_ALLOCNO_OBJECT): New macro.
	* ira-lives.c (objects_live): Renamed from allocnos_live; all uses changed.
	(allocnos_processed): New sparseset.
	(make_object_born): Renamed from make_allocno_born; take an ira_object_t
	argument.  All callers changed.
	(make_object_dead): Renamed from make_allocno_dead; take an ira_object t
	argument.  All callers changed.
	(update_allocno_pressure_excess_length): Take an ira_obejct_t argument.
	All callers changed.
	(mark_pseudo_regno_live): Iterate over allocno subobjects.
	(mark_pseudo_regno_dead): Likewise.
	(mark_pseudo_regno_subword_live, mark_pseudo_regno_subword_dead): New
	functions.
	(mark_ref_live): Detect subword accesses and call
	mark_pseudo_regno_subword_live as appropriate.
	(mark_ref_dead): Likewise for mark_pseudo_regno_subword_dead.
	(process_bb_nodes_live): Deal with object-related updates first; set
	and test bits in allocnos_processed to avoid computing allocno
	statistics more than once.
	(create_start_finish_chains): Iterate over objects, not allocnos.
	(print_object_live_ranges): New function.
	(print_allocno_live_ranges): Use it.
	(ira_create_allocno_live_ranges): Allocate and free allocnos_processed
	and objects_live.

From-SVN: r162418
2010-07-22 15:48:30 +00:00
Bernd Schmidt fa86d337f6 ira-int.h (ira_object_conflict_iterator): Rename from ira_allocno_conflict_iterator.
* ira-int.h (ira_object_conflict_iterator): Rename from
	ira_allocno_conflict_iterator.
	(ira_object_conflict_iter_init): Rename from
	ira_allocno_conflict_iter_init, second arg changed to
	* ira.c (check_allocation): Use FOR_EACH_OBJECT_CONFLICT rather than
	FOR_EACH_ALLOCNO_CONFLICT.
	* ira-color.c (assign_hard_reg, push_allocno_to_stack)
	setup_allocno_left_conflicts_size, coalesced_allocno_conflict_p,
	ira_reassign_conflict_allocnos, ira_reassign_pseudos): Likewise.
	* ira-conflicts.c (print_allocno_conflicts): Likewise.

From-SVN: r162168
2010-07-14 01:56:32 +00:00
Bernd Schmidt 9140d27b2a ira-int.h (struct live_range): Rename allocno member to object and change type to ira_object_t.
* ira-int.h (struct live_range): Rename allocno member to object and change
	type to ira_object_t.
	(struct ira_object): New member live_ranges.
	(struct ira_allocno): Remove member live_ranges.
	(ALLOCNO_LIVE_RANGES): Remove.
	(OBJECT_LIVE_RANGES): New macro.
	(ira_create_live_range, ira_copy_live_range_list,
	ira_merge_live_range_list, ira_live_ranges_intersect_p,
	ira_finish_live_range, ira_finish_live_range_list): Adjust declarations.
	* ira-build.c (ira_create_object): Initialize live ranges here.
	(ira_create_allocno): Not here.
	(ira_create_live_range): Rename from ira_create_allocno_live_range, arg
	changed to ira_object_t, all callers changed.
	(copy_live_range): Rename from copy_allocno_live_range, all callers
	changed.
	(ira_copy_live_range_list): Rename from ira_copy_allocno_live_range_list,
	all callers changed.
	(ira_merge_live_ranges): Rename from ira_merge_allocno_live_range_list,
	all callers changed.
	(ira_live_ranges_intersect_p): Rename from
	ira_allocno_live_ranges_intersect_p, all callers changed.
	(ira_finish_live_range): Rename from ira_finish_allocno_live_range, all
	callers changed.
	(ira_finish_live_range_list): Rename from
	ira_finish_allocno_live_range_list, all callers changed.
	(change_object_in_range_list): Rename from change_allocno_in_range_list,
	last arg changed to ira_object_t, all callers changed.
	(finish_allocno): Changed to expect live ranges in the allocno's object.
	(move_allocno_live_ranges, copy_allocno_live_ranges,
	update_bad_spill_attribute, setup_min_max_allocno_live_range_point,
	ira_flattening, ira_build): Likewise.
	* ira-color.c (allocnos_have_intersected_live_ranges_p,
	slot_coalesced_allocno_live_ranges_intersect,
	setup_slot_coalesced_allocno_live_ranges, fast_allocation): Likewise.
	* ira-conflicts.c (build_conflict_bit_table): Likewise.
	* ira-emit.c (add_range_and_copies_from_move_list): Likewise.
	* ira-lives.c (make_allocno_born, update_allocno_pressure_excess_length,
	make_allocno_dead, create_start_finish_chains,
	remove_some_program_points_and_update_live_ranges,
	ira_debug_live_range_list): Likewise.

From-SVN: r162167
2010-07-14 01:55:02 +00:00