"Paulo J. Matos" <pa...@matos-sorge.com> 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 > duplicates. > > 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 do not. 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 do that. 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. Ian