<div dir="ltr"><div dir="ltr">Hello Tim,<br><br>This commit added broken tests on one of our builders:<br><a href="http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/19508">http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/19508</a><br>. . .<br>Failing Tests (2):<br>    LLVM-Unit :: ADT/./ADTTests.exe/HashingTest.HashCombineRangeGoldenTest<br>    Clang :: CodeGenCXX/catch-undef-behavior.cpp<br><br>Please have a look?<br>The builder was already red and did not send notifications on this.<br><br>Thanks<br><br>Galina<br></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, Aug 30, 2018 at 1:29 PM Tim Northover via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: tnorthover<br>
Date: Thu Aug 30 13:28:32 2018<br>
New Revision: 341113<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=341113&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=341113&view=rev</a><br>
Log:<br>
Hashing: use 64-bit seed for hashing on all platforms.<br>
<br>
get_execution_seed returns a size_t which varies across platforms, but its<br>
users actually always feed it into a uint64_t role so it makes sense to be<br>
consistent.<br>
<br>
Mostly this is just a tidy-up, but it also apparently allows PCH files to be<br>
shared between Clang compilers built for 32-bit and 64-bit hosts.<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ADT/Hashing.h<br>
    llvm/trunk/lib/Support/Hashing.cpp<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/Hashing.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Hashing.h?rev=341113&r1=341112&r2=341113&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Hashing.h?rev=341113&r1=341112&r2=341113&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/Hashing.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/Hashing.h Thu Aug 30 13:28:32 2018<br>
@@ -133,7 +133,7 @@ hash_code hash_value(const std::basic_st<br>
 /// undone. This makes it thread-hostile and very hard to use outside of<br>
 /// immediately on start of a simple program designed for reproducible<br>
 /// behavior.<br>
-void set_fixed_execution_hash_seed(size_t fixed_value);<br>
+void set_fixed_execution_hash_seed(uint64_t fixed_value);<br>
<br>
<br>
 // All of the implementation details of actually computing the various hash<br>
@@ -316,9 +316,9 @@ struct hash_state {<br>
 /// This variable can be set using the \see llvm::set_fixed_execution_seed<br>
 /// function. See that function for details. Do not, under any circumstances,<br>
 /// set or read this variable.<br>
-extern size_t fixed_seed_override;<br>
+extern uint64_t fixed_seed_override;<br>
<br>
-inline size_t get_execution_seed() {<br>
+inline uint64_t get_execution_seed() {<br>
   // FIXME: This needs to be a per-execution seed. This is just a placeholder<br>
   // implementation. Switching to a per-execution seed is likely to flush out<br>
   // instability bugs and so will happen as its own commit.<br>
@@ -326,8 +326,7 @@ inline size_t get_execution_seed() {<br>
   // However, if there is a fixed seed override set the first time this is<br>
   // called, return that instead of the per-execution seed.<br>
   const uint64_t seed_prime = 0xff51afd7ed558ccdULL;<br>
-  static size_t seed = fixed_seed_override ? fixed_seed_override<br>
-                                           : (size_t)seed_prime;<br>
+  static uint64_t seed = fixed_seed_override ? fixed_seed_override : seed_prime;<br>
   return seed;<br>
 }<br>
<br>
@@ -402,7 +401,7 @@ bool store_and_advance(char *&buffer_ptr<br>
 /// combining them, this (as an optimization) directly combines the integers.<br>
 template <typename InputIteratorT><br>
 hash_code hash_combine_range_impl(InputIteratorT first, InputIteratorT last) {<br>
-  const size_t seed = get_execution_seed();<br>
+  const uint64_t seed = get_execution_seed();<br>
   char buffer[64], *buffer_ptr = buffer;<br>
   char *const buffer_end = std::end(buffer);<br>
   while (first != last && store_and_advance(buffer_ptr, buffer_end,<br>
@@ -446,7 +445,7 @@ hash_code hash_combine_range_impl(InputI<br>
 template <typename ValueT><br>
 typename std::enable_if<is_hashable_data<ValueT>::value, hash_code>::type<br>
 hash_combine_range_impl(ValueT *first, ValueT *last) {<br>
-  const size_t seed = get_execution_seed();<br>
+  const uint64_t seed = get_execution_seed();<br>
   const char *s_begin = reinterpret_cast<const char *>(first);<br>
   const char *s_end = reinterpret_cast<const char *>(last);<br>
   const size_t length = std::distance(s_begin, s_end);<br>
@@ -496,7 +495,7 @@ namespace detail {<br>
 struct hash_combine_recursive_helper {<br>
   char buffer[64];<br>
   hash_state state;<br>
-  const size_t seed;<br>
+  const uint64_t seed;<br>
<br>
 public:<br>
   /// Construct a recursive hash combining helper.<br>
<br>
Modified: llvm/trunk/lib/Support/Hashing.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Hashing.cpp?rev=341113&r1=341112&r2=341113&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/Hashing.cpp?rev=341113&r1=341112&r2=341113&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Support/Hashing.cpp (original)<br>
+++ llvm/trunk/lib/Support/Hashing.cpp Thu Aug 30 13:28:32 2018<br>
@@ -20,10 +20,10 @@ using namespace llvm;<br>
 // Provide a definition and static initializer for the fixed seed. This<br>
 // initializer should always be zero to ensure its value can never appear to be<br>
 // non-zero, even during dynamic initialization.<br>
-size_t llvm::hashing::detail::fixed_seed_override = 0;<br>
+uint64_t llvm::hashing::detail::fixed_seed_override = 0;<br>
<br>
 // Implement the function for forced setting of the fixed seed.<br>
 // FIXME: Use atomic operations here so that there is no data race.<br>
-void llvm::set_fixed_execution_hash_seed(size_t fixed_value) {<br>
+void llvm::set_fixed_execution_hash_seed(uint64_t fixed_value) {<br>
   hashing::detail::fixed_seed_override = fixed_value;<br>
 }<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>