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

    <tr>
        <th>Summary</th>
        <td>
            Increasing inline-threshold causes large slowdown on IntegralLiteralExpressionMatcher.cpp
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          vient
      </td>
    </tr>
</table>

<pre>
    Hi, I tried compiling LLVM 15.0.6 with `-Xclang -mllvm -Xclang -inline-threshold=500` and noticed that mentioned https://github.com/llvm/llvm-project/blob/llvmorg-15.0.6/clang-tools-extra/clang-tidy/modernize/IntegralLiteralExpressionMatcher.cpp takes a really long time to compile.

I've taken compile command from `compile_commands.json`, used it to preprocess this source file to `lul.cpp`, deleted all unneeded options and determined what threshold triggers it (296):
```
$ time /usr/bin/clang++ -O3 lul.cpp -c -o /dev/null -Wno-gnu-line-marker -mllvm -inline-threshold=295

real    0m0.776s
user    0m0.709s
sys     0m0.064s

$ time /usr/bin/clang++ -O3 lul.cpp -c -o /dev/null -Wno-gnu-line-marker -mllvm -inline-threshold=295 -fno-exceptions

real    0m0.683s
user    0m0.663s
sys     0m0.020s

$ time /usr/bin/clang++ -O3 lul.cpp -c -o /dev/null -Wno-gnu-line-marker -mllvm -inline-threshold=296

real    0m14.016s
user    0m13.887s
sys     0m0.129s

$ time /usr/bin/clang++ -O3 lul.cpp -c -o /dev/null -Wno-gnu-line-marker -mllvm -inline-threshold=296 -fno-exceptions

real    1m41.851s
user    1m41.596s
sys     0m0.244s
```

Is it expected? In `-fno-exceptions` case changing threshold from 295 to 296 caused 150x compilation time. This file seems to be the only one causing problems in `clang;clang-tools-extra;lld;bolt` projects — I tried thresholds as big as 1000.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzMVU1v3DYQ_TXcy0ACRX0fdMjWEWrA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