Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28894 Discussions

ifx: long compilation time without optimizations (-O0)

foxtran
New Contributor I
1,071 Views

Dear,

I have some set of files that compilation time is longer without any optimizations (-O0) rather than with any optimizations (>=-O1).

See compilation log below:

$ time ifx -O0 -c file.f -o file.f.o
real 0m15.531s
user 0m14.691s
sys 0m0.090s

$ time ifx -O1 -c file.f -o file.f.o
real 0m0.688s
user 0m0.524s
sys 0m0.047s

$ time ifx -O2 -c file.f -o file.f.o
real 0m0.923s
user 0m0.787s
sys 0m0.093s

$ time ifx -O3 -c file.f -o file.f.o
real 0m0.912s
user 0m0.809s
sys 0m0.084s

 
While with example file compilation time is about 15s, I have another file on which compilation time exceeds one hour without any optimizations!
With -O3 the longest file compiles just in 9s.

Please, find an example file in the attachment.

My expectation that compilation time without any optimization will be comparable with -O1 optimization level or even less.

My ifx is: ifx (IFX) 2023.2.0 20230721

Best regards,
Igor

4 Replies
foxtran
New Contributor I
1,046 Views

Compilation with -i_tapi shows that without any optimization the pass "Fast Register Allocator" is not fast:

   ---Wall Time---  --- Name ---
  17.1798 ( 97.5%)  Fast Register Allocator


So, this pass takes almost all time of compilation.

0 Kudos
Barbara_P_Intel
Employee
1,022 Views

That's what I see, too, Fast Register Allocator. And that doesn't show up AT ALL at the higher opt levels! 

0 Kudos
Barbara_P_Intel
Employee
958 Views

I filed a bug report, CMPLRLLVM-53405. I'll let you know when there's a fix.



0 Kudos
Barbara_P_Intel
Employee
668 Views

I just checked the compile time at -O0 with a preview version of ifx 2024.2.0. Time is 0.282s. Much better.

Look for this compiler in mid-2024.


0 Kudos
Reply