This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Out Of SSA Rewrite - Coalesce hash table patch - checked in
- From: Andrew MacLeod <amacleod at redhat dot com>
- To: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 30 Nov 2006 16:39:41 -0500
- Subject: Out Of SSA Rewrite - Coalesce hash table patch - checked in
-------- Forwarded Message --------
> From: Andrew MacLeod <amacleod@redhat.com>
> To: gcc-patches <gcc-patches@gcc.gnu.org>
> Subject: Out Of SSA Rewrite - Coalesce hash table patch
> Date: Tue, 21 Nov 2006 13:55:37 -0500
>
> This patch changes the coalesce list from a linked list representation
> to a hash table implementation. Nothing particularly fascinating or
> interesting. I fooled around with numerous hash functions, and this one
> seems to work as well/better than most.
>
> bootstrapped and regression tested on i686-pc-linux-gnu.
>
Re-bootstrapped with mainline on i686-pc-linux-gnu, and just checked in.
>
> * tree-ssa-live.c (create_coalesce_list): Create a hash table.
> (COALESCE_HASH_FN): New. Define hash function.
> (partition_pair_map_hash): New. Hash value for a partition pair.
> (partition_pair_map_eq): New. Equality for hash pairs.
> (create_coalesce_list): Create hash table.
> (delete_coalesce_list): Free hash table.
> (find_partition_pair): Find/create pairs in hash table.
> (compare_pairs): Sort pairs in ascending order now.
> (num_coalesce_pairs): New. Number of pairs in hash table.
> (struct partition_pair_iterator): Iterator struct for pair table.
> (first_partition_pair): Iterator function for first pair.
> (end_partition_pair_p): Iterator function for end of iteration.
> (next_partition_pair): Iterator function for next pair.
> (FOR_EACH_PARTITION_PAIR): Macro for iterating over pairs.
> (sort_coalesce_list): Sort pairs from hash table into an array.
> (pop_best_coalesce): Take pairs from the array.
> (dump_coalesce_list): Update to use hash table or sorted array.
> * tree-ssa-live.h (struct partition_pair_d): Remove next field.
> (struct coalesce_list_d): Add hash table related fields.
>
>
>