<div dir="rtl"><div dir="ltr">Ok, the code depends on SmallBitVector::size() being size_t, I reverted it in revision 211356.</div><div dir="ltr"><br></div><div dir="ltr">This should be more throughly reviewed, as SmallBitVector::count() was and still is unsigned which does not make sense: size() and count() count the same items and should be same datatype.</div>

<div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra"><div dir="ltr"><br><br><div class="gmail_quote">2014-06-20 15:47 GMT+03:00 Eli Bendersky <span dir="ltr"><<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>></span>:<br>

<blockquote class="gmail_quote" style="margin:0 .8ex;border-left:1px #ccc solid;border-right:1px #ccc solid;padding-left:1ex;padding-right:1ex">Yes fully synced to r211353<div><br></div><div><div>llvm_svn_rw/lib/Transforms/Scalar/LoopStrengthReduce.cpp:195:66: note:   mismatched types ‘std::initializer_list<_Tp>’ and ‘unsigned int’</div>

<div>     UsedByIndices.resize(std::min(UsedByIndices.size(), LastLUIdx));</div>

</div><div><br></div><div>etc.</div></blockquote></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 5:45 AM, Yaron Keren <span dir="ltr"><<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="rtl"><div dir="ltr">Hi Eli,</div><div dir="ltr"><br></div><div dir="ltr">Is it after this revision? size_type == unsigned?</div>



<div dir="ltr"><br></div><div dir="ltr">What is the error message? I did not get (yet) from the builder.</div>

<div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra"><div dir="ltr"><br><br><div class="gmail_quote">2014-06-20 15:42 GMT+03:00 Eli Bendersky <span dir="ltr"><<a href="mailto:eliben@google.com" target="_blank">eliben@google.com</a>></span>:<div>



<div><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It still doesn't compile on x64 Ubuntu</blockquote></div></div></div><div><div><div><div><div class="gmail_extra">





<br><br><div class="gmail_quote">On Fri, Jun 20, 2014 at 5:20 AM, Yaron Keren <span dir="ltr"><<a href="mailto:yaron.keren@gmail.com" target="_blank">yaron.keren@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: yrnkrn<br>
Date: Fri Jun 20 07:20:56 2014<br>
New Revision: 211353<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=211353&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=211353&view=rev</a><br>
Log:<br>
Reverting size_type for the containers from size_type to unsigned.<br>
Various places in LLVM assume that container size and count are unsigned<br>
and do not use the container size_type. Therefore they break compilation<br>
(or possibly executation) for LP64 systems where size_t is 64 bit while<br>
unsigned is still 32 bit.<br>
<br>
If we'll ever that many items in the container size_type could be made<br>
size_t for a specific containers after reviweing its other uses.<br>
<br>
<br>
Modified:<br>
    llvm/trunk/include/llvm/ADT/DenseMap.h<br>
    llvm/trunk/include/llvm/ADT/DenseSet.h<br>
    llvm/trunk/include/llvm/ADT/ScopedHashTable.h<br>
    llvm/trunk/include/llvm/ADT/SmallBitVector.h<br>
    llvm/trunk/include/llvm/ADT/SmallPtrSet.h<br>
    llvm/trunk/include/llvm/ADT/SparseBitVector.h<br>
    llvm/trunk/include/llvm/ADT/SparseMultiSet.h<br>
    llvm/trunk/include/llvm/ADT/SparseSet.h<br>
    llvm/trunk/include/llvm/IR/ValueMap.h<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/DenseMap.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseMap.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/DenseMap.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/DenseMap.h Fri Jun 20 07:20:56 2014<br>
@@ -43,7 +43,7 @@ protected:<br>
   typedef std::pair<KeyT, ValueT> BucketT;<br>
<br>
 public:<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
   typedef KeyT key_type;<br>
   typedef ValueT mapped_type;<br>
   typedef BucketT value_type;<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/DenseSet.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseSet.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/DenseSet.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/DenseSet.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/DenseSet.h Fri Jun 20 07:20:56 2014<br>
