[llvm-commits] [llvm] r152369 - /llvm/trunk/include/llvm/ADT/Hashing.h

Chandler Carruth chandlerc at gmail.com
Thu Mar 8 18:49:38 PST 2012


Author: chandlerc
Date: Thu Mar  8 20:49:38 2012
New Revision: 152369

URL: http://llvm.org/viewvc/llvm-project?rev=152369&view=rev
Log:
Fix a silly restriction on the fast-path for hash_combine_range. This
caused several clients to select the slow variation. =[ This is extra
annoying because we don't have any realistic way of testing this -- by
design, these two functions *must* compute the same value.

Found while inspecting the output of some benchmarks I'm working on.

Modified:
    llvm/trunk/include/llvm/ADT/Hashing.h

Modified: llvm/trunk/include/llvm/ADT/Hashing.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Hashing.h?rev=152369&r1=152368&r2=152369&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Hashing.h (original)
+++ llvm/trunk/include/llvm/ADT/Hashing.h Thu Mar  8 20:49:38 2012
@@ -457,7 +457,7 @@
 /// and directly reads from the underlying memory.
 template <typename ValueT>
 typename enable_if<is_hashable_data<ValueT>, hash_code>::type
-hash_combine_range_impl(const ValueT *first, const ValueT *last) {
+hash_combine_range_impl(ValueT *first, ValueT *last) {
   const size_t seed = get_execution_seed();
   const char *s_begin = reinterpret_cast<const char *>(first);
   const char *s_end = reinterpret_cast<const char *>(last);





More information about the llvm-commits mailing list