<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Scalar replacement of aggregates slower in LLVM 3.0+ relative to 2.8"
href="http://llvm.org/bugs/show_bug.cgi?id=15644">15644</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Scalar replacement of aggregates slower in LLVM 3.0+ relative to 2.8
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>3.2
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Scalar Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>ajclinto@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>This was originally sent to the LLVM mailing list after the LLVM 3.0 release,
but it still seems to be an issue in 3.2. The attached file optimizes much
faster (about 3x better) in LLVM 2.8 compared to 3.2. Performance didn't
change on this test case between 3.0 and 3.2.
time opt -scalarrepl slow_sroa.ll
On my system:
2.8: 0.16s
3.2: 0.5s
This is from email correspondence on llvm-dev:
------------------------------------------------------
Actually, -scalarrepl-ssa is the slower one.
On 04/05/2012 06:56 PM, Andrew Clinton wrote:
<span class="quote">> Attached is the test case.</span >
>
<span class="quote">> Run:</span >
>
<span class="quote">> opt -scalarrepl slow_sroa.ll</span >
>
<span class="quote">> Andrew</span >
>
<span class="quote">> On 04/05/2012 05:11 PM, Nick Lewycky wrote:
>> I've patched SROA in a way that may have made it slower. Do you have a testcase we can look at?
>>
>> Nick
>>
>> On 4 April 2012 16:19, Andrew Clinton <<a href="mailto:andrew@sidefx.com">andrew@sidefx.com</a>> wrote:
>>
>> I just upgraded our optimizer to LLVM 3.0 from 2.8 and noticed that the
>> scalar replacement of aggregates pass takes a lot longer for some code.
>> Has there been a performance regression in this pass, or does it do more
>> work?
>>
>> LLVM 3.0:
>>
>> Total Execution Time: 1.0600 seconds (1.0526 wall clock)
>>
>> ---User Time--- --System Time-- --User+System-- ---Wall
>> Time--- --- Name ---
>> 0.5100 ( 49.5%) 0.0000 ( 0.0%) 0.5100 ( 48.1%) 0.5099 (
>> 48.4%) Scalar Replacement of Aggregates (SSAUp)
>> 0.1900 ( 18.4%) 0.0300 (100.0%) 0.2200 ( 20.8%) 0.2156 (
>> 20.5%) Scalar Replacement of Aggregates (DT)
>> 0.1200 ( 11.7%) 0.0000 ( 0.0%) 0.1200 ( 11.3%) 0.1158 (
>> 11.0%) VEX Constant Propagation
>> 0.0200 ( 1.9%) 0.0000 ( 0.0%) 0.0200 ( 1.9%) 0.0196 (
>> 1.9%) Simplify the CFG
>> 0.0200 ( 1.9%) 0.0000 ( 0.0%) 0.0200 ( 1.9%) 0.0181 (
>> 1.7%) Module Verifier
>> ...
>>
>> LLVM 2.8:
>>
>> Total Execution Time: 0.6500 seconds (0.6489 wall clock)
>>
>> ---User Time--- --System Time-- --User+System-- ---Wall
>> Time--- --- Name ---
>> 0.1400 ( 21.9%) 0.0000 ( 0.0%) 0.1400 ( 21.5%) 0.1379 (
>> 21.3%) Scalar Replacement of Aggregates
>> 0.1200 ( 18.7%) 0.0000 ( 0.0%) 0.1200 ( 18.5%) 0.1208 (
>> 18.6%) VEX Constant Propagation
>> 0.1000 ( 15.6%) 0.0000 ( 0.0%) 0.1000 ( 15.4%) 0.1050 (
>> 16.2%) Scalar Replacement of Aggregates
>> 0.0400 ( 6.3%) 0.0000 ( 0.0%) 0.0400 ( 6.2%) 0.0481 (
>> 7.4%) Combine redundant instructions
>> 0.0200 ( 3.1%) 0.0000 ( 0.0%) 0.0200 ( 3.1%) 0.0235 (
>> 3.6%) Preliminary module verification
>> ...
>> _______________________________________________
>> LLVM Developers mailing list
>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu">http://llvm.cs.uiuc.edu</a>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a>
>>
>></span ></pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>