<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Nov 24, 2015 at 1:55 PM, Rong Xu via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: xur<br>
Date: Tue Nov 24 15:55:50 2015<br>
New Revision: 254028<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=254028&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=254028&view=rev</a><br>
Log:<br>
[PGO] Fix build errors in x86_64-darwin<br>
<br>
Fix buildbot failure for x86_64-darwin due to r254021<br>
<br>
Modified:<br>
    llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h<br>
    llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp<br>
<br>
Modified: llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h?rev=254028&r1=254027&r2=254028&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h?rev=254028&r1=254027&r2=254028&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h (original)<br>
+++ llvm/trunk/lib/Transforms/Instrumentation/CFGMST.h Tue Nov 24 15:55:50 2015<br>
@@ -97,7 +97,7 @@ public:<br>
       uint64_t BBWeight = BFI->getBlockFreq(&*BB).getFrequency();<br>
       uint64_t Weight;<br>
       if (int successors = TI->getNumSuccessors()) {<br>
-        for (uint32_t i = 0; i != successors; ++i) {<br>
+        for (int i = 0; i != successors; ++i) {<br>
           BasicBlock *TargetBB = TI->getSuccessor(i);<br>
           bool Critical = isCriticalEdge(TI, i);<br>
           uint64_t scaleFactor = BBWeight;<br>
<br>
Modified: llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=254028&r1=254027&r2=254028&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp?rev=254028&r1=254027&r2=254028&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Instrumentation/PGOInstrumentation.cpp Tue Nov 24 15:55:50 2015<br>
@@ -264,8 +264,8 @@ void FuncPGOInstrumentation<Edge, BBInfo<br>
     for (unsigned s = 0, e = TI->getNumSuccessors(); s != e; ++s) {<br>
       BasicBlock *Succ = TI->getSuccessor(s);<br>
       uint32_t Index = getBBInfo(Succ).Index;<br>
-      for (int i = 0; i < sizeof(uint32_t) / sizeof(char); i++)<br>
-        Indexes.push_back((char)(Index >> (i * sizeof(char))));<br>
+      for (int i = 0; i < 4; i++)<br>
+        Indexes.push_back((char)(Index >> i));<br>
     }<br></blockquote><div><br></div><div>This (the right shift) looks wrong (and regressed) -- can it be reason of the m32 build mismatch problems?</div><div><br></div><div>David</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   }<br>
   JC.update(Indexes);<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">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><br></div></div>