<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/62687>62687</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[mlir] Use of MLIR Properties slows compilation
</td>
</tr>
<tr>
<th>Labels</th>
<td>
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
psteinfeld
</td>
</tr>
</table>
<pre>
Starting with patch https://reviews.llvm.org/D148298, compilation times for some Fortran benchmarks slowed significantly. Here's a small Fortran test case that illustrates the problem:
```
Program slow
Integer, Parameter :: x(2,4,6,8,10,12) = &
Reshape( [ (i,i=1,46080) ], [ 2,4,6,8,10,12 ] )
End Program
```
If I run the `bbc` tool on this program with the `-emit-fir` option, compilation stops after the initial creation of the FIR code. If I run this command on a compiler produced with and without the patch listed above, I get almost identical results. Here's the command line I used:
```
time bbc -emit-fir slow.f90
```
On the other hand, if I run the `bbc` tool without the `emit-fir` option, the bbc tool runs all of the optimization passes. In this case, the execution time is almost twice as slow. Here's the command line I used:
```
time bbc slow.f90
```
I also noted that the optimized and unoptimized MLIR produced is identical.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVF2Pq0YM_TXDi7URDIHAAw97N40aqVVXW_UHGDBh2mEGjc3uvf311UCym1Z7qz5UiggfnuPjc2wjs7k4okYVX1RxTHCR0YdmZiHjBrJ90vr-W_OrYBDjLvBmZIQZpRthFJlZ5Y9Kn5Q-BXo19MY7a1-nnQ8XpU_HbF_pulL6CTo_zcaiGO9AzEQMgw_AfiI4-SABHbTkunHC8AcDW_9GPURmZjAdOrHfdgA_UiClDwwIPKG170eFWKBDJpARBYy1C0tAIQYZCebgW0tTpJoeVfqoyvT6Wx-fg78EnNas2xuAsxO6UIjUnzHgREIBIkD-CF-VrrTST3uln0qln2KBWRovWukaVH4EpcsbEsAL8YgzKV2BKr6A0pVR-smo_JhFlDKt0vVccYzpYsh30GMIKF1v0D-4Hq7UPy3rPMAZwuJWCVSZtm2nyhTEewvRhdFwVGYtfXX1GvdAk5GHwYQY7edo2T8dZPEzAw5RlHjKOCMGLXSBtgA_rO9P5xfofE87gDs2hiPYhK6PPPCKTCGy6ZeO-o1O_B5v_CKbi2vTWcNCPWDrXynSOsOFBNBOngVMT05MhxYC8WKF75smYtzyWuMIzrAw9d_ritil0LYdvOuxNshuqNNP47frL5vcXkYKMKLrI0fzL07cV6jK9HPt48dIZT0RFscQu_8qcgybzJ-b8DMyUyz7fFMamW4Q9JW65X0EwfBNN3kzHQFug_d_aPYflDoDWvbgfLRzHdu7YqLDrofFfTz__NP55aNDDH-YvUv6Ju_rvMaEmqys8lqXe10kY1PUZXEYsMuwwAPVmGa6GNq6O9T10OU4JKbRqc7TItM606kudnVWFJgXh_1BZ1VVD2qf0oTGvq-1xDAv1JS6rA6JxZYs31ZnaGLQQ7tcWO3T2Kgf2zARI3ZdspM1Ic7xb0zRwbWs5-BnCmJoc4Dvhy1Zgm3-vmovRsal3XV-UvoUM1z_Hubgf6dOlD6tLFnp00r0rwAAAP__dbzdHQ">