Does -flto effect vectorization and unrolling of loops?

Steve Kargl sgk@troutmask.apl.washington.edu
Tue Dec 16 23:24:37 GMT 2025


On Tue, Dec 16, 2025 at 11:31:13PM +0100, Florian Weimer wrote:
> * Steve Kargl via Gcc:
> 
> > So, my question is "Does -flto simply suppress reporting from
> > -fopt-info-optall or does -flto actually suppress unrolling,
> > tree vectorization, and tree auto parallization.
> 
> Do you supply -fopt-info-optall during linking?
> 

I assume, yes.  I build a libraries/objects with

gfortran [options] -c XXXX.f90
...
ar cr libbar.a ${OBJS}

and link the executable image with

gfortran [options] -o foo foo.f90 -lbar

In the above [options] is a list of options and the
list contains -fopt-info-optall.  I added -flto=auto
to the [options] and now I see opt-info output.

-- 
Steve


More information about the Gcc mailing list