<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 --- - Extremely slow compilation of innocuous C++ source"
   href="http://llvm.org/bugs/show_bug.cgi?id=16756">16756</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Extremely slow compilation of innocuous C++ source
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>3.2
          </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>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>jrk@csail.mit.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>Created <span class=""><a href="attachment.cgi?id=10959" name="attach_10959" title="Source file which causes slow compilation performance">attachment 10959</a> <a href="attachment.cgi?id=10959&action=edit" title="Source file which causes slow compilation performance">[details]</a></span>
Source file which causes slow compilation performance

Halide is a not-especially-complicated C++ project (which happens to use LLVM
internally, but that's not the subject of this bug):

  <a href="https://github.com/halide/Halide/">https://github.com/halide/Halide/</a>

Its build process is simple. On most platforms, GCC and MSVC toolchains compile
of the C++ source quickly. On OS X (10.8), the stock g++ (llvm-gcc-4.2-based)
compiles all but one source file quickly. But on CodeGen_ARM.cpp
(<a href="https://github.com/halide/Halide/blob/master/src/CodeGen_ARM.cpp">https://github.com/halide/Halide/blob/master/src/CodeGen_ARM.cpp</a>), it is
pathologically slow (>7 minutes on a 2.8ghz Core2 Xeon Mac Pro, ~5 on a
Sandybridge MacBook Air). The same file compiles in the expected second or
three on any Homebrew GCC version, using the full GNU toolchain.

Clearly, this tickles something serious in the Apple/LLVM toolchain. The
process which chugs for minutes during this is named "clang". The only obvious
potential standout here is the relatively complex stack-allocated array
"patterns" in CodeGen_ARM::visit(const Cast *op).</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>