[llvm] Deduplication of cyclic PHI nodes (PR #86662)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 8 07:11:27 PDT 2024
================
@@ -1406,15 +1446,16 @@ EliminateDuplicatePHINodesSetBasedImpl(BasicBlock *BB,
return PN == getEmptyKey() || PN == getTombstoneKey();
}
- // WARNING: this logic must be kept in sync with
- // Instruction::isIdenticalToWhenDefined()!
static unsigned getHashValueImpl(PHINode *PN) {
----------------
annamthomas wrote:
Why do you want to do this deduplication in the set based implementation: we always do the naive implementation as long as the number of phis in a block is less than 32.
In this way, you don't need to change the hash implementation here.
I'm a bit wary of removing this "WARNING" above and not having any change in the `isIdenticalToWhenDefined` counterpart.
https://github.com/llvm/llvm-project/pull/86662
More information about the llvm-commits
mailing list