<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/105959>105959</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            -Wall causes massive compilation slowdown
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          mikulas-patocka
      </td>
    </tr>
</table>

<pre>
    Download an example file from:
http://www.jikos.cz/~mikulas/testcases/clang/ipret.e
(the file comes from Ajla, https://www.ajla-lang.cz/ )

If you compile it with
$ time clang-20 -c -x c ipret.e -O2
it takes 23 seconds

If you compile it with 
$ time clang-20 -c -x c ipret.e -O2 -Wall
it takes 31 minutes

I tested it with clang-20 from Debian Sid. On clang-18 and older, it takes a long time to compile the file even without -Wall, but the -Wall switch makes it twice worse.

Also, note that while clang-19 and clang-20 compile faster than clang-18, the code generated by clang-19 and clang-20 for this file is inferior to the code generated by clang-18 and older.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUk8GOmzAQhp_GXEYgYiAJBw7pRpF62kMPPQ9mAk6MHeEh7PbQZ68MbHa3Ulv1QgK2v--fsQa9160lqkTxRRTHCEfu3FD1-joa9PEN2akrRrVrXqujm6xx2ABaoBfsb4bgrMNjcL3IDiI9ivTQMd_CizwJeZqmKbnoq_OJ-iHk6efKFfLE5Fmhp_BfGbStkCd9G4gTWjhC7rlbBcr15GcNHC4GhXyCoPGfPHgxGAfS4gIhy5U0P7-e4dWNAXULSM0wae7eXDmw7gnmJLFMIVYQv4CCNRLEz3LZqhkYr-RBZuBJOdv4f1vgPzQQf0djfpNlG-i1HZk-yyB0kZqH5sGdW3WkWqOFb7pJ4Nmui5s9oG3AmYaG0MeHAsE42y752D0qeNwB3cnOFjfymlE-QT3yvGX-AH7SrDroZ2AgT1oRTG7wlHwMfjDehdPWcTAgw9TN97xELOeIj2LeopzRMw1h_3sxgRL8yjUELVkaMDSkfv0D6-wCQPulJu1B2zMNOnx1fwd96FsSNVXWlFmJEVWbncyLTJbbXdRVm3qXFdk5L2mfparYqXOdZZs9bWtKsVBlpCuZyjzdy1ymxTbdJZTviZp6v91u8jorpMhT6lGbxJh7n7ihjbT3I1WbtCiLMjJYk_HztEppaYJ5VUgZhneowqG4Hlsv8tRoz_4dw5oNVcs9KRw9eejD9N9pbTCydha8cVPjJhuNg6k-D1mruRvrRLleyFPgrj_xbXAXUhwmOKQJI73GvVfyVwAAAP__gHhrVQ">