-Mipa flag not resulting in linking with IPA

Hi there,

I am attempting to use interprocedural analysis for the first time with a CUDA Fortran code. Looking at the documentation I got the impression that I simply needed to add the compilation flag -Mipa (or -Mipa=fast, I tried both) and that this would work, however when I compile the code it gives a message stating that it is ‘Linking without IPA’ and I cannot see any of the new object files. There is also an additional message:

‘The following function(s) are called, but no IPA information is available:

I was under the impression that this should still work even if not all functions had IPA information available so I suspect this is not the main issue and that I am making some other mistake…


Hi James,

IPA is only available for host code and only in our older non-LLVM compilers. Though, “pgf90_dev_configure_call” is a host side call to register the CUDA Fortran device routines so we probably could add a IPA reference. Given we haven’t yet added IPA to the LLVM based compiler and the non-LLVM compilers are deprecated, it’s doubtful this would occur anytime soon. For now, I would avoid using IPA.

IPA’s most useful feature is cross-file inlining. There are others, such as constant propagation, but they rarely help performance and one of the reason why adding IPA support to LLVM has been a low priority.

Cross-file inlining can also be performed using a two-pass process. First, compile all the source with the flag “-Mextract=lib:mylib” where “mylib” is a user defined name of the inline library to build. Then compile again with “-Minline=lib:mylib” to use this information to perform the cross-file inlining.


Be aware though that at the moment cross-file inlining does not work on PGI 19.x with the LLVM backend, see my post PGI not inlining function across files