1. 10 Jan, 2013 1 commit
  2. 23 Oct, 2012 1 commit
    • dbxout.c (dbxout_symbol_location): Pass new argument to alter_subreg. · 55a2c322
      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
      Vladimir Makarov committed
  3. 19 Oct, 2012 1 commit
    • common.opt (flag_ira_hoist_pressure): New. · b11f0116
      	gcc/ChangeLog
      	* common.opt (flag_ira_hoist_pressure): New.
      	* doc/invoke.texi (-fira-hoist-pressure): Describe.
      	* ira-costs.c (ira_set_pseudo_classes): New parameter.
      	* ira.h: Update copyright dates.
      	(ira_set_pseudo_classes): Update prototype.
      	* haifa-sched.c (sched_init): Update call.
      	* ira.c (ira): Update call.
      	* regmove.c: Update copyright dates.
      	(regmove_optimize): Update call.
      	* loop-invariant.c: Update copyright dates.
      	(move_loop_invariants): Update call.
      	* gcse.c: (struct bb_data): New structure.
      	(BB_DATA): New macro.
      	(curr_bb, curr_reg_pressure): New static variables.
      	(should_hoist_expr_to_dom): Rename from hoist_expr_reaches_here_p.
      	Change parameter expr_index to expr.
      	New parameters pressure_class, nregs and hoisted_bbs.
      	Use reg pressure to determine the distance expr can be hoisted.
      	(hoist_code): Use reg pressure to direct the hoist process.
      	(get_regno_pressure_class, get_pressure_class_and_nregs)
      	(change_pressure, calculate_bb_reg_pressure): New.
      	(one_code_hoisting_pass): Calculate register pressure. Allocate
      	and free data.
      
      	gcc/testsuite/ChangeLog
      	* testsuite/gcc.dg/hoist-register-pressure.c: New test.
      
      From-SVN: r192604
      Bin Cheng committed
  4. 02 Oct, 2012 1 commit
    • 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
  5. 31 May, 2012 1 commit
    • 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
  6. 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
  7. 29 Mar, 2011 1 commit
    • [multiple changes] · 1756cb66
      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
      Vladimir Makarov committed
  8. 28 Mar, 2011 1 commit
  9. 27 Mar, 2011 1 commit
    • [multiple changes] · fe82cdfb
      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
      Vladimir Makarov committed
  10. 03 Jan, 2011 1 commit
  11. 12 Jul, 2010 1 commit
    • Makefile.in (target-globals.o): Depend on $(IRA_INT_H). · afcc66c4
      gcc/
      	* Makefile.in (target-globals.o): Depend on $(IRA_INT_H).
      	* ira-int.h (ira_max_nregs, ira_important_class_nums): Delete.
      	(target_ira_int): New structure.
      	(default_target_ira_int): Declare.
      	(this_target_ira_int): Declare as a variable or define as a macro.
      	(ira_reg_mode_hard_regset, ira_register_move_cost)
      	(ira_may_move_in_cost, ira_may_move_out_cost, ira_class_subset_p)
      	(ira_non_ordered_class_hard_regs, ira_class_hard_reg_index)
      	(prohibited_class_mode_regs, ira_important_classes_num)
      	(ira_important_classes, ira_reg_class_intersect)
      	(ira_reg_classes_intersect_p, ira_reg_class_super_classes)
      	(ira_reg_class_union): Redefine as macros.
      	* ira.h (target_ira): New structure.
      	(default_target_ira): Declare.
      	(this_target_ira): Declare as a variable or define as a macro.
      	(ira_available_class_regs, ira_hard_regno_cover_class)
      	(ira_reg_class_cover_size, ira_reg_class_cover, ira_class_translate)
      	(ira_reg_class_nregs, ira_memory_move_cost, ira_class_hard_regs)
      	(ira_class_hard_regs_num): Redefine as macros.
      	* ira.c (default_target_ira, default_target_ira_int): New variables.
      	(this_target_ira, this_target_ira_int): New conditional variables.
      	(ira_reg_mode_hard_regset, ira_memory_move_cost)
      	(ira_register_move_cost, ira_may_move_in_cost, ira_may_move_out_cost)
      	(ira_class_subset_p): Delete.
      	(no_unit_alloc_regs): Redefine as a macro.
      	(ira_class_hard_regs, ira_non_ordered_class_hard_regs)
      	(ira_class_hard_regs_num, ira_class_hard_reg_index)
      	(ira_available_class_regs): Delete.
      	(alloc_reg_class_subclasses): Redefine as a macro.
      	(ira_reg_class_cover_size, ira_reg_class_cover)
      	(ira_important_classes_num, ira_important_classes)
      	(ira_important_class_nums, ira_class_translate): Delete.
      	(cover_class_order): Document the variable's lifetime.
      	(reorder_important_classes): Don't set ira_important_class_nums.
      	(ira_reg_class_intersect, ira_reg_classes_intersect_p)
      	(ira_reg_class_super_classes, ira_reg_class_union)
      	(ira_hard_regno_cover_class, ira_reg_class_nregs, ira_max_nregs):
      	Delete.
      	(setup_reg_class_nregs): Don't set ira_max_regs.
      	(prohibited_class_mode_regs): Delete.
      	* target-globals.h (this_target_ira, this_target_ira_int): Declare.
      	(target_globals): Add ira and ira_int fields.
      	(restore_target_globals): Copy the ira field to this_target_ira
      	and the ira_int field to this_target_ira_int.
      	* target-globals.c: Include ira-int.h.
      	(default_target_globals): Initialize the ira and ira_int fields.
      	(save_target_globals): Likewise.
      
      From-SVN: r162102
      Richard Sandiford committed
  12. 05 Jun, 2010 1 commit
    • target.h (struct gcc_target): Add memory_move_cost field. · f5c21ef3
      	* target.h (struct gcc_target): Add memory_move_cost field.
      	* target-def.h (TARGET_MEMORY_MOVE_COST): New.
      	(TARGET_INITIALIZER): Use TARGET_MEMORY_MOVE_COST.
      	* targhooks.c (default_memory_move_cost): New function.
      	* targhooks.h (default_memory_move_cost): Declare function.
      	* reload.h (memory_move_cost): Declare.
      	(memory_move_secondary_cost): Change type of 'in' argument to bool.
      	* reginfo.c (memory_move_cost): New function.
      	(memory_move_secondary_cost): Change type of 'in' argument to bool.
      	* ira.h (ira_memory_move_cost): Update comment.
      	* ira.c: (ira_memory_move_cost): Update comment.
      	(setup_class_subset_and_memory_move_costs): Replace MEMORY_MOVE_COST
      	with memory_move_cost.
      	* postreload.c (reload_cse_simplify_set): (Ditto.).
      	* reload1.c (choose_reload_regs): (Ditto.).
      	* doc/tm.texi (TARGET_MEMORY_MOVE_COST): New.
      	(MEMORY_MOVE_COST):  Revise documentation.
      
      	* config/i386/i386.h (MEMORY_MOVE_COST): Remove macro.
      	* config/i386/i386-protos.h (int ix86_memory_move_cost): Remove.
      	* config/i386/i386.h (ix86_memory_move_cost): Make static. Change
      	type of 'in' argument to bool.
      	(TARGET_MEMORY_MOVE_COST): Define.
      
      From-SVN: r160323
      Anatoly Sokolov committed
  13. 04 Jun, 2010 1 commit
    • re PR rtl-optimization/39871 (Code size increase on ARM due to poor register allocation) · 8ff49c29
      	PR rtl-optimization/39871
      	PR rtl-optimization/40615
      	PR rtl-optimization/42500
      	PR rtl-optimization/42502
      	* ira.c (init_reg_equiv_memory_loc: New function.
      	(ira): Call it twice.
      	* reload.h (calculate_elim_costs_all_insns): Declare.
      	* ira-costs.c: Include "reload.h".
      	(regno_equiv_gains): New static variable.
      	(init_costs): Allocate it.
      	(finish_costs): Free it.
      	(ira_costs): Call calculate_elim_costs_all_insns.
      	(find_costs_and_classes): Take estimated elimination costs
      	into account.
      	(ira_adjust_equiv_reg_cost): New function.
      	* ira.h (ira_adjust_equiv_reg_cost): Declare it.
      	* reload1.c (init_eliminable_invariants, free_reg_equiv,
      	elimination_costs_in_insn, note_reg_elim_costly): New static
      	functions.
      	(elim_bb): New static variable.
      	(reload): Move code out of here into init_eliminable_invariants and
      	free_reg_equiv.  Call them.
      	(calculate_elim_costs_all_insns): New function.
      	(eliminate_regs_1): Declare.  Add extra arg FOR_COSTS;
      	all callers changed.  If FOR_COSTS is true, don't call alter_reg,
      	but call note_reg_elim_costly if we turned a valid memory address
      	into an invalid one.
      	* Makefile.in (ira-costs.o): Depend on reload.h.
      
      testsuite/
      	PR rtl-optimization/39871
      	PR rtl-optimization/40615
      	PR rtl-optimization/42500
      	PR rtl-optimization/42502
      	* gcc.target/arm/eliminate.c: New test.
      
      From-SVN: r160260
      Bernd Schmidt committed
  14. 28 May, 2010 1 commit
  15. 02 Sep, 2009 1 commit
    • invoke.texi (-fsched-pressure): Document it. · ce18efcb
      2009-09-02  Vladimir Makarov  <vmakarov@redhat.com>
      
      	* doc/invoke.texi (-fsched-pressure): Document it.
      	(-fsched-reg-pressure-heuristic): Remove it.
      	
      	* reload.c (ira.h): Include.
      	(find_reloads): Add choosing reload on number of small spilled
      	classes.
      	
      	* haifa-sched.c (ira.h): Include.
      	(sched_pressure_p, sched_regno_cover_class, curr_reg_pressure,
      	saved_reg_pressure, curr_reg_live, saved_reg_live,
      	region_ref_regs): New variables.
      	(sched_init_region_reg_pressure_info, mark_regno_birth_or_death,
      	initiate_reg_pressure_info, setup_ref_regs,
      	initiate_bb_reg_pressure_info, save_reg_pressure,
      	restore_reg_pressure, dying_use_p, print_curr_reg_pressure): New
      	functions.
      	(setup_insn_reg_pressure_info): New function.
      	(rank_for_schedule): Add pressure checking and insn issue time.
      	Remove comparison of insn reg weights.
      	(ready_sort): Set insn reg pressure info.
      	(update_register_pressure, setup_insn_max_reg_pressure,
      	update_reg_and_insn_max_reg_pressure,
      	sched_setup_bb_reg_pressure_info): New functions.
      	(schedule_insn): Add code for printing and updating reg pressure
      	info.
      	(find_set_reg_weight, find_insn_reg_weight): Remove.
      	(ok_for_early_queue_removal): Do nothing if pressure_only_p.
      	(debug_ready_list): Print reg pressure info.
      	(schedule_block): Ditto.  Check insn issue time.
      	(sched_init): Set up sched_pressure_p.  Allocate and set up some
      	reg pressure related info.
      	(sched_finish): Free some reg pressure related info.
      	(fix_tick_ready): Make insn always ready if pressure_p.
      	(init_h_i_d): Don't call find_insn_reg_weight.
      	(haifa_finish_h_i_d): Free insn reg pressure info.
      	
      	* ira-int.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
      	ira_memory_move_cost, ira_class_hard_regs,
      	ira_class_hard_regs_num, ira_no_alloc_regs,
      	ira_available_class_regs, ira_reg_class_cover_size,
      	ira_reg_class_cover, ira_class_translate): Move to ira.h.
      
      	* ira-lives.c (single_reg_class): Check mode to find how many
      	registers are necessary for operand.
      	(ira_implicitly_set_insn_hard_regs): New.
      
      	* common.opt (fsched-pressure): New options.
      	(fsched-reg-pressure-heuristic): Remove.
      
      	* ira.c (setup_eliminable_regset): Rename to
      	ira_setup_eliminable_regset.  Make it external.
      	(expand_reg_info): Pass cover class to setup_reg_classes.
      	(ira): Call resize_reg_info instead of allocate_reg_info.
      
      	* sched-deps.c: Include ira.h.
      	(implicit_reg_pending_clobbers, implicit_reg_pending_uses): New.
      	(create_insn_reg_use, create_insn_reg_set, setup_insn_reg_uses,
      	reg_pressure_info, insn_use_p, mark_insn_pseudo_birth,
      	mark_insn_hard_regno_birth, mark_insn_reg_birth,
      	mark_pseudo_death, mark_hard_regno_death, mark_reg_death,
      	mark_insn_reg_store, mark_insn_reg_clobber,
      	setup_insn_reg_pressure_info): New.
      	(sched_analyze_1): Update implicit_reg_pending_uses.
      	(sched_analyze_insn): Find implicit sets, uses, clobbers of regs.
      	Use them to create dependencies.  Set insn reg uses and pressure
      	info.  Process reg_pending_uses in one place.
      	(free_deps): Free implicit sets.
      	(remove_from_deps): Remove implicit sets if necessary.  Check
      	implicit sets when clearing reg_last_in_use.
      	(init_deps_global): Clear implicit_reg_pending_clobbers and
      	implicit_reg_pending_uses.
      	
      	* ira.h (ira_hard_regno_cover_class, ira_reg_class_nregs,
      	ira_memory_move_cost, ira_class_hard_regs,
      	ira_class_hard_regs_num, ira_no_alloc_regs,
      	ira_available_class_regs, ira_reg_class_cover_size,
      	ira_reg_class_cover, ira_class_translate): Move from ira-int.h.
      	(ira_setup_eliminable_regset, ira_set_pseudo_classes,
      	ira_implicitly_set_insn_hard_regs): New prototypes.
      	
      	* ira-costs.c (pseudo_classes_defined_p, allocno_p,
      	cost_elements_num): New variables.
      	(allocno_costs, total_costs): Rename to costs and
      	total_allocno_costs.
      	(COSTS_OF_ALLOCNO): Rename to COSTS.
      	(allocno_pref): Rename to pref.
      	(allocno_pref_buffer): Rename to pref_buffer.
      	(common_classes): Rename to regno_cover_class.
      	(COST_INDEX): New.
      	(record_reg_classes): Set allocno attributes only if allocno_p.
      	(record_address_regs): Ditto.  Use COST_INDEX instead of
      	ALLOCNO_NUM.
      	(scan_one_insn): Use COST_INDEX and COSTS instead of ALLOCNO_NUM
      	and COSTS_OF_ALLOCNO.
      	(print_costs): Rename to print_allocno_costs.
      	(print_pseudo_costs): New.
      	(process_bb_node_for_costs): Split into 2 functions with new
      	function process_bb_for_costs.  Pass BB to process_bb_for_costs.
      	(find_allocno_class_costs): Rename to find_costs_and_classes.  Add
      	new parameter dump_file.  Use cost_elements_num instead of
      	ira_allocnos_num.  Make one iteration if preferred classes were
      	already calculated for scheduler.  Make 2 versions of code
      	depending on allocno_p.
      	(setup_allocno_cover_class_and_costs): Check allocno_p.  Use
      	regno_cover_class and COSTS instead of common_classes and
      	COSTS_OF_ALLOCNO.
      	(init_costs, finish_costs): New.
      	(ira_costs): Set up allocno_p and cost_elements_num.  Call
      	init_costs and finish_costs.
      	(ira_set_pseudo_classes): New.
      
      	* rtl.h (allocate_reg_info): Remove.
      	(resize_reg_info): Change return type.
      	(reg_cover_class): New.
      	(setup_reg_classes): Add new parameter.
      	
      	* sched-int.h (struct deps_reg): New member implicit_sets.
      	(sched_pressure_p, sched_regno_cover_class): New external
      	definitions.
      	(INCREASE_BITS): New macro.
      	(struct reg_pressure_data, struct reg_use_data): New.
      	(struct _haifa_insn_data): Remove reg_weight.  Add members
      	reg_pressure, reg_use_list, reg_set_list, and
      	reg_pressure_excess_cost_change.
      	(struct deps): New member implicit_sets.
      	(pressure_p): New variable.
      	(COVER_CLASS_BITS, INCREASE_BITS): New macros.
      	(struct reg_pressure_data, struct reg_use_data): New.
      	(INSN_REG_WEIGHT): Remove.
      	(INSN_REG_PRESSURE, INSN_MAX_REG_PRESSURE, INSN_REG_USE_LIST,
      	INSN_REG_SET_LIST, INSN_REG_PRESSURE_EXCESS_COST_CHANGE): New
      	macros.
      	(sched_init_region_reg_pressure_info,
      	sched_setup_bb_reg_pressure_info): New prototypes.
      	
              * reginfo.c (struct reg_pref): New member coverclass.
      	(reg_cover_class): New function.
      	(reginfo_init, pass_reginfo_init): Move after free_reg_info.
      	(reg_info_size): New variable.
      	(allocate_reg_info): Make static.  Setup reg_info_size.
      	(resize_reg_info): Use reg_info_size.  Return flag of resizing.
      	(setup_reg_classes): Add a new parameter.  Setup cover class too.
      
      	* Makefile.in (reload.o, haifa-sched.o, sched-deps.o): Add ira.h to the
      	dependencies.
      
      	* sched-rgn.c (deps_join): Set up implicit_sets.
      	(schedule_region): Set up region and basic blocks pressure
      	relative info.
      	
      	* passes.c (init_optimization_passes): Move
      	pass_subregs_of_mode_init before pass_sched.
      
      From-SVN: r151348
      Vladimir Makarov committed
  16. 20 Feb, 2009 1 commit
  17. 06 Jan, 2009 1 commit
    • re PR rtl-optimization/38583 (huge test case makes register allocator run out of… · 311aab06
      re PR rtl-optimization/38583 (huge test case makes register allocator run out of memory while constructing the conflict graph)
      
      2009-01-05  Vladimir Makarov  <vmakarov@redhat.com>
      
      	PR rtl-optimization/38583
      	* params.h (IRA_MAX_CONFLICT_TABLE_SIZE): New macro.
      
      	* params.def (ira-max-conflict-table-size): New.
      
      	* doc/invoke.texi (ira-max-conflict-table-size): Decribe.
      	
      	* ira.h (ira_conflicts_p): New external definition.
      	
      	* ira-conflicts.c (build_conflict_bit_table): Do not build too big
      	table.  Report this.  Return result of building.
      	(ira_build_conflicts): Use ira_conflicts_p.  Check result of
      	building conflict table.
      
      	* ira-color.c (fast_allocation): Use num instead of
      	ira_allocnos_num.
      	(ira_color): Use ira_conflicts_p.
      	
      	* global.c: Include ira.h.
      	(pseudo_for_reload_consideration_p, build_insn_chain): Use
      	ira_conflicts_p.
      
      	* Makefile.in (global.o): Add ira.h.
      	
      	* ira-build.c (mark_all_loops_for_removal,
      	propagate_some_info_from_allocno): New.
      	(remove_unnecessary_allocnos): Call
      	propagate_some_info_from_allocno.
      	(remove_low_level_allocnos): New.
      	(remove_unnecessary_regions): Add parameter.  Call
      	mark_all_loops_for_removal and remove_low_level_allocnos.  Pass
      	parameter to remove_unnecessary_regions.
      	(ira_build): Remove all regions but root if the conflict table was
      	not built.  Update conflict hard regs for allocnos crossing calls.
      
      	* ira.c (ira_conflicts_p): New global.
      	(ira): Define and use ira_conflicts_p.
      
      	* reload1.c (compute_use_by_pseudos, reload, count_pseudo,
      	count_spilled_pseudo, find_reg, alter_reg, finish_spills,
      	emit_input_reload_insns, delete_output_reload): Use
      	ira_conflicts_p.
      
      From-SVN: r143112
      Vladimir Makarov committed
  18. 03 Sep, 2008 1 commit
  19. 26 Aug, 2008 1 commit
    • [multiple changes] · 058e97ec
      2008-08-26  Vladimir Makarov  <vmakarov@redhat.com>
      
      	* ira-build.c, ira-color.c, ira-costs.c, ira.h, ira-lives.c,
      	ira.c, ira-conflicts.c, ira-emit.c, ira-int.h: New files.
      
      	* doc/passes.texi: Describe IRA.
      
      	* doc/tm.texi (IRA_COVER_CLASSES,
      	IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Describe the new macros.
      
      	* doc/invoke.texi (ira-max-loops-num): Describe the new parameter.
      	(-fira, -fira-algorithm, -fira-coalesce, -fno-ira-move-spills,
      	-fira-propagate-cost, -fno-ira-share-save-slots,
      	-fno-ira-share-spill-slots, -fira-verbose): Describe new options.
      
      	* flags.h (ira_algorithm): New enumeration.
      	(flag_ira_algorithm, flag_ira_verbose): New external variable
      	declarations.
      
      	* postreload.c (gate_handle_postreload): Don't do post reload
      	optimizations unless the reload is completed.
      
      	* reload.c (push_reload, find_dummy_reload): Use DF_LR_OUT for
      	IRA.
      
      	* tree-pass.h (pass_ira): New external variable declaration.
      
      	* reload.h: Add 2008 to the Copyright.
          
      	* cfgloopanal.c: Include params.h.
      	(estimate_reg_pressure_cost): Decrease cost for IRA optimization
      	mode.
          
      	* params.h (IRA_MAX_LOOPS_NUM): New macro.
      
      	* toplev.c (ira.h): New include.
      	(flag_ira_algorithm, flag_ira_verbose): New external variables.
      	(backend_init_target): Call ira_init.
      	(backend_init): Call ira_init_once.
      	(finalize): Call finish_ira_once.
      
      	* toplev.h (flag_ira, flag_ira_coalesce, flag_ira_move_spills,
      	flag_ira_share_save_slots, flag_ira_share_spill_slots): New
      	external variables.
      
      	* regs.h (contains_reg_of_mode, move_cost, may_move_in_cost,
      	may_move_out_cost): New external variable declarations.
      	(move_table): New typedef.
          
      	* caller-save.c: Include headers output.h and ira.h.
      	(no_caller_save_reg_set): New global variable.
      	(save_slots_num, save_slots): New variables.
      	(reg_save_code, reg_restore_code, add_stored_regs): Add
      	prototypes.
      	(init_caller_save): Set up no_caller_save_reg_set.
      	(init_save_areas): Reset save_slots_num.
      	(saved_hard_reg): New structure.
      	(hard_reg_map, saved_regs_num, all_saved_regs): New variables.
      	(initiate_saved_hard_regs, new_saved_hard_reg,
      	finish_saved_hard_regs, saved_hard_reg_compare_func): New
      	functions.
      	(setup_save_areas): Add code for sharing stack slots.
      	(all_blocks): New variable.
      	(save_call_clobbered_regs): Process pseudo-register too.
      	(mark_set_regs): Process pseudo-register too.
      	(insert_one_insn): Put the insn after bb note in a empty basic
      	block.  Add insn check.
          
      	* global.c (eliminable_regset): Make it external.
      	(mark_elimination): Use DF_LR_IN for IRA.
      	(pseudo_for_reload_consideration_p): New.
      	(build_insn_chain): Make it external.  Don't ignore spilled
      	pseudos for IRA.  Use pseudo_for_reload_consideration_p.
      	(gate_handle_global_alloc): New function.
      	(pass_global_alloc): Add the gate function.
      
      	* opts.c (decode_options): Set up flag_ira.  Print the warning for
      	-fira.
      	(common_handle_option): Process -fira-algorithm and -fira-verbose.
      
      	* timevar.def (TV_IRA, TV_RELOAD): New passes.
      
      	* regmove.c (regmove_optimize): Don't do replacement of output for
      	IRA.
      
      	* hard-reg-set.h (no_caller_save_reg_set, reg_class_subclasses):
      	New external variable declarations.
      
      	* local-alloc.c (update_equiv_regs): Make it external.  Return
      	true if jump label rebuilding should be done.  Rescan new_insn for
      	notes.
      	(gate_handle_local_alloc): New function.
      	(pass_local_alloc): Add the gate function.
      
      	* alias.c (value_addr_p, stack_addr_p): New functions.
      	(nonoverlapping_memrefs_p): Use them for IRA.
      
      	* common.opt (fira, fira-algorithm, fira-coalesce,
      	fira-move-spills, fira-share-save-slots, fira-share-spill-slots,
      	fira-verbose): New options.
      
      	* regclass.c (reg_class_subclasses, contains_reg_of_mode,
      	move_cost, may_move_in_cost, may_move_out_cost): Make the
      	variables external.
      	(move_table): Remove typedef.
      	(init_move_cost): Make it external.
      	(allocate_reg_info, resize_reg_info, setup_reg_classes): New
      	functions.
      
      	* rtl.h (init_move_cost, allocate_reg_info, resize_reg_info,
      	setup_reg_classes): New function prototypes.
      	(eliminable_regset): New external variable declaration.
      	(build_insn_chain, update_equiv_regs): New function prototypes.
          
      	* Makefile.in (IRA_INT_H): New definition.
      	(OBJS-common): Add ira.o, ira-build.o, ira-costs.o,
      	ira-conflicts.o, ira-color.o, ira-emit.o, and ira-lives.o.
      	(reload1.o, toplev.o): Add dependence on ira.h.
      	(cfgloopanal.o): Add PARAMS_H.
      	(caller-save.o): Add dependence on output.h and ira.h.
      	(ira.o, ira-build.o, ira-costs.o, ira-conflicts.o, ira-color.o,
      	ira-emit.o, ira-lives.o): New entries.
      
      	* passes.c (pass_ira): New pass.
      
      	* params.def (PARAM_IRA_MAX_LOOPS_NUM): New parameter.
      
      	* reload1.c (ira.h): Include the header.
      	(changed_allocation_pseudos): New bitmap.
      	(init_reload): Initiate the bitmap.
      	(compute_use_by_pseudos): Permits spilled registers in FROM.
      	(temp_pseudo_reg_arr): New variable.
      	(reload): Allocate and free temp_pseudo_reg_arr.  Sort pseudos for
      	IRA.  Call alter_reg with the additional parameter.  Don't clear
      	spilled_pseudos for IRA.  Restore original insn chain for IRA.
      	Clear changed_allocation_pseudos at the end of reload.
      	(calculate_needs_all_insns): Call IRA's mark_memory_move_deletion.
      	(hard_regno_to_pseudo_regno): New variable.
      	(count_pseudo): Check spilled pseudos.  Set up
      	hard_regno_to_pseudo_regno.
      	(count_spilled_pseudo): Check spilled pseudos. Update
      	hard_regno_to_pseudo_regno.
      	(find_reg): Use better_spill_reload_regno_p.  Check
      	hard_regno_to_pseudo_regno.
      	(alter_reg): Set up spilled_pseudos.  Add a new parameter.  Add
      	code for IRA.
      	(eliminate_regs_1): Use additional parameter for alter_reg.
      	(finish_spills): Set up pseudo_previous_regs only for spilled
      	pseudos.  Call reassign_pseudos once for all spilled pseudos, pass
      	more arguments.  Don't clear live_throughout and dead_or_set for
      	spilled pseudos.  Use additional parameter for alter_reg.  Call
      	mark_allocation_change.  Set up changed_allocation_pseudos.
      	Remove sanity check.
      	(emit_input_reload_insns, delete_output_reload): Use additional
      	parameter for alter_reg.  Call mark_allocation_change.
      	(substitute, gen_reload_chain_without_interm_reg_p): New
      	functions.
      	(reloads_conflict): Use gen_reload_chain_without_interm_reg_p.
          
      	* testsuite/gcc.dg/20080410-1.c: New file.
      	
      	* config/s390/s390.h (IRA_COVER_CLASSES,
      	IRA_HARD_REGNO_ADD_COST_MULTIPLIER): Define.
      
      	* config/sparc/sparc.h (IRA_COVER_CLASSES): New macro.
      
      	* config/i386/i386.h (IRA_COVER_CLASSES): Ditto.
      
      	* config/ia64/ia64.h (IRA_COVER_CLASSES): Ditto.
      
      	* config/rs6000/rs6000.h (IRA_COVER_CLASSES): Ditto.
      
      	* config/arm/arm.h (IRA_COVER_CLASSES): Ditto.
          
      	* config/alpha/alpha.h (IRA_COVER_CLASSES): Ditto.
          
      	2008-08-24  Jeff Law  <law@redhat.com>
      	* ira.c (setup_reg_class_intersect_union): Prefer smallest class
      	when ignoring unavailable registers.
      
      	2008-08-24  Jeff Law  <law@redhat.com>
      	* ira-color.c (coalesced_pseudo_reg_slot_compare): Check
      	FRAME_GROWS_DOWNWARD and STACK_GROWS_DOWNWARD.
      	* ira.c (setup_eliminable_regset): Check stack_realign_needed.
      	* config/mn10300/mn10300.h (IRA_COVER_CLASSES): New macro.
      
      	2008-06-03 Steve Chamberlain <steve.chamberlain@gmail.com>
      	* ira-build.c (allocno_range_compare_func): Stabilize sort.
      
      	2008-05-29 Andy Hutchinson <hutchinsonandy@aim.com>
      	* config/avr/avr.h (IRA_COVER_CLASSES): New macro.
      	* reload1.c (find_reg): Process registers in register allocation order.
      
      	2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
      	* toplev.c (backend_init_target): Move ira_init call from
      	here...
      	(lang_dependent_init_target): ...to here.
      
      	2008-05-10 Richard Sandiford <rsandifo@nildram.co.uk>
      	* ira.c (setup_class_subset_and_memory_move_costs): Don't
      	calculate memory move costs for NO_REGS.
      
      	2008-05-05 Kaz Kojima <kkojima@gcc.gnu.org>
      	* ira-color.c (ira_fast_allocation): Use no_stack_reg_p only if
      	STACK_REGS is defined.
      
      	2008-04-08 Andrew Pinski <andrew_pinski@playstation.sony.com>
      	* config/spu/spu.h (IRA_COVER_CLASSES): New macro.
      
      	2008-04-04 Bernd Schmidt <bernd.schmidt@analog.com>
      	* config/bfin/bfin.h (IRA_COVER_CLASSES): New macro.
      
      	2008-04-04 Kaz Kojima <kkojima@gcc.gnu.org>
      	* config/sh/sh.h (IRA_COVER_CLASSES): Define.
      	* config/sh/sh.md (movsicc_true+3): Check if emit returns a
      	barrier.
      
      From-SVN: r139590
      Vladimir Makarov committed