public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [lra]  A new branch
@ 2011-05-30 20:14 Vladimir Makarov
  2011-06-07 13:46 ` Joseph S. Myers
  0 siblings, 1 reply; 3+ messages in thread
From: Vladimir Makarov @ 2011-05-30 20:14 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 4893 bytes --]

The new branch lra (Local Register Allocator) has been created.  Some 
info about the LRA project can be found on

http://vmakarov.fedorapeople.org/LRA.html

The initial patch is in the attachment.

2011-05-30  Vladimir Makarov<vmakarov@redhat.com>

	* lra.h: New file.

	* lra-int.h: Ditto.

	* lra.c: Ditto.

	* lra-assigns.c: Ditto.

	* lra-coalesce.c: Ditto.

	* lra-constraints.c: Ditto.

	* lra-eliminatios.c: Ditto.

	* lra-equivs.c: Ditto.

	* lra-lives.c: Ditto.

	* lra-saves.c: Ditto.

	* lra-spills.c: Ditto.

	* Makefile.in (lra.o, lra-assigns.o, lra-coalesce.o): New entries.
	(lra-constraints.o, lra-eliminatios.o, lra-equivs.o): Ditto.
	(lra-lives.o, lra-saves.o, lra-spills.o): Ditto.
	(dwarf2out.o): Add lra.h.
	(ira.o): Ditto.

	* common.opt (flra): New flag.

	* ira.h (x_ira_class_subset_p): Move from
	ira-int.h.
	(ira_class_subset_p): Ditto, modify it.
	(struct target_ira): New member x_ira_reg_class_subset.
	(ira_reg_class_subset): New macro.
	(struct ira_reg_equiv): New.
	(ira_reg_equiv_len): Move from ira-int.h.
	(ira_reg_equiv): New definitions.
	(ira_expand_reg_equiv, ira_update_equiv_info_by_shuffle_insn): New
	prototypes.

	* ira-int.h (x_ira_class_subset_p): Move to ira.h.
	(ira_class_subset_p): Ditto.
	(ira_reg_equiv_len): Move to ira.h.
	(ira_reg_equiv_invariant_p, ira_reg_equiv_const): Remove.
	(ira_equiv_no_lvalue_p): New function.

	* ira.c: Include lra.h.
	(setup_reg_class_relations): Calculate ira_reg_class_subset.
	(ira_init, ira_init_once): Initialize LRA.
	(ira_finish_once): Finish LRA.
	(ira_setup_eliminable_regset): Set frame_pointer_needed.  Call
	lra_init_elimination.
	(ira_reg_equiv_len): Move below.
	(ira_reg_equiv_invariant_p): Remove.
	(ira_reg_equiv_invariant_p, find_reg_equiv_invariant_const):
	Remove.
	(find_reg_equiv_invariant_const): Modify assertion.
	(setup_reg_equiv_init, ira_update_equiv_info_by_shuffle_insn): New
	functions.
	(ira_reg_equiv): New variable.
	(ira_expand_reg_equiv, init_reg_equiv, finish_reg_equiv): New
	functions.
	(no_equiv): Set up ira_reg_equiv instead of reg_rquiv_init.
	(setup_reg_equiv): New function.
	(ira): Call init_reg_equiv, setup_reg_equiv, setup_reg_equiv_init,
	finish_reg_equiv.  Add code for LRA.

	* ira-build.c (ira_flattening): Modify comments.

	* ira-emit.c (create_new_reg): Call ira_expand_equiv.
	(change_loop): Use ira_equiv_no_lvalue_p instead of
	ira_reg_equiv_variant_p and ira_reg_equiv_const.
	(emit_move_list): Call grow_reg_equivs and
	ira_update_equiv_info_by_shuffle_insn.  Use ira_reg_equiv instead
	of ira_reg_equiv_variant_p and ira_reg_equiv_const.

	* ira-color.c (color_pass, move_spill_restore, coalesce_allocnos):
	Use ira_equiv_no_lvalue_p instead of ira_reg_equiv_variant_p and
	ira_reg_equiv_const.
	(coalesce_spill_slots, ira_sort_regnos_for_alter_reg):  Ditto.

	* dwarf2out.c (based_loc_descr): Call lra_eliminate_regs.
	(compute_frame_pointer_to_fb_displacement): Ditto.

	* emit-rtl.c (validate_subreg): Add code for LRA.

	* expr.c (emit_move_insn_1): Add code for LRA.

	* final.c (alter_subreg): Add code for LRA.

	* jump.c (true_regnum): Add code for LRA.

	* recog.c (general_operand, register_operand, scratch_operand):
	Add code for LRA.

	* reginfo.c (max_regno_since_last_resize): New variable.
	(reg_preferred_class, reg_alternate_class, reg_allocno_class): Add
	new assertion.
	(allocate_reg_info): Add more elements than necessary, initialize
	new elements.
	(resize_reg_info): Ditto.
	(reginfo_init): Initialize lengths of the arrays.
	(setup_reg_classes): Change assertion.

	* rtl.h (lra_in_progress): New definition.
	(print_value_slim): New prototype.

	* rtlanal.c (simplify_subreg_regno): Add code for LRA.

	* sched-vis.c (print_value_slim): New function.

	* target.def (register_bank): New hook.

	* targhook.h (default_register_bank): New prototype.

	* targhooks.c (default_register_bank): New function.

	* doc/invoke.texi (-fno-lra): New option.

	* doc/passes.texi: Describe LRA.

	* doc/tm.texi.in (TARGET_REGISTER_BANK): New hook.

	* doc/tm.texi (TARGET_REGISTER_BANK): Regenerate.

	* config/h8300/constraints.md: Add lra_in_progress for constraint
	"d".

	* config/i386/i386.c (ix86_register_bank): New function.
	(ix86_secondary_reload): Add code for LRA.
	(TARGET_REGISTER_BANK): New macro.

	* config/i386/i386.md (*anddi_1, *andsi_1, *andhi_1): Fix
	constraints.

	* config/rs6000/rs6000.c: Include ira.h.
	(rs6000_emit_move): Add code for LRA.
	(rs6000_secondary_reload_class): Ditto.

	* config/s390/s390.md (*movmem_short, *clrmem_short): Fix value
	for cpu_facility.
	(*cpmem_short): Ditto.

	* config/s390/s390.c (s390_decompose_address): Add code for LRA.
	(s390_secondary_reload): Ditto.
	(s390_expand_plus_operand): Move plus generation.

	* config/sparc/constraints.md: Add lra_in_progress for
	constraint "U".

	* config/xtensa/constraints.md: Add lra_in_progress for
	constraints "R" and "T".




[-- Attachment #2: initial-lra.patch.gz --]
[-- Type: x-zip/application, Size: 116491 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lra]  A new branch
  2011-05-30 20:14 [lra] A new branch Vladimir Makarov
@ 2011-06-07 13:46 ` Joseph S. Myers
  2011-06-09 16:20   ` Vladimir Makarov
  0 siblings, 1 reply; 3+ messages in thread
From: Joseph S. Myers @ 2011-06-07 13:46 UTC (permalink / raw)
  To: Vladimir Makarov; +Cc: gcc-patches

On Mon, 30 May 2011, Vladimir Makarov wrote:

> 	* doc/tm.texi.in (TARGET_REGISTER_BANK): New hook.

Please include the text of documentation for new hooks in target.def 
instead of tm.texi.in where possible (so tm.texi.in just has the @hook 
line) - that is, unless it's based on older GFDL-only text.

A lot of the new source files appear to include toplev.h but I don't see 
any uses of functions declared there.  I cleaned up toplev.h includes last 
year; please make sure that source files only include headers they 
actually need.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [lra]  A new branch
  2011-06-07 13:46 ` Joseph S. Myers
@ 2011-06-09 16:20   ` Vladimir Makarov
  0 siblings, 0 replies; 3+ messages in thread
From: Vladimir Makarov @ 2011-06-09 16:20 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: gcc-patches

On 06/07/2011 09:46 AM, Joseph S. Myers wrote:
> On Mon, 30 May 2011, Vladimir Makarov wrote:
>
>> 	* doc/tm.texi.in (TARGET_REGISTER_BANK): New hook.
> Please include the text of documentation for new hooks in target.def
> instead of tm.texi.in where possible (so tm.texi.in just has the @hook
> line) - that is, unless it's based on older GFDL-only text.
>
> A lot of the new source files appear to include toplev.h but I don't see
> any uses of functions declared there.  I cleaned up toplev.h includes last
> year; please make sure that source files only include headers they
> actually need.
>
Thanks for pointing this out.  I've submitted the patch addressing these 
issues:

http://gcc.gnu.org/ml/gcc-patches/2011-06/msg00741.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-06-09 15:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-30 20:14 [lra] A new branch Vladimir Makarov
2011-06-07 13:46 ` Joseph S. Myers
2011-06-09 16:20   ` Vladimir Makarov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).