<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 - Large compile time regression when building CheckerRegistry.cpp using Visual Studio 2017 on Windows"
   href="https://bugs.llvm.org/show_bug.cgi?id=43369">43369</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Large compile time regression when building CheckerRegistry.cpp using Visual Studio 2017 on Windows
          </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>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>After upstream commit r369961, compiling the file
clang\lib\StaticAnalyzer\Frontend\CheckerRegistry.cpp with optimizations
enabled on Windows using Visual Studio 2017 has greatly increased in the amount
of time needed to compile on my machine.

I generated preprocessed files using r369960 and r369961 and built each on my
machine with the following results:

C:\sandbox\r369961\upstream>..\timecmd.cmd "C:\Program Files (x86)\Microsoft
Visual
Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe" /c
CheckerRegistry.good.i /TP /wd4624 /O2
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

CheckerRegistry.good.i
command took 0:0:29.97 (29.97s total)

C:\sandbox\r369961\upstream>..\timecmd.cmd "C:\Program Files (x86)\Microsoft
Visual
Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe" /c
CheckerRegistry.bad.i /TP /wd4624 /O2
Microsoft (R) C/C++ Optimizing Compiler Version 19.16.27031.1 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.

CheckerRegistry.bad.i
command took 0:10:4.87 (604.87s total)

Note the time required to compile went from ~30 seconds to around 10 minutes!

Other files in the build of clang may also be affected, but this one seems to
stand out the most on my machine as it was causing timeouts in our distributed
build system due to the long compilation time.

I am attaching preprocessed copies of the CheckerRegistry.cpp file to help ease
reproduction. CheckerRegistry.good.i is a preprocessed version of the file from
r269960, and CheckerRegistry.bad.i is a preprocessed version of the file from
r269961. To build, simply use options /TP /O2, and optionally /wd4624 to
silence a warning.</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>