[LLVMbugs] [Bug 15644] New: Scalar replacement of aggregates slower in LLVM 3.0+ relative to 2.8

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Apr 1 14:55:43 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=15644

            Bug ID: 15644
           Summary: Scalar replacement of aggregates slower in LLVM 3.0+
                    relative to 2.8
           Product: libraries
           Version: 3.2
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: ajclinto at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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:
> Attached is the test case.
>
> Run:
>
> opt -scalarrepl slow_sroa.ll
>
> Andrew
>
> 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 <andrew at sidefx.com> 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
>>     LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>>     http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>>

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130401/0f61131c/attachment.html>


More information about the llvm-bugs mailing list