<html>
    <head>
      <base href="https://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 --- - Incredibly slow compilation of inline-assembly-heavy C++ code"
   href="https://llvm.org/bugs/show_bug.cgi?id=23366">23366</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Incredibly slow compilation of inline-assembly-heavy C++ code
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.6
          </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>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>johan.overbye@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, 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=14263" name="attach_14263" title="OS X Activity Monitor sample of the clang process">attachment 14263</a> <a href="attachment.cgi?id=14263&action=edit" title="OS X Activity Monitor sample of the clang process">[details]</a></span>
OS X Activity Monitor sample of the clang process

In our project we have a single C++ file that contains very large amounts of
inline assembly code.

It used to take no noticeable time to compile this (< 1 second), but after
upgrading to LLVM 3.6 (Apple LLVM 6.1 in Xcode), it's taking tens of minutes.
I'm guessing roughly 30 minutes on this MacBook:

2.2 GHz Intel Core i7
8 GB 1333 MHz DDR3

I'm not at liberty to share the code, however after some testing, it looks like
it might be down to just the quantity of inline assembly code.

On profiling the clang process, the function
clang::GCCAsmStmt::AnalyzeAsmString() seems to be doing all the work. Call
stack from OS X Activity Monitor is attached.</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>