<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 - Fix all opt tests to work under NPM"
   href="https://bugs.llvm.org/show_bug.cgi?id=46651">46651</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Fix all opt tests to work under NPM
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>aeubanks@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>alina.sbirlea@gmail.com, hans@chromium.org, htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Blocks</th>
          <td>46649
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Many check-llvm tests use something like "opt -foo-pass". Previously this would
always use the legacy pass manager. I've added the "enable-new-pm" opt flag to
use the new pass manager instead even for "-foo-pass". (previously you would
use "-passes=foo" to use NPM) An alternative is to add the corresponding
"-passes=foo" RUN line for a test that has "-foo-pass", but I'd rather not
touch that many tests, and I think maintaining compatibility between the two is
a better guarantee of feature parity. And we'd still end up doing most of the
remaining work anyway.

To repro, set the "enable-new-pm" flag in llvm/tools/opt/opt.cpp to true and
run check-llvm. (maybe there should be a CMake flag for this? I considered
adding this onto -DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=ON but that would break
check-llvm for people already using that flag for Clang.)

Right now there are around ~1600 check-llvm failures on Linux with
"enable-new-pm" set to true.
Some of these are pass names being inconsistent between the legacy pass manager
and NPM.
Some of these are opt features that the NPM opt path doesn't handle.
Some of these are real bugs in NPM passes.</pre>
        </div>
      </p>

        <div id="referenced">
          <hr style="border: 1px dashed #969696">
          <b>Referenced Bugs:</b>
          <ul>
              <li>
                [<a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Change default pass manager to new pass manager"
   href="https://bugs.llvm.org/show_bug.cgi?id=46649">Bug 46649</a>] Change default pass manager to new pass manager
              </li>
          </ul>
        </div>
        <br>

      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>