[llvm] [StableHash] Implement stable global name for the hash computation (PR #106156)

Kyungwoo Lee via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 27 13:55:17 PDT 2024


================
@@ -95,13 +95,21 @@ stable_hash llvm::stableHashValue(const MachineOperand &MO) {
   case MachineOperand::MO_Metadata:
     StableHashBailingMetadataUnsupported++;
     return 0;
-  case MachineOperand::MO_GlobalAddress:
-    StableHashBailingGlobalAddress++;
-    return 0;
+  case MachineOperand::MO_GlobalAddress: {
+    const GlobalValue *GV = MO.getGlobal();
+    if (!GV->hasName()) {
+      StableHashBailingGlobalAddress++;
----------------
kyulee-com wrote:

Updated the increments of the stats variables.

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


More information about the llvm-commits mailing list