Out Of SSA Rewrite - Cleanup patch

Andrew MacLeod amacleod@redhat.com
Tue Nov 21 19:01:00 GMT 2006


This patch cleans up the code quite a bit. Nothing is added, but a few
things are removed.

First, out-of-ssa was written before immediate-uses were integrated, so
during the building of the ssa_name partitioning, reference counts were
calculated for TER to use.  imm-uses now provides this info for free,
but out-of-ssa was never updated to use those. All references to these
calculated reference counts are removed.

Out-of-ssa was also written before we understood what exactly would be
required, so it has lots of flexibility built in.  With this rewrite,
the options -fno-tree-lrs and -fcombine-temps are being removed, and all
the code associated with them.  With the removal of that code, a lot o
fthe underlying abstractions can also be removed. The remaining ugly
bits have to wait for the coalescer rewrite.

So this patch really just removes a bunch of code.

Bootstrapped and regression tested on i686-pc-linux-gnu.

Andrew


	* common.opt (ftree-combine-temps): Remove.
	* tree-outof-ssa.c (SSANORM_COMBINE_TEMPS): Remove.
	(coalesce_ssa_name): Don't check for combine-temps.
	(coalesce_vars): Remove.
	(check_replaceable): Use num_imm_uses.
	(remove_ssa_form, insert_backedge_copies, rewrite_out_of_ssa): Don't 
	check for combine-temps.
	(rewrite_out_of_ssa): Never create a ref_count in the var_map.
	* tree-ssa-copyrename.c (copy_rename_partition_coalesce): Change parms
	to register_ssa_partition calls.
	* tree-ssa-live.c (register_ssa_partition): Remove prototype.
	(init_var_map, delete_var_map): remove refernces to ref_count.
	(create_ssa_var_map): Never calculate a ref count.
	(type_var_init): Remove.
	* tree-ssa-live.h (typedef struct _var_map): Remove ref_count.
	(SSA_VAR_MAP_REF_COUNT): Delete.
	(create_ssa_var_map): Change Prototype to have no parameters.
	(version_ref_count): Delete.
	(register_ssa_partition): Remove 'is_use' paramater and don't set the
	ref_count vector.
	(type_var_num, type_var, type_var_first_partition,
	type_var_next_partition, type_var_dump, type_var_delete,
	type_var_remove_partition, type_var_find, type_var_compact,
	type_var_decompact): Remove.

	testsuite/ChangeLog
	* gcc.dg/max-1.c: Remove reference to -fno-tree-lrs option.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: cleanup1.diff
Type: text/x-patch
Size: 23194 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061121/c3e20df7/attachment.bin>


More information about the Gcc-patches mailing list