Closed
Description
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.