<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Mar 9, 2015 at 2:09 PM, Frederic Riss <span dir="ltr"><<a href="mailto:friss@apple.com" target="_blank">friss@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: friss<br>
Date: Mon Mar  9 16:09:50 2015<br>
New Revision: 231701<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=231701&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=231701&view=rev</a><br>
Log:<br>
DwarfAccelTable: fix obvious typo.<br>
<br>
I have a test for that issue, but I didn't include it in the commit as it's<br>
a 200KB file for a pretty minor issue. (The reason the file is so big is<br>
that it needs > 1024 variables/functions to trigger and that with debug<br>
information.<br>
<br>
The issue/fix on the other side is totally trivial. If poeple want the test<br>
commited, I can do that. It just didn't seem worth it to me.<br>
<br>
Modified:<br>
    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp?rev=231701&r1=231700&r2=231701&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp?rev=231701&r1=231700&r2=231701&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp Mon Mar  9 16:09:50 2015<br>
@@ -54,7 +54,7 @@ void DwarfAccelTable::ComputeBucketCount<br>
   // Then compute the bucket size, minimum of 1 bucket.<br>
   if (num > 1024)<br>
     Header.bucket_count = num / 4;<br>
-  if (num > 16)<br>
+  else if (num > 16)<br>
     Header.bucket_count = num / 2;<br></blockquote><div><br>Should this whole if/else if chain just be rewritten in terms of a continuous function from num to bucket count? (which could perhaps be unit tested - perhaps the accel table in general could be unit tested & exercise this case reasonably) - looks something like "num / ((log2 num + 1) / 2)" or somesuch?<br><br>What was the failure mode?<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
   else<br>
     Header.bucket_count = num > 0 ? num : 1;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">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>