@@ -29,7 +29,7 @@ class DenseSet {<br>
 public:<br>
   typedef ValueT key_type;<br>
   typedef ValueT value_type;<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
<br>
   explicit DenseSet(unsigned NumInitBuckets = 0) : TheMap(NumInitBuckets) {}<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/ScopedHashTable.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ScopedHashTable.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/ScopedHashTable.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/ScopedHashTable.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/ScopedHashTable.h Fri Jun 20 07:20:56 2014<br>
@@ -148,7 +148,7 @@ public:<br>
   /// ScopeTy - This is a helpful typedef that allows clients to get easy access<br>
   /// to the name of the scope for this hash table.<br>
   typedef ScopedHashTableScope<K, V, KInfo, AllocatorTy> ScopeTy;<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
 private:<br>
   typedef ScopedHashTableVal<K, V> ValTy;<br>
   DenseMap<K, ValTy*, KInfo> TopLevelMap;<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/SmallBitVector.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallBitVector.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallBitVector.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/SmallBitVector.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/SmallBitVector.h Fri Jun 20 07:20:56 2014<br>
@@ -54,7 +54,7 @@ class SmallBitVector {<br>
   };<br>
<br>
 public:<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
   // Encapsulation of a single bit.<br>
   class reference {<br>
     SmallBitVector &TheVector;<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/SmallPtrSet.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallPtrSet.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/SmallPtrSet.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/SmallPtrSet.h Fri Jun 20 07:20:56 2014<br>
@@ -73,7 +73,7 @@ protected:<br>
   ~SmallPtrSetImplBase();<br>
<br>
 public:<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
   bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const { return size() == 0; }<br>
   size_type size() const { return NumElements; }<br>
<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/SparseBitVector.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseBitVector.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseBitVector.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/SparseBitVector.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/SparseBitVector.h Fri Jun 20 07:20:56 2014<br>
@@ -45,7 +45,7 @@ struct SparseBitVectorElement<br>
   : public ilist_node<SparseBitVectorElement<ElementSize> > {<br>
 public:<br>
   typedef unsigned long BitWord;<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
   enum {<br>
     BITWORD_SIZE = sizeof(BitWord) * CHAR_BIT,<br>
     BITWORDS_PER_ELEMENT = (ElementSize + BITWORD_SIZE - 1) / BITWORD_SIZE,<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/SparseMultiSet.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseMultiSet.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseMultiSet.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/SparseMultiSet.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/SparseMultiSet.h Fri Jun 20 07:20:56 2014<br>
@@ -185,7 +185,7 @@ public:<br>
   typedef const ValueT &const_reference;<br>
   typedef ValueT *pointer;<br>
   typedef const ValueT *const_pointer;<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
<br>
   SparseMultiSet()<br>
     : Sparse(nullptr), Universe(0), FreelistIdx(SMSNode::INVALID), NumFree(0) {}<br>
<br>
Modified: llvm/trunk/include/llvm/ADT/SparseSet.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseSet.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SparseSet.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/ADT/SparseSet.h (original)<br>
+++ llvm/trunk/include/llvm/ADT/SparseSet.h Fri Jun 20 07:20:56 2014<br>
@@ -124,7 +124,7 @@ class SparseSet {<br>
<br>
   typedef typename KeyFunctorT::argument_type KeyT;<br>
   typedef SmallVector<ValueT, 8> DenseT;<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
   DenseT Dense;<br>
   SparseT *Sparse;<br>
   unsigned Universe;<br>
<br>
Modified: llvm/trunk/include/llvm/IR/ValueMap.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ValueMap.h?rev=211353&r1=211352&r2=211353&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/ValueMap.h?rev=211353&r1=211352&r2=211353&view=diff</a><br>








==============================================================================<br>
--- llvm/trunk/include/llvm/IR/ValueMap.h (original)<br>
+++ llvm/trunk/include/llvm/IR/ValueMap.h Fri Jun 20 07:20:56 2014<br>
@@ -87,7 +87,7 @@ public:<br>
   typedef KeyT key_type;<br>
   typedef ValueT mapped_type;<br>
   typedef std::pair<KeyT, ValueT> value_type;<br>
-  typedef size_t size_type;<br>
+  typedef unsigned size_type;<br>
<br>
   explicit ValueMap(unsigned NumInitBuckets = 64)<br>
     : Map(NumInitBuckets), Data() {}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></div></div></div></div>
</blockquote></div><br></div>
</div></div></div></div>