[PATCH] D158250: [IR] Add more details to StructuralHash
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 18 00:06:31 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/IR/StructuralHash.cpp:83-91
+ if (const IntrinsicInst *InstrinsicInstruction =
+ dyn_cast<IntrinsicInst>(&Inst))
+ hash(InstrinsicInstruction->getIntrinsicID());
+ if (const CallInst *CallInstruction = dyn_cast<CallInst>(&Inst))
+ hash(CallInstruction->getCalledFunction()->getName());
+
+ for (unsigned I = 0; I < Inst.getNumOperands(); ++I) {
----------------
This seems like a very random collection of things to add to the hash. Why isn't this just hashing all the operands? That should cover the operand types, the called function and the intrinsic ID.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D158250/new/
https://reviews.llvm.org/D158250
More information about the llvm-commits
mailing list