<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 --- - surfaceArea.cc from xplor-nih compiles ~30 times to slowly using -O1/-O2/-O3 -funroll-loops -fplugin-arg-dragonegg-llvm-option=-vectorize"
   href="http://llvm.org/bugs/show_bug.cgi?id=15287">15287</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>surfaceArea.cc from xplor-nih compiles ~30 times to slowly using -O1/-O2/-O3 -funroll-loops -fplugin-arg-dragonegg-llvm-option=-vectorize
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </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>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>howarth@nitro.med.uc.edu
          </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>The largest remaining vectorization bottleneck in compiling xplor-nih with
-fplugin-arg-dragonegg-llvm-option=-vectorize is in the compilation of
intVar/surfaceArea.cc...

% time de-g++47 -c surfaceArea.cc -O1 -funroll-loops
-fplugin-arg-dragonegg-llvm-option=-vectorize -DX_MMAP_FLAGS=0 -DFORTRAN_INIT
-fno-common -DDARWIN -D_REENTRANT -DNDEBUG
-I/Users/howarth/xplor-nih-2.33/nmrPot/
-I/Users/howarth/xplor-nih-2.33/arch/Darwin_12_x86_64/include
-I/Users/howarth/xplor-nih-2.33/CDSlib -I/Users/howarth/xplor-nih-2.33/common
-I/Users/howarth/xplor-nih-2.33/intVar -I/Users/howarth/xplor-nih-2.33/fortlib
-I/Users/howarth/xplor-nih-2.33/surfD -I/Users/howarth/xplor-nih-2.33
-DCPLUSPLUS -DUSE_CDS_NAMESPACE -I/Users/howarth/xplor-nih-2.33/nmrPot/
-I/Users/howarth/xplor-nih-2.33/arch/Darwin_12_x86_64/include
...
60.843u 0.130s 1:00.98 99.9%    0+0k 0+13io 0pf+0w

% time de-g++47 -c surfaceArea.cc -O1 -funroll-loops -DX_MMAP_FLAGS=0
-DFORTRAN_INIT -fno-common -DDARWIN -D_REENTRANT -DNDEBUG
-I/Users/howarth/xplor-nih-2.33/nmrPot/
-I/Users/howarth/xplor-nih-2.33/arch/Darwin_12_x86_64/include
-I/Users/howarth/xplor-nih-2.33/CDSlib -I/Users/howarth/xplor-nih-2.33/common
-I/Users/howarth/xplor-nih-2.33/intVar -I/Users/howarth/xplor-nih-2.33/fortlib
-I/Users/howarth/xplor-nih-2.33/surfD -I/Users/howarth/xplor-nih-2.33
-DCPLUSPLUS -DUSE_CDS_NAMESPACE -I/Users/howarth/xplor-nih-2.33/nmrPot/
-I/Users/howarth/xplor-nih-2.33/arch/Darwin_12_x86_64/include
...
2.091u 0.120s 0:02.21 100.0%    0+0k 0+3io 0pf+0w

The non-vectorized LLVM IR generated with...

de-g++47 -c surfaceArea.cc -O1 -funroll-loops -DX_MMAP_FLAGS=0 -DFORTRAN_INIT
-fno-common -DDARWIN -D_REENTRANT -DNDEBUG
-I/Users/howarth/xplor-nih-2.33/nmrPot/
-I/Users/howarth/xplor-nih-2.33/arch/Darwin_12_x86_64/include
-I/Users/howarth/xplor-nih-2.33/CDSlib -I/Users/howarth/xplor-nih-2.33/common
-I/Users/howarth/xplor-nih-2.33/intVar -I/Users/howarth/xplor-nih-2.33/fortlib
-I/Users/howarth/xplor-nih-2.33/surfD -I/Users/howarth/xplor-nih-2.33
-DCPLUSPLUS -DUSE_CDS_NAMESPACE -I/Users/howarth/xplor-nih-2.33/nmrPot/
-I/Users/howarth/xplor-nih-2.33/arch/Darwin_12_x86_64/include
-fplugin-arg-dragonegg-emit-ir -S

is attached as surfaceArea.s and can be used to reproduce this problem as
follows...

% time /sw/opt/llvm-3.3/bin/opt -O1 -vectorize surfaceArea.s
...
30.187u 0.048s 0:30.53 98.9%    0+0k 0+0io 950pf+0w

% time /sw/opt/llvm-3.3/bin/opt -O1  surfaceArea.s
...
0.621u 0.011s 0:00.63 100.0%    0+0k 0+0io 0pf+0w</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>