<div dir="ltr">Sorry for not posting sooner. I forgot to send an update with the results.<div><br></div><div>I also have some benchmark data. It confirms much of what you posted -- binary size increase is essentially 0, performance increases across the board. It looks really good to me.<div>
<br></div></div><div>However, there was one crash that I'd like to check if it still fires. Will update later today (feel free to ping me if you don't hear anything.).</div><div><br></div><div>That said, why -O3? I think we should just enable this across the board, as it doesn't seem to cause any size regression under any mode, and the compile time hit is really low.</div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, Jul 27, 2013 at 11:54 PM, Nadav Rotem <span dir="ltr"><<a href="mailto:nrotem@apple.com" target="_blank">nrotem@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div style="font-family:Helvetica,sans-serif">Hi, </div><div style="font-family:Helvetica,sans-serif">
<br></div><div style="font-family:Helvetica,sans-serif">Below you can see the updated benchmark results for the new SLP-vectorizer. As you can see, there is a small number of compile time regressions, a single major runtime *regression, and many performance gains. There is a tiny increase in code size: 30k for the whole test-suite. Based on the numbers below I would like to enable the SLP-vectorizer by default for -O3. Please let me know if you have any concerns. </div>
<div style="font-family:Helvetica,sans-serif"><br></div><div style="font-family:Helvetica,sans-serif"><div style="font-family:Helvetica"><span style="font-family:Helvetica,sans-serif">Thanks,</span></div><div style="font-family:Helvetica">
<span style="font-family:Helvetica,sans-serif">Nadav</span></div><div><span style="font-family:Helvetica,sans-serif"><br></span></div></div><div style="font-family:Helvetica,sans-serif"><br></div><div><font face="Helvetica, sans-serif">* - I now understand the Olden/BH regression better. BH is slower because of a store-buffer stall. This means that the store buffer fills up and the CPU has to wait for some stores to finish.</font><span style="font-family:Helvetica,sans-serif"> I can think of two reasons that may cause this problem. First, our vectorized stores are followed by a memcpy that's expanded to a list of scalar-read/writes to the same addresses as the vector store. Maybe the processors can’t prune multiple stores to the same address with different sizes (Section 2.2.4 in the optimization guide has some info on this). Another possibility (less likely) is that we increase the critical path by adding a new pshufd instruction before the last vector store and that affects the store-buffer somehow. In any case, there is not much we can do at the IR-level to predict this. </span></div>
<div><br></div><div style="font-family:Helvetica,sans-serif"><span style="white-space:pre-wrap"><br></span></div><div style="font-family:Helvetica,sans-serif"><br></div><table style="font-size:9pt;border-spacing:0px;border:1px solid black">
<tbody><tr><th width="500" style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">Performance Regressions - Compile Time</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">
Δ</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">Previous</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">
Current</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">σ</th></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/VersaBench/beamformer/beamformer</td>
<td bgcolor="#ff5858" style="padding:5px 5px 5px 8px">18.98%</td><td style="padding:5px 5px 5px 8px">0.0722</td><td style="padding:5px 5px 5px 8px">0.0859</td><td style="padding:5px 5px 5px 8px">0.0003</td></tr><tr><td style="padding:5px 5px 5px 8px">
MultiSource/Benchmarks/FreeBench/pifft/pifft</td><td bgcolor="#ff9b9b" style="padding:5px 5px 5px 8px">5.66%</td><td style="padding:5px 5px 5px 8px">0.5003</td><td style="padding:5px 5px 5px 8px">0.5286</td><td style="padding:5px 5px 5px 8px">
0.0015</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/TSVC/LinearDependence-flt/LinearDependence-flt</td><td bgcolor="#ffa2a2" style="padding:5px 5px 5px 8px">4.85%</td><td style="padding:5px 5px 5px 8px">
0.4084</td><td style="padding:5px 5px 5px 8px">0.4282</td><td style="padding:5px 5px 5px 8px">0.0014</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/TSVC/LoopRestructuring-flt/LoopRestructuring-flt</td>
<td bgcolor="#ffa6a6" style="padding:5px 5px 5px 8px">4.36%</td><td style="padding:5px 5px 5px 8px">0.3856</td><td style="padding:5px 5px 5px 8px">0.4024</td><td style="padding:5px 5px 5px 8px">0.0018</td></tr><tr><td style="padding:5px 5px 5px 8px">
MultiSource/Benchmarks/TSVC/ControlFlow-flt/ControlFlow-flt</td><td bgcolor="#ffb9b9" style="padding:5px 5px 5px 8px">2.62%</td><td style="padding:5px 5px 5px 8px">0.4424</td><td style="padding:5px 5px 5px 8px">0.4540</td>
<td style="padding:5px 5px 5px 8px">0.0019</td></tr><tr><td style="padding:5px 5px 5px 8px">External/SPEC/CINT2006/401_bzip2/401_bzip2</td><td bgcolor="#ffc9c9" style="padding:5px 5px 5px 8px">1.50%</td><td style="padding:5px 5px 5px 8px">
1.0613</td><td style="padding:5px 5px 5px 8px">1.0772</td><td style="padding:5px 5px 5px 8px">0.0010</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4</td><td bgcolor="#ffcece" style="padding:5px 5px 5px 8px">
1.23%</td><td style="padding:5px 5px 5px 8px">12.1337</td><td style="padding:5px 5px 5px 8px">12.2831</td><td style="padding:5px 5px 5px 8px">0.0296</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Applications/kimwitu++/kc</td>
<td bgcolor="#ffcfcf" style="padding:5px 5px 5px 8px">1.15%</td><td style="padding:5px 5px 5px 8px">9.3690</td><td style="padding:5px 5px 5px 8px">9.4769</td><td style="padding:5px 5px 5px 8px">0.0186</td></tr><tr><td style="padding:5px 5px 5px 8px">
SingleSource/Benchmarks/Misc-C++-EH/spirit</td><td bgcolor="#ffd0d0" style="padding:5px 5px 5px 8px">1.13%</td><td style="padding:5px 5px 5px 8px">3.2769</td><td style="padding:5px 5px 5px 8px">3.3139</td><td style="padding:5px 5px 5px 8px">
0.0079</td></tr><tr><td style="padding:5px 5px 5px 8px">External/SPEC/CFP2000/188_ammp/188_ammp</td><td bgcolor="#ffd2d2" style="padding:5px 5px 5px 8px">1.01%</td><td style="padding:5px 5px 5px 8px">1.8632</td><td style="padding:5px 5px 5px 8px">
1.8820</td><td style="padding:5px 5px 5px 8px">0.0059</td></tr></tbody></table><div><br></div><div style="font-family:Helvetica,sans-serif"><br></div><table style="font-size:9pt;border-spacing:0px;border:1px solid black">
<tbody><tr><th width="500" style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">Performance Regressions - Execution Time</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">
Δ</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">Previous</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">
Current</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">σ</th></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/Olden/bh/bh</td>
<td bgcolor="#ff5757" style="padding:5px 5px 5px 8px">19.24%</td><td style="padding:5px 5px 5px 8px">1.1551</td><td style="padding:5px 5px 5px 8px">1.3773</td><td style="padding:5px 5px 5px 8px">0.0021</td></tr><tr><td style="padding:5px 5px 5px 8px">
SingleSource/Benchmarks/SmallPT/smallpt</td><td bgcolor="#ffacac" style="padding:5px 5px 5px 8px">3.75%</td><td style="padding:5px 5px 5px 8px">5.8779</td><td style="padding:5px 5px 5px 8px">6.0983</td><td style="padding:5px 5px 5px 8px">
0.0146</td></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/Misc-C++/Large/ray</td><td bgcolor="#ffd1d1" style="padding:5px 5px 5px 8px">1.08%</td><td style="padding:5px 5px 5px 8px">1.8194</td><td style="padding:5px 5px 5px 8px">
1.8390</td><td style="padding:5px 5px 5px 8px">0.0009</td></tr></tbody></table><div><br></div><div style="font-family:Helvetica,sans-serif"><br></div><table style="font-size:9pt;border-spacing:0px;border:1px solid black">
<tbody><tr><th width="500" style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">Performance Improvements - Execution Time</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">
Δ</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">Previous</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">
Current</th><th style="background-color:rgb(238,238,238);color:rgb(102,102,102);text-align:center;font-family:Verdana;padding:5px 5px 5px 8px">σ</th></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/Misc/matmul_f64_4x4</td>
<td bgcolor="#14ff14" style="padding:5px 5px 5px 8px">-53.67%</td><td style="padding:5px 5px 5px 8px">1.4064</td><td style="padding:5px 5px 5px 8px">0.6516</td><td style="padding:5px 5px 5px 8px">0.0007</td></tr><tr><td style="padding:5px 5px 5px 8px">
External/Nurbs/nurbs</td><td bgcolor="#56ff56" style="padding:5px 5px 5px 8px">-19.47%</td><td style="padding:5px 5px 5px 8px">2.5389</td><td style="padding:5px 5px 5px 8px">2.0445</td><td style="padding:5px 5px 5px 8px">
0.0029</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/Olden/power/power</td><td bgcolor="#5aff5a" style="padding:5px 5px 5px 8px">-18.49%</td><td style="padding:5px 5px 5px 8px">1.2572</td><td style="padding:5px 5px 5px 8px">
1.0248</td><td style="padding:5px 5px 5px 8px">0.0004</td></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/Misc/flops-4</td><td bgcolor="#63ff63" style="padding:5px 5px 5px 8px">-15.93%</td><td style="padding:5px 5px 5px 8px">
0.7767</td><td style="padding:5px 5px 5px 8px">0.6530</td><td style="padding:5px 5px 5px 8px">0.0348</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/TSVC/LoopRerolling-flt/LoopRerolling-flt</td><td bgcolor="#68ff68" style="padding:5px 5px 5px 8px">
-14.72%</td><td style="padding:5px 5px 5px 8px">2.3925</td><td style="padding:5px 5px 5px 8px">2.0404</td><td style="padding:5px 5px 5px 8px">0.0013</td></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/Misc/flops-6</td>
<td bgcolor="#79ff79" style="padding:5px 5px 5px 8px">-11.05%</td><td style="padding:5px 5px 5px 8px">1.1427</td><td style="padding:5px 5px 5px 8px">1.0164</td><td style="padding:5px 5px 5px 8px">0.0009</td></tr><tr><td style="padding:5px 5px 5px 8px">
SingleSource/Benchmarks/Misc/flops-5</td><td bgcolor="#7dff7d" style="padding:5px 5px 5px 8px">-10.43%</td><td style="padding:5px 5px 5px 8px">1.2771</td><td style="padding:5px 5px 5px 8px">1.1439</td><td style="padding:5px 5px 5px 8px">
0.0015</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/TSVC/LinearDependence-flt/LinearDependence-flt</td><td bgcolor="#8aff8a" style="padding:5px 5px 5px 8px">-8.10%</td><td style="padding:5px 5px 5px 8px">
2.3468</td><td style="padding:5px 5px 5px 8px">2.1568</td><td style="padding:5px 5px 5px 8px">0.0195</td></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/Misc/pi</td><td bgcolor="#90ff90" style="padding:5px 5px 5px 8px">
-7.18%</td><td style="padding:5px 5px 5px 8px">0.6042</td><td style="padding:5px 5px 5px 8px">0.5608</td><td style="padding:5px 5px 5px 8px">0.0000</td></tr><tr><td style="padding:5px 5px 5px 8px">External/SPEC/CFP2006/444_namd/444_namd</td>
<td bgcolor="#aaffaa" style="padding:5px 5px 5px 8px">-4.01%</td><td style="padding:5px 5px 5px 8px">9.6053</td><td style="padding:5px 5px 5px 8px">9.2200</td><td style="padding:5px 5px 5px 8px">0.0064</td></tr><tr><td style="padding:5px 5px 5px 8px">
SingleSource/Benchmarks/Linpack/linpack-pc</td><td bgcolor="#abffab" style="padding:5px 5px 5px 8px">-3.85%</td><td style="padding:5px 5px 5px 8px">95.5313</td><td style="padding:5px 5px 5px 8px">91.8522</td><td style="padding:5px 5px 5px 8px">
1.1151</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/TSVC/LoopRerolling-dbl/LoopRerolling-dbl</td><td bgcolor="#afffaf" style="padding:5px 5px 5px 8px">-3.52%</td><td style="padding:5px 5px 5px 8px">
3.1962</td><td style="padding:5px 5px 5px 8px">3.0837</td><td style="padding:5px 5px 5px 8px">0.0063</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Benchmarks/TSVC/LinearDependence-dbl/LinearDependence-dbl</td>
<td bgcolor="#b5ffb5" style="padding:5px 5px 5px 8px">-2.93%</td><td style="padding:5px 5px 5px 8px">2.9336</td><td style="padding:5px 5px 5px 8px">2.8477</td><td style="padding:5px 5px 5px 8px">0.0037</td></tr><tr><td style="padding:5px 5px 5px 8px">
MultiSource/Benchmarks/VersaBench/beamformer/beamformer</td><td bgcolor="#b7ffb7" style="padding:5px 5px 5px 8px">-2.79%</td><td style="padding:5px 5px 5px 8px">0.8845</td><td style="padding:5px 5px 5px 8px">0.8598</td><td style="padding:5px 5px 5px 8px">
0.0026</td></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/Misc-C++/Large/sphereflake</td><td bgcolor="#b7ffb7" style="padding:5px 5px 5px 8px">-2.79%</td><td style="padding:5px 5px 5px 8px">1.8517</td>
<td style="padding:5px 5px 5px 8px">1.8001</td><td style="padding:5px 5px 5px 8px">0.0014</td></tr><tr><td style="padding:5px 5px 5px 8px">External/SPEC/CFP2000/177_mesa/177_mesa</td><td bgcolor="#bfffbf" style="padding:5px 5px 5px 8px">
-2.15%</td><td style="padding:5px 5px 5px 8px">1.7214</td><td style="padding:5px 5px 5px 8px">1.6844</td><td style="padding:5px 5px 5px 8px">0.0017</td></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/CoyoteBench/fftbench</td>
<td bgcolor="#c0ffc0" style="padding:5px 5px 5px 8px">-2.05%</td><td style="padding:5px 5px 5px 8px">0.7280</td><td style="padding:5px 5px 5px 8px">0.7131</td><td style="padding:5px 5px 5px 8px">0.0049</td></tr><tr><td style="padding:5px 5px 5px 8px">
MultiSource/Benchmarks/TSVC/NodeSplitting-dbl/NodeSplitting-dbl</td><td bgcolor="#c2ffc2" style="padding:5px 5px 5px 8px">-1.96%</td><td style="padding:5px 5px 5px 8px">3.1494</td><td style="padding:5px 5px 5px 8px">3.0878</td>
<td style="padding:5px 5px 5px 8px">0.0034</td></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/Misc/oourafft</td><td bgcolor="#c6ffc6" style="padding:5px 5px 5px 8px">-1.70%</td><td style="padding:5px 5px 5px 8px">
3.4625</td><td style="padding:5px 5px 5px 8px">3.4035</td><td style="padding:5px 5px 5px 8px">0.0009</td></tr><tr><td style="padding:5px 5px 5px 8px">SingleSource/Benchmarks/Misc/flops</td><td bgcolor="#ccffcc" style="padding:5px 5px 5px 8px">
-1.31%</td><td style="padding:5px 5px 5px 8px">7.0775</td><td style="padding:5px 5px 5px 8px">6.9845</td><td style="padding:5px 5px 5px 8px">0.0014</td></tr><tr><td style="padding:5px 5px 5px 8px">MultiSource/Applications/JM/lencod/lencod</td>
<td bgcolor="#d0ffd0" style="padding:5px 5px 5px 8px">-1.12%</td><td style="padding:5px 5px 5px 8px">4.5972</td><td style="padding:5px 5px 5px 8px">4.5455</td><td style="padding:5px 5px 5px 8px">0.0050</td></tr></tbody></table>
<div><br></div></div><br>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>