<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/54441>54441</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
IR Outliner: Huge compile time overhead on MicroBenchmarks/LCALS/LCALSSuite at -O3
</td>
</tr>
<tr>
<th>Labels</th>
<td>
llvm:optimizations
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
ornata
</td>
</tr>
</table>
<pre>
Compile `llvm-test-suite/MicroBenchmarks/LCALS/LCALSSuite.cxx` for arm64 at -O3. On a debug build of clang on my machine:
```
real 0m48.560s
user 0m48.178s
sys 0m0.345s
```
With the IR outliner enabled on the same benchmark:
```
real 618m56.280s
user 617m43.523s
sys 0m57.651s
```
Here is an IR dump which reproduces the issue: https://godbolt.org/z/eMGhr5McT
Currently, the `opt` using the IR outliner gets killed by Compiler Explorer for taking too long.
CC: @AndrewLitteken
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNU1Fv2yAQ_jX2yymWjcF2HvyQpus6qVWlddKesbnYLBgiwG3TXz_wHG2LpqkSBt8dfPfx3dEZcW73ZjpJhZBUuVIv08aj8xs3S48JuXuUvTU3qPtx4vbogudhv3t4vqzPcVvWv72Fw3AwFridKgrcw-apzOBJAweB3TxAN0slwBygV1wPYDRMZ5h4P0qNSblL8tskv8xVvo7FtMhVkm_ziTYZq3L3yzs7tBdvUTer153d4syzkjL3T7hf83fpR_AjwpevYGavAgsLqHmnUERyMeT4hNBd7v4hklXRTKzKSHNFsyrqiZYZI-UVUVZnFSv-x_QeLYJ0wHXkKubpBK-j7EeweLJGzD26ha10bo5Kwuj9yUW25C6MwYjOKJ8ZOwTrPXz4-Hm07LH_9meW_Wwtaq_OCdkvcIGFOflY1tnJULBrrQb0Do5SRb26M6xNZOHT20kZG35iN3h-XM4aA8roIfsr4z6STWi-08Li64P0Ho-oIRVtKbbllqdeeoVtSPq0Jo0H7ucBoV9b1stQIfOCdkS-lO0j7bp2Zzpb1V5pFZpi7rKAHoz4FtZlE4T-gb0P5qJyxGWU0iId24pT2lQHwQ60zoXoD82BbgtWl6Sqtk1FU8U7VK5N2E1CyAJa7oKycpLv3EujAxhJ2G0qW5ITkpdFU9RlzUhG6kYI2rCC9Iz2dR2kwolLlUWQWM_Utgu78LxcCCrpvPsd5M7JQSMumQM-n_1obGus5p6nyz3a5RI_Ad7pOuc">