This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 48/50] varasm.c:const_rtx_hash
- From: Jeff Law <law at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org, rdsandiford at googlemail dot com
- Date: Tue, 05 Aug 2014 16:18:08 -0600
- Subject: Re: [PATCH 48/50] varasm.c:const_rtx_hash
- Authentication-results: sourceware.org; auth=none
- References: <87y4v5d77q dot fsf at googlemail dot com> <877g2p63ds dot fsf at googlemail dot com>
On 08/03/14 08:42, Richard Sandiford wrote:
This is fine. Though I wonder if it's going to conflict with Andi's
work on inchash. If so, consider adjustments to handle Andi's changes
pre-approved. Just post the final patch for archival purposes if you
need to change it.
const_rtx_hash_1 had code to hash all elements of a CONST_VECTOR,
but const_rtx_hash also hashes all subrtxes, so we'd end up hashing
the same thing twice. This looked unintentional so I just removed the
CONST_VECTOR case. If instead it was a deliberate decision then I think
it deserves a comment.
* varasm.c: Include rtl-iter.h.
(const_rtx_hash_1): Take a const_rtx rather than an rtx *.
Remove the pointer to the cumulative hashval_t and just return
the hash for this rtx instead. Remove recursive CONST_VECTOR case.
(const_rtx_hash): Use FOR_EACH_SUBRTX instead of for_each_rtx.
Accumulate the hashval_ts here instead of const_rtx_hash_1.