[PATCH] D120121: [StableHashing] Hash vregs with multiple defs
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 18 07:18:52 PST 2022
foad added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineStableHash.cpp:69
+ for (auto &Def : MRI.def_instructions(MO.getReg()))
+ DefOpcodes.push_back(Def.getOpcode());
+ return hash_combine_range(DefOpcodes.begin(), DefOpcodes.end());
----------------
arsenm wrote:
> If this only uses the opcode, won't it collide if you have multiple defs of the same register by the same opcode?
You'd get collisions anyway if different instructions with the same opcode define the register, but that was presumably by design, to make the hashing more stable somehow. I don't see how having multiple defs with the same opcode makes it any worse.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D120121/new/
https://reviews.llvm.org/D120121
More information about the llvm-commits
mailing list