<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 - [CompileTime] [DAGCombiner] Large amount of compile-time spent in getStoreMergeCandidates for inputs with lots of stores"
   href="https://bugs.llvm.org/show_bug.cgi?id=41263">41263</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[CompileTime] [DAGCombiner] Large amount of compile-time spent in getStoreMergeCandidates for inputs with lots of stores
          </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>All
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>florian_hahn@apple.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=21687" name="attach_21687" title="Script to trigger worst case in DAGCombiner and Pre-RA-scheduler">attachment 21687</a> <a href="attachment.cgi?id=21687&action=edit" title="Script to trigger worst case in DAGCombiner and Pre-RA-scheduler">[details]</a></span>
Script to trigger worst case in DAGCombiner and Pre-RA-scheduler

Currently DAGCombiner spends a huge amount of time in getStoreMergeCandidates
for inputs with lots of stores, because it iterates over all stores in the same
token factor for each store it visits.

The attached script generates ll files with N stores in a single BB, that
cannot be merged. 

For 10000 stores, bin/llc -o /dev/null -stop-before=machine-scheduler
-time-passes reports

===-------------------------------------------------------------------------===
                      ... Pass execution timing report ...
===-------------------------------------------------------------------------===
  Total Execution Time: 19.3153 seconds (24.4060 wall clock)

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  ---
Name ---
  18.4783 ( 99.5%)   0.7263 ( 97.3%)  19.2046 ( 99.4%)  24.2557 ( 99.4%)  X86
DAG->DAG Instruction Selection
   0.0299 (  0.2%)   0.0093 (  1.2%)   0.0392 (  0.2%)   0.0545 (  0.2%)  MIR
Printing Pass

===-------------------------------------------------------------------------===
                      Instruction Selection and Scheduling
===-------------------------------------------------------------------------===
  Total Execution Time: 19.1471 seconds (24.1911 wall clock)

   ---User Time---   --System Time--   --User+System--   ---Wall Time---  ---
Name ---
   9.1751 ( 49.8%)   0.3746 ( 52.2%)   9.5496 ( 49.9%)  12.7750 ( 52.8%)  DAG
Combining 2
   7.4307 ( 40.3%)   0.1554 ( 21.6%)   7.5861 ( 39.6%)   8.5715 ( 35.4%)  DAG
Combining 1
   1.7270 (  9.4%)   0.1716 ( 23.9%)   1.8986 (  9.9%)   2.6702 ( 11.0%) 
Instruction Scheduling</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>