This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Removing redundant loads
- From: Jason Merrill <jason at redhat dot com>
- To: law at redhat dot com
- Cc: Diego Novillo <dnovillo at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 30 May 2003 11:07:04 -0400
- Subject: Re: [tree-ssa] Removing redundant loads
- References: <200305301413.h4UEDbLe017767@speedy.slc.redhat.com>
On Fri, 30 May 2003 08:13:37 -0600, email@example.com wrote:
> The fundamental problem is while iterative_hash_expr knows how to deal with
> commutative operations, avail_expr_hash does not. Thus we get different
> hashes because the order of operands in the use operands array is different
> between the two statements. Ugh. We're probably going to have the same
> problem with VUSE/VDEFs.
A simple fix would be to combine the hashes for the operands in a
commutative way, such as addition or xor, rather than feed the previous
value back into iterative_hash_*.
Of course, avail_expr_eq will also need to deal with this issue; perhaps
sorting the ops/vops vecs is the way to go.