1. 02 Oct, 2012 2 commits
    • ira-int.h (target_ira_int): Add x_ira_useful_class_mode_regs. · a2c19e93
      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
      Richard Sandiford committed
    • ira.h (target_ira): Add x_ira_class_singleton. · c9d74da6
      gcc/
      	* ira.h (target_ira): Add x_ira_class_singleton.
      	(ira_class_singleton): New macro.
      	* ira.c (setup_prohibited_class_mode_regs): Set up ira_class_singleton.
      	* ira-build.c (update_conflict_hard_reg_costs): Use
      	ira_class_singleton to check for classes with a single
      	allocatable register.
      	* ira-lives.c (ira_implicitly_set_insn_hard_regs): Likewise.
      	(single_reg_class): Likewise.  When more than one class is specified,
      	check whether they have the same singleton register.
      	(process_single_reg_class_operands): Require single_reg_class
      	to return NO_REGS or a class with a single allocatable register.
      	Obtain that register from ira_class_singleton.
      
      From-SVN: r191995
      Richard Sandiford committed
  2. 10 Sep, 2012 1 commit
  3. 23 Aug, 2012 1 commit
    • alias.c (rtx_equal_for_memref_p): Convert constant cases. · d8116890
      2012-08-23  Kenneth Zadeck <zadeck@naturalbridge.com>
      
      	* alias.c (rtx_equal_for_memref_p): Convert constant cases.
      	* combine.c (find_single_use_1, mark_used_regs_combine): Convert
      	to CASE_CONST_ANY.
       	* cse.c (exp_equiv_p, canon_reg, fold_rtx, cse_process_notes_1,
      	count_reg_usage): Convert constant cases.
      	* cselib.c (cselib_expand_value_rtx_1): Convert to
      	CASE_CONST_ANY.
      	(cselib_subst_to_values): Convert constant cases.
      	* df-scan.c (df_uses_record): Ditto.
      	* dse.c (const_or_frame_p): Convert case statements to explicit
      	if-then-else using mode classes.
      	* emit-rtl.c (verify_rtx_sharing, copy_insn_1): Convert constant cases.
      	* explow.c (convert_memory_address_addr_space): Ditto.
      	* gcse.c (want_to_gcse_p, oprs_unchanged_p, compute_transp): Ditto.
      	* genattrtab.c (attr_copy_rtx, clear_struct_flag): Ditto.
      	* ira.c (equiv_init_varies_p, contains_replace_regs,
      	memref_referenced_p, rtx_moveable_p): Ditto.
      	* jump.c (mark_jump_label_1): Remove constant cases.
      	(rtx_renumbered_equal_p): Convert to CASE_CONST_UNIQUE.
      	* loop-invariant.c (check_maybe_invariant, hash_invariant_expr_1,
      	invariant_expr_equal_p): Convert to CASE_CONST_ANY.
      	* postreload-gcse.c (oprs_unchanged_p): Convert constant cases.
      	* reginfo.c (reg_scan_mark_refs): Ditto.
      	* regrename.c (scan_rtx): Ditto.
      	* reload1.c (eliminate_regs_1, elimination_effects,
      	scan_paradoxical_subregs): Ditto.
      	* reload.c (operands_match_p, subst_reg_equivs):  Ditto.
      	* resource.c (mark_referenced_resources, mark_set_resources): Ditto.
      	* rtlanal.c (rtx_unstable_p, rtx_varies_p, count_occurrences)
      	(reg_mentioned_p, modified_between_p, modified_in_p)
      	(volatile_insn_p, volatile_refs_p, side_effects_p, may_trap_p_1,
      	inequality_comparisons_p, computed_jump_p_1): Ditto.
      	* rtl.c (copy_rtx, rtx_equal_p_cb, rtx_equal_p): Ditto.
      	* sched-deps.c (sched_analyze_2): Ditto.
      	* valtrack.c (cleanup_auto_inc_dec): Ditto.
      	* rtl.h: (CASE_CONST_SCALAR_INT, CASE_CONST_UNIQUE, 
      	CASE_CONST_ANY): New macros.
      
      From-SVN: r190627
      Kenneth Zadeck committed
  4. 14 Aug, 2012 1 commit
  5. 13 Aug, 2012 1 commit
    • basic-block.h (struct basic_block): Remove loop_depth member, move flags and… · 391886c8
      basic-block.h (struct basic_block): Remove loop_depth member, move flags and index members next to each other.
      
      2012-08-13  Richard Guenther  <rguenther@suse.de>
      
      	* basic-block.h (struct basic_block): Remove loop_depth
      	member, move flags and index members next to each other.
      	* cfgloop.h (bb_loop_depth): New inline function.
      	* cfghooks.c (split_block): Do not set loop_depth.
      	(duplicate_block): Likewise.
      	* cfgloop.c (flow_loop_nodes_find): Likewise.
      	(flow_loops_find): Likewise.
      	(add_bb_to_loop): Likewise.
      	(remove_bb_from_loops): Likewise.
      	* cfgrtl.c (force_nonfallthru_and_redirect): Likewise.
      	* gimple-streamer-in.c (input_bb): Do not stream loop_depth.
      	* gimple-streamer-out.c (output_bb): Likewise.
      	* bt-load.c: Include cfgloop.h.
      	(migrate_btr_defs): Use bb_loop_depth.
      	* cfg.c (dump_bb_info): Likewise.
      	* final.c (compute_alignments): Likewise.
      	* ira.c (update_equiv_regs): Likewise.
      	* tree-ssa-copy.c (init_copy_prop): Likewise.
      	* tree-ssa-dom.c (loop_depth_of_name): Likewise.
      	* tree-ssa-forwprop.c: Include cfgloop.h.
      	(forward_propagate_addr_expr): Use bb_loop_depth.
      	* tree-ssa-pre.c (insert_into_preds_of_block): Likewise.
      	* tree-ssa-sink.c (select_best_block): Likewise.
      	* ipa-inline-analysis.c: Include cfgloop.h.
      	(estimate_function_body_sizes): Use bb_loop_depth.
      	* Makefile.in (tree-ssa-forwprop.o): Depend on $(CFGLOOP_H).
      	(ipa-inline-analysis.o): Likewise.
      	(bt-load.o): Likewise.
      
      	* gcc.dg/tree-prof/update-loopch.c: Adjust.
      
      From-SVN: r190346
      Richard Guenther committed
  6. 08 Aug, 2012 1 commit
  7. 16 Jul, 2012 1 commit
    • system.h (dump_file): Do not define. · 7ee2468b
      gcc/
      	* system.h (dump_file): Do not define.
      	* tree-pass.h: Include dumpfile.h, which is a new file containing...
      	(enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p,
      	dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p,
      	dump_flag_name, dump_file, dump_flags, dump_file_name,
      	get_dump_file_info, struct dump_file_info): all of this, moved to...
      	* dumpfile.h: Here, new file.
      	* tree-dump.h: Include dumpfile.h, but not tree-pass.h.
      	(dump_stmt): Remove prototype for C++ specific function.
      	(dump_enumerated_decls): Move prototype from here...
      	* tree-flow.h (dump_enumerated_decls): ... to here.
      	(get_ref_base_and_extent) Move prototype from here ...
      	* tree.h (get_ref_base_and_extent) ... to here.
      	* tree-ssa-live.c: Do not inclde tree-pretty-print.h, because
      	gimple-pretty-print.h is enough.  Do not include tree-dump.h,
      	include timevar.h and dumpfile.h instead.
      	(struct numbered_tree_d, compare_decls_by_uid,
      	dump_enumerated_decls_push, dump_enumerated_decls): Move from here ...
      	* tree-dfa.c:(struct numbered_tree_d, compare_decls_by_uid,
      	dump_enumerated_decls_push, dump_enumerated_decls):... to here.
      	Do not include timevar.h.
      	* tree.c: Do not include timevar.h.
      	* tree-cfg.c: Do not include langhooks.h, tree-pretty-print.h, and
      	timevar.h.
      	(dump_cfg_stats): Use current_function_name.
      	(gimple_cfg2vcg): Likewise.
      	(dump_function_to_file): Likewise.
      	* df-scan.c: Do not include tree-pass.h and timevar.h.
      	Include dumpfile.h.
      	(df_entry_block_bitmap_verify, df_exit_block_bitmap_verify): Do not
      	use print_current_pass.
      	* df-problems.c: Include dumpfile.h.
      	Always define REG_DEAD_DEBUGGING, avoid #ifdef code, because it
      	leads to errors in the code not selected.
      	(df_note_compute): Do not print_rtl_with_bb here.  Fix compilation
      	bug if REG_DEAD_DEBUGGING is not 0, get_insns is not available here.
      	* lcm.c: Include dumpfile.h.
      	Remove obsolete include of insn-attr.h.
      	* dojump.c (do_compare_rtx_and_jump): Remove failure printing for
      	missing probability notes.
      	* stmt.c: Include dumpfile.h.
      	(emit_case_decision_tree): Re-enable printing expand details only
      	if TDF_DETAILS.
      	* alias.c, auto-inc-dec.c, bb-reorder.c, caller-save.c, cfg.c, 
      	cfgcleanup.c, cfgexpand.c, cfgloop.c, cfgloopmanip.c, cgraph.c, 
      	cgraphclones.c, cgraphunit.c, combine.c, combine-stack-adj.c, 
      	coverage.c, cprop.c, cse.c, cselib.c, dbgcnt.c, dce.c, df-core.c, 
      	dse.c, dwarf2out.c, emit-rtl.c, except.c, expr.c, final.c, 
      	function.c, fwprop.c, gcse.c, gimple-fold.c, 
      	gimple-pretty-print.c, gimple-ssa-strength-reduction.c, 
      	gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, 
      	graphite-dependences.c, graphite-interchange.c, 
      	graphite-optimize-isl.c, graphite-poly.c, 
      	graphite-sese-to-poly.c, haifa-sched.c, hw-doloop.c, ifcvt.c, 
      	ipa.c, ipa-cp.c, ipa-inline-analysis.c, ipa-inline.c, 
      	ipa-inline-transform.c, ipa-prop.c, ipa-pure-const.c, 
      	ipa-reference.c, ipa-split.c, ipa-utils.c, ira.c, ira-emit.c, 
      	jump.c, loop-doloop.c, loop-init.c, loop-invariant.c, loop-iv.c, 
      	loop-unroll.c, loop-unswitch.c, lower-subreg.c, 
      	lto-section-out.c, lto-streamer-in.c, matrix-reorg.c, mcf.c, 
      	mode-switching.c, modulo-sched.c, omega.c, omp-low.c, passes.c, 
      	plugin.c, postreload.c, postreload-gcse.c, predict.c, print-rtl.c, 
      	print-tree.c, profile.c, recog.c, ree.c, regcprop.c, reginfo.c, 
      	regmove.c, regrename.c, reg-stack.c, reload1.c, reorg.c, 
      	sched-rgn.c, sched-vis.c, sel-sched.c, sel-sched-ir.c, 
      	store-motion.c, tracer.c, trans-mem.c, tree-affine.c, 
      	tree-call-cdce.c, tree-cfgcleanup.c, tree-chrec.c, 
      	tree-data-ref.c, tree-diagnostic.c, tree-dump.c,
      	tree-eh.c, tree-flow-inline.h, tree-if-conv.c, tree-into-ssa.c, 
      	tree-mudflap.c, tree-nrv.c, tree-object-size.c, 
      	tree-optimize.c, tree-outof-ssa.c, tree-predcom.c, 
      	tree-pretty-print.c, tree-profile.c, tree-scalar-evolution.c, 
      	tree-sra.c, tree-ssa-address.c, tree-ssa-alias.c, tree-ssa.c, 
      	tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-copy.c, 
      	tree-ssa-copyrename.c,, tree-ssa-dce.c, tree-ssa-dom.c, 
      	tree-ssa-dse.c, tree-ssa-forwprop.c, tree-ssa-ifcombine.c, 
      	tree-ssa-loop.c, tree-ssa-loop-ch.c, tree-ssa-loop-im.c, 
      	tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c, 
      	tree-ssa-loop-manip.c, tree-ssa-loop-niter.c, 
      	tree-ssa-loop-prefetch.c, tree-ssa-loop-unswitch.c, 
      	tree-ssa-math-opts.c, tree-ssa-operands.c, tree-ssa-phiopt.c, 
      	tree-ssa-phiprop.c, tree-ssa-pre.c, tree-ssa-propagate.c, 
      	tree-ssa-reassoc.c, tree-ssa-sccvn.c, tree-ssa-sink.c, 
      	tree-ssa-structalias.c, tree-ssa-tail-merge.c, tree-ssa-ter.c, 
      	tree-ssa-threadedge.c, tree-ssa-threadupdate.c, 
      	tree-ssa-uncprop.c, tree-ssa-uninit.c, 
      	tree-switch-conversion.c, tree-tailcall.c, 
      	tree-vect-data-refs.c, tree-vect-loop.c, 
      	tree-vect-loop-manip.c, tree-vectorizer.c, 
      	tree-vect-patterns.c, tree-vect-slp.c, tree-vect-stmts.c, 
      	tree-vrp.c, value-prof.c, var-tracking.c, web.c: Include tree-pass.h
      	only if needed.  If tree-pass.h is included, do not include timevar.h
      	and dumpfile.h.  If tree-pass.h is not included but dump_file, or
      	dump_flags, or the TDF_* flags are used, include dumpfile.h.
      	If gimple-pretty-print.h is included, don't include tree-pretty-print.h.
      	Remove assorted unnecessary includes.
      
      	* config/mn10300/mn10300.c, config/c6x/c6x.c, config/ia64/ia64.c,
      	config/arm/arm.c, config/bfin/bfin.c, config/frv/frv.c,
      	config/spu/spu.c, config/mep/mep.c, config/i386/i386.c:
      	Include dumpfile.h.
      	* config/rl78/rl78.c: Include dumpfile.h instead of tree-pass.h.
      	* arm/t-arm, avr/t-avr, i386/t-i386, ia64/t-ia64, mep/t-mep,
      	spu/t-spu-elf: Fix dependencies.
      
      c-family/
      	* c-gimplify.c: Include dumpfile.h instead of tree-dump.h.
      	* c-ada-spec.c: Likewise.
      	* c-dump.c (dump_stmt): Move to cp/dump.c, the only user.
      
      c/
      	* c-decl.c: Include dumpfile.h instead of tree-dump.h.
      	* Make-lang.in: Fix dependencies.
      
      cp/
      	* dump.c (dump_stmt): Moved here from c-dump.c.
      	* optimize.c: Include dumpfile.h instead of tree-dump.h.
      	* class.c: Likewise.
      	* decl2.c: Likewise.
      	* Make-lang.in: Fix dependencies.
      
      fortran/
      	* f95-lang.c: Include dumpfile.h instead of tree-dump.h.
      	* Make-lang.in: Fix dependencies.
      
      java/
      	* java-gimplify.c Include dumpfile.h instead of tree-dump.h
      	* Make-lang.in: Fix dependencies.
      
      lto/
      	* lto.c: Do not include timevar.h.
      	* Make-lang.in: Fix dependencies.
      
      ada/
      	* gcc-interface/utils.c: Include timevar.h.
      	* Make-lang.in: Fix dependencies.
      
      From-SVN: r189519
      Steven Bosscher committed
  8. 24 Jun, 2012 1 commit
    • output.h: (current_function_is_leaf... · 416ff32e
      	* output.h: (current_function_is_leaf,
      	current_function_sp_is_unchanging,
      	current_function_uses_only_leaf_regs): Remove.
      	* function.c (current_function_is_leaf,
      	current_function_sp_is_unchanging,
      	current_function_uses_only_leaf_regs): Remove.
      	(rest_of_handle_check_leaf_regs): Set crtl->uses_only_leaf_regs
      	instead of current_function_uses_only_leaf_regs.
      	* function.h (struct rtl_data): New fields sp_is_unchanging,
      	is_leaf, uses_only_leaf_regs.
      	* resource.c (init_resource_info): Replace current_function_is_leaf,
      	current_function_sp_is_unchanging, and
      	current_function_uses_only_leaf_regs with new crtl fields.
      	* sdbout.c (sdbout_symbol): Likewise.
      	* df-core.c (rest_of_handle_df_initialize): Likewise.
      	* ira.c (ira): Likewise.
      	* final.c (final_start_function): Likewise.
      	* reorg.c (fill_simple_delay_slots): Likewise.
      	* regrename.c (check_new_reg_p): Likewise.
      	* stack-ptr-mod.c (notice_stack_pointer_modification_1): Likewise.
      	(notice_stack_pointer_modification): Likewise.
      	* dbxout.c (dbxout_symbol): Likewise.
      	(dbxout_parms): Likewise.
      	* sel-sched.c (init_regs_for_mode): Likewise.
      	* dwarf2out.c (dbx_reg_number): Likewise.
      	(multiple_reg_loc_descriptor): Likewise.
      	* config/i386/i386.c (ix86_frame_pointer_required): Likewise.
      	(gen_pop): Likewise.
      	(ix86_select_alt_pic_regnum): Likewise.
      	(ix86_compute_frame_layout): Likewise.
      	(ix86_finalize_stack_realign_flags): Likewise.
      	(ix86_expand_epilogue): Likewise.
      	* config/rs6000/rs6000.c (rs6000_stack_info): Likewise.
      	* config/h8300/h8300.c (byte_reg): Likewise.
      	* config/c6x/c6x.c (must_reload_pic_reg_p): Likewise.
      	(c6x_save_reg): Likewise.
      	(c6x_compute_frame_layout): Likewise.
      	* config/pa/pa.c (pa_compute_frame_size): Likewise.
      	(pa_output_function_prologue): Likewise.
      	* config/stormy16/stormy16.c (struct xstormy16_stack_layout): Likewise.
      	* config/sparc/sparc.md (attr "leaf_function"): Likewise.
      	* config/sparc/sparc.c (sparc_initial_elimination_offset): Likewise.
      	(sparc_expand_prologue): Likewise.
      	(sparc_flat_expand_prologue): Likewise.
      	(sparc_asm_function_prologue): Likewise.
      	(sparc_output_mi_thunk): Likewise.
      	(sparc_frame_pointer_required): Likewise.
      	* config/epiphany/epiphany.c (epiphany_compute_function_type): Likewise.
      	(epiphany_compute_frame_size): Likewise.
      	* config/lm32/lm32.c (lm32_compute_frame_size): Likewise.
      	* config/cris/cris.c (cris_md_asm_clobbers): Likewise.
      	(cris_frame_pointer_required): Likewise.
      	* config/tilepro/tilepro.c (emit_sp_adjust): Likewise.
      	(tilepro_current_function_is_leaf): Likewise.
      	* config/arm/arm.c (arm_compute_save_reg0_reg12_mask): Likewise.
      	* config/pdp11/pdp11.c (pdp11_expand_epilogue): Likewise.
      	* config/ia64/ia64.c (find_gr_spill): Likewise.
      	(ia64_compute_frame_size): Likewise.
      	(ia64_can_eliminate): Likewise.
      	(ia64_initial_elimination_offset): Likewise.
      	* config/m68k/m68k.c (m68k_save_reg): Likewise.
      	(m68k_expand_epilogue): Likewise.
      	* config/rx/rx.c (rx_get_stack_layout): Likewise.
      	* config/tilegx/tilegx.c (tilegx_current_function_is_leaf): Likewise.
      	* config/picochip/picochip.c (picochip_can_eliminate_link_sp_save):
      	Likewise.
      	(picochip_output_frame_debug): Likewise.
      	* config/sh/sh.c (sh_media_register_for_return): Likewise.
      	(sh_allocate_initial_value): Likewise.
      	(sh_output_mi_thunk): Likewise.
      	* config/microblaze/microblaze.c (microblaze_must_save_register): Likewise.
      	(compute_frame_size): Likewise.
      	(microblaze_initial_elimination_offset): Likewise.
      	(microblaze_expand_prologue): Likewise.
      	(microblaze_expand_epilogue): Likewise.
      	* config/frv/frv.c (frv_expand_epilogue): Likewise.
      	(frv_frame_pointer_required): Likewise.
      	* config/spu/spu.c (get_pic_reg): Likewise.
      	(direct_return): Likewise.
      	(spu_expand_prologue): Likewise.
      	(spu_expand_epilogue): Likewise.
      	(spu_initial_elimination_offset): Likewise.
      	* config/mips/mips.c (mips_global_pointer): Likewise.
      	(mips_cfun_might_clobber_call_saved_reg_p): Likewise.
      	(mips_compute_frame_info): Likewise.
      	* config/mep/mep.c (mep_interrupt_saved_reg): Likewise.
      	(mep_reload_pointer): Likewise.
      	* config/rl78/rl78.c (need_to_save): Likewise.
      	* config/cr16/cr16.c (cr16_compute_save_regs): Likewise.
      	* config/score/score.c (score_compute_frame_size): Likewise.
      	(score_function_prologue): Likewise.
      	* config/bfin/bfin.c (must_save_p): Likewise.
      	(expand_prologue_reg_save): Likewise.
      	(expand_epilogue_reg_restore): Likewise.
      	(bfin_frame_pointer_required): Likewise.
      	(n_regs_saved_by_prologue): Likewise.
      	(add_to_reg): Likewise.
      	(expand_interrupt_handler_prologue): Likewise.
      	(expand_interrupt_handler_epilogue): Likewise.
      	(bfin_expand_prologue): Likewise.
      	* config/avr/avr.c (avr_regs_to_save): Likewise.
      	(avr_prologue_setup_frame): Likewise.
      	(expand_epilogue): Likewise.
      	* config/s390/s390.c (s390_regs_ever_clobbered): Likewise.
      	(s390_register_info): Likewise.
      	(s390_frame_info): Likewise.
      	(s390_init_frame_layout): Likewise.
      	(s390_emit_prologue): Likewise.
      
      From-SVN: r188918
      Steven Bosscher committed
  9. 04 Jun, 2012 1 commit
    • ira-int.h (struct target_ira_int): Add member x_ira_uniform_class_p. · 165f639c
      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
      Vladimir Makarov committed
  10. 31 May, 2012 6 commits
    • ira-int.h (target_ira_int): Rename x_move_cost to x_ira_register_move_cost... · 7cc61ee4
      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
      Richard Sandiford committed
    • ira.c (init_move_cost): Adjust choice of subclasses to match the current… · 48e3d6e9
      ira.c (init_move_cost): Adjust choice of subclasses to match the current ira_init_register_move_cost choice.
      
      gcc/
      	* ira.c (init_move_cost): Adjust choice of subclasses to match
      	the current ira_init_register_move_cost choice.  Use
      	ira_class_subset_p instead of reg_class_subset_p.
      	(ira_init_register_move_cost): Assert that move_cost,
      	may_move_in_cost and may_move_out_cost already hold the desired
      	values for their ira_* equivalents.  For the latter two,
      	ignore classes that can't store a register of the given mode.
      
      From-SVN: r188046
      Richard Sandiford committed
    • ira.c (setup_allocno_and_important_classes): Use ira_class_hard_regs_num to… · 3e575fe2
      ira.c (setup_allocno_and_important_classes): Use ira_class_hard_regs_num to check whether a class has any allocatable registers.
      
      gcc/
      	* ira.c (setup_allocno_and_important_classes): Use
      	ira_class_hard_regs_num to check whether a class has any
      	allocatable registers.
      	(ira_init_register_move_cost): Likewise.
      
      From-SVN: r188045
      Richard Sandiford committed
    • ira.c (init_move_cost): Adjust local variable names to match file conventions. · ed9e2ed0
      gcc/
      	* ira.c (init_move_cost): Adjust local variable names to match
      	file conventions.  Use ira_assert instead of gcc_assert.
      
      From-SVN: r188044
      Richard Sandiford committed
    • regs.h (move_table, [...]): Move these definitions and associated target_globals fields to... · e80ccebc
      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
      Richard Sandiford committed
    • ira.h (target_ira): Delete x_ira_available_class_regs. · f508f827
      gcc/
      	* ira.h (target_ira): Delete x_ira_available_class_regs.
      	(ira_available_class_regs): Delete.
      	* ira.c (setup_available_class_regs): Delete.
      	(setup_alloc_classes): Don't call it.
      	(setup_pressure_classes): Use ira_class_hard_regs_num instead of
      	ira_available_class_regs.
      	* haifa-sched.c (print_curr_reg_pressure, setup_insn_reg_pressure_info)
      	(model_spill_cost): Likewise.
      	* ira-build.c (low_pressure_loop_node_p): Likewise.
      	* ira-color.c (color_pass): Likewise.
      	* ira-emit.c (change_loop): Likewise.
      	* ira-lives.c (inc_register_pressure, dec_register_pressure)
      	(single_reg_class, ira_implicitly_set_insn_hard_regs)
      	(process_bb_node_lives): Likewise.
      	* loop-invariant.c (gain_for_invariant): Likewise.
      
      From-SVN: r188041
      Richard Sandiford committed
  11. 30 May, 2012 1 commit
  12. 29 May, 2012 1 commit
    • integrate.c: Remove. · 6399c0ab
      	* integrate.c: Remove.
      	* integrate.h: Remove.
      	* Makefile.in: Remove make rules for integrate.c and INTEGRATE_H.
      	* config/arm/t-arm: Remove INTEGRATE_H dependency for target files.
      	* config/rs6000/t-rs6000: Likewise
      	* config/spu/t-spu-elf: Likewise.
      	* function.h (get_hard_reg_initial_val, has_hard_reg_initial_val,
      	get_hard_reg_initial_reg, emit_initial_value_sets): Move prototypes
      	from integrate.h to here.
      	(initial_value_entry): New prototype.
      	* reload.h (allocate_initial_values): Remove prototype.
      	* tree.h (set_decl_abstract_flags, set_decl_origin_self): Likewise.
      	* cse.c (fixed_base_plus_p): Don't handle virtual registers for
      	integrate.c.
      	* dwarf2out.c (set_decl_origin_self, set_block_origin_self,
      	set_decl_abstract_flags, set_block_abstract_flags): Move from
      	integrate.c to here, the only user.
      	* expmed.c (extract_fixed_bit_field): Remove outdated comment
      	about integrate.c.
      	* function.c: Don't include integrate.h.
      	(struct initial_value_pair, struct initial_value_struct,
      	get_hard_reg_initial_val, has_hard_reg_initial_val,
      	get_hard_reg_initial_reg, emit_initial_value_sets): Move from
      	integrate.c to here.
      	(initial_value_entry): New function.
      	* genemit.c (main): Don't print integrate.h include line.
      	* ira.c: Don't include integrate.h.
      	(allocate_initial_values): Move from integrate.c to here.
      	(ira): Update allocate_initial_values call.
      	* tree-inline.c: Don't include integrate.h.
      	(function_attribute_inlinable_p): Moved from integrate.c to here.
      	* cfgexpand.c: Don't include integrate.h.
      	* except.c: Likewise.
      	* langhooks.c: Likewise.
      	* passes.c: Likewise.
      	* toplev.c: Likewise.
      	* config/frv/frv.c: Likewise.
      	* config/pa/pa.c: Likewise.
      	* config/spu/spu.c: Likewise.
      	* config/epiphany/epiphany.c: Likewise.
      	* config/mep/mep.c: Likewise.
      	* config/score/score.c: Likewise.
      	* config/picochip/picochip.c: Likewise.
      	* config/sh/sh.c: Likewise.
      	* config/alpha/alpha.c: Likewise.
      	* config/microblaze/microblaze.c: Likewise.
      	* config/mips/mips.c: Likewise.
      	* config/v850/v850.c: Likewise.
      	* config/mmix/mmix.c: Likewise.
      	* config/bfin/bfin.c: Likewise.
      	* config/arm/arm.c: Likewise.
      	* config/s390/s390.c: Likewise.
      	* config/m32r/m32r.c: Likewise.
      	* config/rs6000/rs6000.c: Likewise.
      	* config/c6x/c6x.c: Include function.h instead of integrate.h.
      	* config/tilegx/tilegx.c: Likewise.
      	* config/tilepro/tilepro.c: Likewise.
      
      From-SVN: r187969
      Steven Bosscher committed
  13. 16 May, 2012 1 commit
  14. 15 May, 2012 1 commit
  15. 14 May, 2012 1 commit
    • attribs.c (decl_attributes): Avoid emitting a warning if ATTR_FLAG_BUILT_IN. · e384e6b5
      	* 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
      Bernd Schmidt committed
  16. 10 May, 2012 1 commit
  17. 01 May, 2012 1 commit
    • ira.c (allocated_reg_info_size): New static variable. · fb99ee9b
      	* ira.c (allocated_reg_info_size): New static variable.
      	(expand_reg_info): Manage it. Call
      	setup_preferred_alternate_classes_for_new_pseudos.
      	(ira): Don't do it here.  Remove local allocated_reg_info_size,
      	set the global before calling find_moveable_pseudos.
      	(find_moveable_pseudos): Call expand_reg_info rather than
      	resize_reg_info.
      
      From-SVN: r187019
      Bernd Schmidt committed
  18. 26 Apr, 2012 1 commit
  19. 12 Apr, 2012 1 commit
    • dbgcnt.def (ira_move): New counter. · acf41a74
      	* 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
      Bernd Schmidt committed
  20. 11 Apr, 2012 1 commit
  21. 21 Feb, 2012 1 commit
  22. 24 Jan, 2012 1 commit
    • rtl.h (true_dependence, [...]): Remove varies parameter. · 53d9622b
      gcc/
      	* rtl.h (true_dependence, canon_true_dependence): Remove varies
      	parameter.
      	* alias.c (fixed_scalar_and_varying_struct_p): Delete.
      	(true_dependence_1, write_dependence_p, may_alias_p): Don't call it.
      	(true_dependence_1, true_dependence, canon_true_dependence): Remove
      	varies parameter.
      	* cselib.c (cselib_rtx_varies_p): Delete.
      	(cselib_invalidate_mem): Update call to canon_true_dependence.
      	* dse.c (record_store, check_mem_read_rtx): Likewise.
      	(scan_reads_nospill): Likewise.
      	* cse.c (check_dependence): Likewise.
      	(cse_rtx_varies_p): Delete.
      	* expr.c (safe_from_p): Update call to true_dependence.
      	* ira.c (validate_equiv_mem_from_store): Likewise.
      	(memref_referenced_p): Likewise.
      	* postreload-gcse.c (find_mem_conflicts): Likewise.
      	* sched-deps.c (sched_analyze_2): Likewise.
      	* store-motion.c (load_kills_store): Likewise.
      	* config/frv/frv.c (frv_registers_conflict_p_1): Likewise.
      	* gcse.c (mems_conflict_for_gcse_p): Likewise.
      	(compute_transp): Update call to canon_true_dependence.
      
      From-SVN: r183485
      Richard Sandiford committed
  23. 19 Jan, 2012 1 commit
    • re PR rtl-optimization/40761 (IRA memory hog for insanely nested loops) · 2608d841
      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
      Vladimir Makarov committed
  24. 17 Jan, 2012 1 commit
  25. 22 Dec, 2011 1 commit
    • tree-pass.h (pass_reload): Declare. · ae2b9cb6
      	* tree-pass.h (pass_reload): Declare.
      	* ira.c (overall_cost_before, saved_flag_ira_share_spill_slots):
      	New global variables, moved out of ira.
      	(do_reload): New static function, split off from the second half
      	of ...
      	(ira): ... here.
      	(gate_ira): Remove.
      	(pass_ira): Use TV_IRA, set gate to NULL, and set flags to
      	TODO_dump_func.
      	(rest_of_handle_reload): New static function.
      	(pass_reload): New.
      
      From-SVN: r182624
      Bernd Schmidt committed
  26. 23 Nov, 2011 1 commit
    • re PR rtl-optimization/48455 (Huge code size regression for all ARM configurations) · ffe8727f
      2011-11-23  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR rtl-optimization/48455
      	* doc/invoke.texi (-fira-region): Document default values.
      
      	* flags-types.h (enum ira_region): Add new value
      	IRA_REGION_AUTODETECT.
      
      	* common.opt (fira-region): Set up initial value to
      	IRA_REGION_AUTODETECT.
      
      	* toplev.c (process_options): Set up flag_ira_region depending on
      	-O options.
      
      	* ira.c (ira.c): Remove optimize guard for ira_build.
      
      From-SVN: r181675
      Vladimir Makarov committed
  27. 23 Aug, 2011 1 commit
  28. 19 Aug, 2011 1 commit
  29. 18 Aug, 2011 1 commit
    • re PR rtl-optimization/50107 ([IRA, i386] allocates registers in very non-optimal way) · 9181a6e5
      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
      Vladimir Makarov committed
  30. 19 Jul, 2011 1 commit
    • target.def (class_max_nregs): New hook. · a8c44c52
      	* target.def (class_max_nregs): New hook.
      	* doc/tm.texi.in (TARGET_CLASS_MAX_NREGS): Document.
      	* doc/tm.texi: Regenerate.
      	* targhooks.c (default_class_max_nregs): New function.
      	* targhooks.h (default_class_max_nregs): Declare.
      	* ira.h (target_ira): Change type x_ira_reg_class_max_nregs and
      	x_ira_reg_class_min_nregs arrays to unsigned char.
      	* ira.c (setup_reg_class_nregs): Use TARGET_CLASS_MAX_NREGS target
      	hook instead of CLASS_MAX_NREGS macro.
      	* reginfo.c (restore_register_info): Ditto.
      	* ira-conflicts.c (process_regs_for_copy): Use
      	ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro.
      	Change type rclass and aclass vars to reg_class_t.
      	* ira-costs.c (record_reg_classes): Use ira_reg_class_max_nregs
      	array instead of CLASS_MAX_NREGS macro. Change type rclass var to
      	reg_class_t.
      	* reload.c (combine_reloads, find_reloads, find_reloads_address_1):
      	Use ira_reg_class_max_nregs array instead of CLASS_MAX_NREGS macro.
      
      	* config/i386/i386.h (CLASS_MAX_NREGS): Remove.
      	* config/i386/i386.c (ix86_class_max_nregs): New function.
      	(ix86_register_move_cost): Use TARGET_CLASS_MAX_NREGS target hook
      	instead of CLASS_MAX_NREGS macro.
      	(TARGET_CLASS_MAX_NREGS): Define.
      	* config/avr/avr.h (CLASS_MAX_NREGS): Remove.
      	* config/avr/avr-protos.h (class_max_nregs): Remove declaration.
      	* config/avr/avr.c (class_max_nregs): Remove function.
      	* config/alpha/alpha.h (CLASS_MAX_NREGS): Remove.
      	* config/spu/spu.h (CLASS_MAX_NREGS): Remove.
      	* config/mep/mep.h (CLASS_MAX_NREGS): Remove.
      	* config/m32r/m32r.h (CLASS_MAX_NREGS): Remove.
      	* config/microblaze/microblaze.h (CLASS_MAX_NREGS): Remove.
      	* config/xtensa/xtensa.h (CLASS_MAX_NREGS): Remove.
      	* config/stormy16/stormy16.h (CLASS_MAX_NREGS): Remove.
      	* config/lm32/lm32.h (CLASS_MAX_NREGS): Remove.
      	* config/moxie/moxie.h (CLASS_MAX_NREGS): Remove.
      	* config/iq2000/iq2000.h (CLASS_MAX_NREGS): Remove.
      	* config/mn10300/mn10300.h (CLASS_MAX_NREGS): Remove.
      	* config/score/score.h (CLASS_MAX_NREGS): Remove.
      	* config/vax/vax.h (CLASS_MAX_NREGS): Remove.
      	* config/h8300/h8300.h (CLASS_MAX_NREGS): Remove.
      	* config/v850/v850.h (CLASS_MAX_NREGS): Remove.
      
      From-SVN: r176490
      Anatoly Sokolov committed
  31. 23 Jun, 2011 1 commit
    • re PR middle-end/48770 (wrong code with -O -fprofile-arcs -fPIC -fno-dce… · b0c11403
      re PR middle-end/48770 (wrong code with -O -fprofile-arcs -fPIC -fno-dce -fno-forward-propagate -fno-tree-forwprop)
      
      
      	PR middle-end/48770
      	* reload.h (reload): Change to return a bool.
      	* ira.c (ira): If requested by reload, run a fast DCE pass after
      	reload has completed.  Fix comment typo.
      	* reload1.c (need_dce): New file scoped static.
      	(reload): Set reload_completed here.  Return whether or not a DCE
      	pass after reload is needed.
      	(delete_dead_insn): Set need_dce as needed.
      
      	PR middle-end/48770
      	* gcc.dg/pr48770.c: New test.
      
      From-SVN: r175353
      Jeff Law committed
  32. 14 Jun, 2011 1 commit
  33. 26 May, 2011 1 commit
  34. 24 May, 2011 1 commit
    • re PR rtl-optimization/48971 (ICE with -msoft-float -O2) · 113a5be6
      2011-05-13  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR rtl-optimization/48971
      	* ira.c (setup_pressure_classes): Don't check register move cost
      	for classes with one registers.  Don't add pressure class if there
      	is a pressure class with the same available hard registers.
      	Check contains_reg_of_mode.  Fix a typo in collecting
      	temp_hard_regset.  Ignore hard registers not belonging to a class.
      
      From-SVN: r174123
      Vladimir Makarov committed