<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </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 - `upgradeCUVariable` is non linear"
   href="https://bugs.llvm.org/show_bug.cgi?id=33054">33054</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>`upgradeCUVariable` is non linear
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

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

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>DebugInfo
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>davide@freebsd.org
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>aprantl@apple.com, filcab@gmail.com, llvm-bugs@lists.llvm.org, llvm-dev@redking.me.uk, simon.f.whittaker@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have in my hands a modestly sized piece of bitcode [250MB] produced with 3.8
(dumped after the mover merged input modules at LTO time) that takes circa
1000secs to be parsed. The overall time spent in the optimizer is about 1/10th
of that (120secs).

The profiler shows all the time goes in `parseMetadata` while materializing, in
particular in `upgradeCUVariables` on metadata operations.

- 94.82%  llvm::MetadataLoader::MetadataLoaderImpl::upgradeCUVariables 
    - 42.72% llvm::GlobalObject::getMetadata 
       - 21.45% llvm::MDGlobalAttachmentMap::get
       [...]
    + 29.10% llvm::GlobalObject::addMetadata
    + 11.56% llvm::GlobalObject::eraseMetadata
    [...]

I'm afraid I'm not in a position to share the bitcode as it's owned by one of
our internal game teams, but I may try to reproduce on something publicly
available.

Adrian, you committed this code, any ideas on how we can make it more
efficient?</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>