[flang-commits] [flang] [llvm-profdata] Do not create numerical strings for MD5 function names read from a Sample Profile. (PR #66164)

Matthias Braun via flang-commits flang-commits at lists.llvm.org
Wed Oct 4 11:52:40 PDT 2023


================
@@ -502,6 +497,12 @@ struct SampleContextFrame {
     }
     return OContextStr.str();
   }
+
+  uint64_t getHashCode() const {
+    uint64_t NameHash = FuncName.getHashCode();
+    uint64_t LocId = Location.getHashCode();
+    return NameHash + (LocId << 5) + LocId;
+  }
----------------
MatzeB wrote:

I already see a `hash_value` overload a couple lines below (line 508). Do we need this? If yes, then we should find a better name and a comment in how this is different from the `hash_value()` overload.

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


More information about the flang-commits mailing list