This is the mail archive of the
mailing list for the GCC project.
Re: Hashing regs and subregs
- From: Ian Lance Taylor <iant at google dot com>
- To: "Paulo J. Matos" <paulo at matos-sorge dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 19 Jan 2012 12:15:05 -0800
- Subject: Re: Hashing regs and subregs
- References: <email@example.com>
"Paulo J. Matos" <firstname.lastname@example.org> writes:
> I am developing a new pass and looking for suggestions on the best way
> to record in a data structure which regs and subregs I have seen and
> which mode they are in through the insn chain so I know if I find
> Any suggestions on the best way to do this?
> Are there any rtx hashes already implemented somewhere?
Note that pseudo-regs always have the same mode. Hard regs and subregs
There are lots of ways to record regs and subregs. There is nothing
very wrong with allocate a VEC of size max_reg_num (). Plenty of passes
If you really want a hash table, you can use iterative_hash_rtx to get
the hash code. Just pass 0 as the hash argument.