[llvm] [ThinLTO] optimize propagateAttributes performance (PR #132917)

Zhaoxuan Jiang via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 8 02:50:20 PDT 2025


================
@@ -300,7 +301,9 @@ template <> struct DenseMapInfo<ValueInfo> {
     assert(isSpecialKey(L) || isSpecialKey(R) || (L.haveGVs() == R.haveGVs()));
     return L.getRef() == R.getRef();
   }
-  static unsigned getHashValue(ValueInfo I) { return (uintptr_t)I.getRef(); }
+  static unsigned getHashValue(ValueInfo I) {
+    return hash_value(((uintptr_t)I.getRef() >> ValueInfo::NumFlagsBit));
----------------
nocchijiang wrote:

OK, I dropped the shift in the latest patch.

https://github.com/llvm/llvm-project/pull/132917


More information about the llvm-commits mailing list