Skip to content

Conversation

@kazutakahirata
Copy link
Contributor

We can now invoke hash_combine_range with a range.

We can now invoke hash_combine_range with a range.
@llvmbot
Copy link
Member

llvmbot commented Jun 7, 2025

@llvm/pr-subscribers-llvm-support

@llvm/pr-subscribers-llvm-transforms

Author: Kazu Hirata (kazutakahirata)

Changes

We can now invoke hash_combine_range with a range.


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

2 Files Affected:

  • (modified) llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h (+1-1)
  • (modified) llvm/lib/Support/Windows/Path.inc (+1-1)
diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
index 252b55163cb09..7765a4ab2ba98 100644
--- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
@@ -27,7 +27,7 @@ template <> struct DenseMapInfo<SmallVector<sandboxir::Value *>> {
     return SmallVector<sandboxir::Value *>({(sandboxir::Value *)-2});
   }
   static unsigned getHashValue(const SmallVector<sandboxir::Value *> &Vec) {
-    return hash_combine_range(Vec.begin(), Vec.end());
+    return hash_combine_range(Vec);
   }
   static bool isEqual(const SmallVector<sandboxir::Value *> &Vec1,
                       const SmallVector<sandboxir::Value *> &Vec2) {
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 0afd0141b525a..fdf9d540a6488 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -748,7 +748,7 @@ static std::error_code getStatus(HANDLE FileHandle, file_status &Result) {
     PathHash = (static_cast<uint64_t>(Info.nFileIndexHigh) << 32ULL) |
                static_cast<uint64_t>(Info.nFileIndexLow);
   } else {
-    PathHash = hash_combine_range(ntPath.begin(), ntPath.end());
+    PathHash = hash_combine_range(ntPath);
   }
 
   Result = file_status(

@llvmbot
Copy link
Member

llvmbot commented Jun 7, 2025

@llvm/pr-subscribers-vectorizers

Author: Kazu Hirata (kazutakahirata)

Changes

We can now invoke hash_combine_range with a range.


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

2 Files Affected:

  • (modified) llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h (+1-1)
  • (modified) llvm/lib/Support/Windows/Path.inc (+1-1)
diff --git a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
index 252b55163cb09..7765a4ab2ba98 100644
--- a/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
+++ b/llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
@@ -27,7 +27,7 @@ template <> struct DenseMapInfo<SmallVector<sandboxir::Value *>> {
     return SmallVector<sandboxir::Value *>({(sandboxir::Value *)-2});
   }
   static unsigned getHashValue(const SmallVector<sandboxir::Value *> &Vec) {
-    return hash_combine_range(Vec.begin(), Vec.end());
+    return hash_combine_range(Vec);
   }
   static bool isEqual(const SmallVector<sandboxir::Value *> &Vec1,
                       const SmallVector<sandboxir::Value *> &Vec2) {
diff --git a/llvm/lib/Support/Windows/Path.inc b/llvm/lib/Support/Windows/Path.inc
index 0afd0141b525a..fdf9d540a6488 100644
--- a/llvm/lib/Support/Windows/Path.inc
+++ b/llvm/lib/Support/Windows/Path.inc
@@ -748,7 +748,7 @@ static std::error_code getStatus(HANDLE FileHandle, file_status &Result) {
     PathHash = (static_cast<uint64_t>(Info.nFileIndexHigh) << 32ULL) |
                static_cast<uint64_t>(Info.nFileIndexLow);
   } else {
-    PathHash = hash_combine_range(ntPath.begin(), ntPath.end());
+    PathHash = hash_combine_range(ntPath);
   }
 
   Result = file_status(

@kazutakahirata kazutakahirata merged commit 477f9f6 into llvm:main Jun 7, 2025
12 checks passed
@kazutakahirata kazutakahirata deleted the cleanup_20250606_hash_combine_range_llvm branch June 7, 2025 05:55
tomtor pushed a commit to tomtor/llvm-project that referenced this pull request Jun 14, 2025
We can now invoke hash_combine_range with a range.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants