Skip to content

[mlir] Call hash_combine_range with a range (NFC) #139676

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

kazutakahirata
Copy link
Contributor

With #136459, we can now invoke hash_combine_range with a range.

With llvm#136459, we can now invoke hash_combine_range with a range.
@llvmbot llvmbot added mlir:core MLIR Core Infrastructure mlir mlir:ods labels May 13, 2025
@llvmbot
Copy link
Member

llvmbot commented May 13, 2025

@llvm/pr-subscribers-mlir

@llvm/pr-subscribers-mlir-ods

Author: Kazu Hirata (kazutakahirata)

Changes

With #136459, we can now invoke hash_combine_range with a range.


Full diff: https://github.com/llvm/llvm-project/pull/139676.diff

1 Files Affected:

  • (modified) mlir/include/mlir/IR/Properties.td (+1-1)
diff --git a/mlir/include/mlir/IR/Properties.td b/mlir/include/mlir/IR/Properties.td
index 739df03c7ef2e..15b72969dc92f 100644
--- a/mlir/include/mlir/IR/Properties.td
+++ b/mlir/include/mlir/IR/Properties.td
@@ -554,7 +554,7 @@ class ArrayProp<Property elem = Property<>, string newSummary = ""> :
           return }] # !subst("$_storage", "propStorage", elem.hashProperty) # [{;
         };
         auto mapped = ::llvm::map_range($_storage, getElemHash);
-        return ::llvm::hash_combine_range(mapped.begin(), mapped.end());
+        return ::llvm::hash_combine_range(mapped);
       }()
     }]);
 }

@llvmbot
Copy link
Member

llvmbot commented May 13, 2025

@llvm/pr-subscribers-mlir-core

Author: Kazu Hirata (kazutakahirata)

Changes

With #136459, we can now invoke hash_combine_range with a range.


Full diff: https://github.com/llvm/llvm-project/pull/139676.diff

1 Files Affected:

  • (modified) mlir/include/mlir/IR/Properties.td (+1-1)
diff --git a/mlir/include/mlir/IR/Properties.td b/mlir/include/mlir/IR/Properties.td
index 739df03c7ef2e..15b72969dc92f 100644
--- a/mlir/include/mlir/IR/Properties.td
+++ b/mlir/include/mlir/IR/Properties.td
@@ -554,7 +554,7 @@ class ArrayProp<Property elem = Property<>, string newSummary = ""> :
           return }] # !subst("$_storage", "propStorage", elem.hashProperty) # [{;
         };
         auto mapped = ::llvm::map_range($_storage, getElemHash);
-        return ::llvm::hash_combine_range(mapped.begin(), mapped.end());
+        return ::llvm::hash_combine_range(mapped);
       }()
     }]);
 }

@kazutakahirata kazutakahirata merged commit d934d17 into llvm:main May 13, 2025
15 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_001_range_llvm_hash_combine_range_mlir branch May 13, 2025 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mlir:core MLIR Core Infrastructure mlir:ods mlir
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants