[llvm] 477f9f6 - [llvm] Call hash_combine_range with ranges (NFC) (#143225)

via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 6 22:55:23 PDT 2025


Author: Kazu Hirata
Date: 2025-06-06T22:55:19-07:00
New Revision: 477f9f6d92a49a69b26c44cf08234f2eb68c900a

URL: https://github.com/llvm/llvm-project/commit/477f9f6d92a49a69b26c44cf08234f2eb68c900a
DIFF: https://github.com/llvm/llvm-project/commit/477f9f6d92a49a69b26c44cf08234f2eb68c900a.diff

LOG: [llvm] Call hash_combine_range with ranges (NFC) (#143225)

We can now invoke hash_combine_range with a range.

Added: 
    

Modified: 
    llvm/include/llvm/Transforms/Vectorize/SandboxVectorizer/VecUtils.h
    llvm/lib/Support/Windows/Path.inc

Removed: 
    


################################################################################
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(


        


More information about the llvm-commits mailing list