[llvm-commits] [llvm] r152369 - /llvm/trunk/include/llvm/ADT/Hashing.h
Duncan Sands
baldrick at free.fr
Fri Mar 9 00:33:44 PST 2012
Hi Chandler,
> Fix a silly restriction on the fast-path for hash_combine_range.
is it really silly? Hash functions shouldn't be modifying what they are
hashing should they?
Ciao, Duncan.
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);
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list