<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/136635>136635</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
File extremely slow to compile
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
jcelerier
</td>
</tr>
</table>
<pre>
The attached file takes a very long time to build at higher optimization levels. clang-19 as provided by archlinux (x86-64).
With optimizations and debug info it's been running for 20 minutes and I haven't seen it end yet so I assume it's stuck.
For reference my machine can do a clean LLVM+clang build in roughly 7 minutes (420 seconds)
Flags | Timings |
_________|_______|
-O0 | 30s |
-O0 -g | 40s |
-O1 | 72s |
-O1 -g | ??? |
-O2 | 109s |
-O2 -march=native | 139s |
-O3 | 126s |
-O3 -march=native -g | ??? |
[slow.zip](https://github.com/user-attachments/files/19841388/slow.zip)
when tracing the performance with one of the stuck processes it seems that it is due to the removeredundantdebugvalues pass:

</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVE2P4ygQ_TXkUnKEy98HH9LTitTSrPYy2j2uMJRtZjBEgNOd-fUrnKS704c9rIXEx6v3qIJnRAh6skQ9q55Y9bwTa5yd739KMuQ1-d3g1KX_MROIGIWcScGoDUEUvyiAgDP5CxhnJ4h6IYgOhlUbBSLCrKeZPLhT1Iv-LaJ2FgydyYQ9SCPslOUdiAAn785akYLhAsLL2Wi7vgHD9q2ts7pk2O0ZP_yt4_ygFUBYBYqGdQJtRwc6MmwCDEQW_GqtthOMzgNyWLRdI10ZLzCLM1mGTYSQYnUEsgouFCE4eAERwrrQXS7EVf5KCTB-ODoPnkbyZCXBcoFFyFlbAiksKAcCpCFh4fv3v_5g-LQVeTsPbcG7dZrNBZr3dBi2JXIIJJ1VgWF328aIKQBrvgH80Iu21wnjh3_uH2u-fYwYP2R_crh_G6_gd84GZdNnsOThNt7w_JHa4Ff0kc2K47W9h-CjQM67BwWEbEn3yopnK6I-0xaWF91HisV1CevPS19Z2bRFfd0_teopGPe6_61PrHpm2M4xngIrDgyPDI-TjvM67KVbGB7XQD67enkhGwPDYzJ06vOuLfOibRke3-Xud_I6k4XohUyuijPBifzo_CKSE143b1oCN27Y5pnka0khUEgOC0RLgDiLmGY6gFq3vyWFe1rcmTyp1Sph42bpszArBTiJkOqAW52Ys-rpZRET_Z86RQi0DaoaxVCPVVbnXZ6VlRyyoeYiq7tBKcK6k61i2O1UX6iu6MSO-rwpK2xzbNrd3BfFMColSImhypuuVbJo2qEbyxI54kg73SPHipeInGOet3s5jCQ7KiTveKU6zkpOi9Bmb8x52Ts_7XQIK_V5UddFtTNiIBO2NwnR0itsKENMT5TvEykb1imwkhsdYviQiToa6o_piaK36Gkhc4F0m-mwpVtO2tBu9ab_j6NLYrcuO3n3k2RkeNxS2GxyzfHc478BAAD__z07niE">