<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 - Eliminate PHI nodes pass really slow at -O3"
   href="https://bugs.llvm.org/show_bug.cgi?id=32984">32984</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Eliminate PHI nodes pass really slow at -O3
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </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>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>douglas_yung@playstation.sony.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=18424" name="attach_18424" title="rtc.all.c">attachment 18424</a> <a href="attachment.cgi?id=18424&action=edit" title="rtc.all.c">[details]</a></span>
rtc.all.c

We have an internal test for which the compile time jumped from around 3
minutes to over 10 minutes after r295538. The attached test case, rtc.all.c,
when compiled with a Windows hosted compiler built from r295537 took 165
seconds to compile, while a Windows hosted compiler built from r295538 took 646
seconds. From a generated time report with the r295538 compiler, the culprit
seems to be the Eliminate PHI nodes for register allocation pass which took
almost 50% of the compilation time. In the generated time report for r295537,
this stage only took around 10% of the compilation time.

Here are the top 3 items in the time report when the attached file was built
using r295537:

  66.0040 ( 40.7%)   1.5912 ( 79.1%)  67.5952 ( 41.2%)  67.5629 ( 41.2%) 
Unroll loops
  16.5205 ( 10.2%)   0.0000 (  0.0%)  16.5205 ( 10.1%)  16.5549 ( 10.1%) 
Induction Variable Users
  15.0229 (  9.3%)   0.0000 (  0.0%)  15.0229 (  9.2%)  15.0129 (  9.1%) 
Eliminate PHI nodes for
register allocation

Compare that to the top 3 items in the time report when the attached file was
built using r295538:

  310.4420 ( 48.6%)   0.0624 (  1.0%)  310.5044 ( 48.2%)  310.5218 ( 48.2%) 
Eliminate PHI nodes
for register allocation
  128.4824 ( 20.1%)   3.9936 ( 61.5%)  132.4760 ( 20.5%)  132.7336 ( 20.6%) 
Unroll loops
  39.6867 (  6.2%)   0.0312 (  0.5%)  39.7179 (  6.2%)  39.7383 (  6.2%) 
Branch Probability Basic
Block Placement

To reproduce the slowdown, build the attached test case with a compiler >=
r295538, and compile with -O3.</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>