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

Function Inlining

Ilie__Daniel
Beginner
438 Views
Hello,

Is function inlining going to be affected if I move my external (stand-alone)routinesacross differentfiles?
For example:
File1 contains 5 calls to Sub1 and Sub1
Consider this:
If I move 4 out of the 5 calls to 4 different files (File2-File5), how many calls are getting inlined? (1 or 5?)

I am using /Ob2 (IVF9.1).

If the inlining is affected, would adding/Qipo1 solve the issue?

What other options does /Qipo1 enable?

Kind regards,
Daniel.
0 Kudos
6 Replies
Steven_L_Intel1
Employee
438 Views
Unless you use /Qipo, there is no inlining across different source files. /Qipo will give you multi-file inlining.
0 Kudos
Ilie__Daniel
Beginner
438 Views

Steve,

Thank you for your answer.

Are any optimisations automaticallyenabled or disabled if I start to use /Qipo?
Is /Qipo1 preffered over /Qipo?

Daniel.
0 Kudos
Steven_L_Intel1
Employee
438 Views
The only reason to use /Qipo1 is if you have a requirement that only one object file be generated. In most cases, the default (/Qipo) is the better choice as otherwise link times might suffer. I am not sure why you thought /Qipo1 was preferable.

/Qipo enables multifile interprocedural optimization, which is a major feature. It can cause other optimizations to be used because the compiler has more information.
0 Kudos
Ilie__Daniel
Beginner
438 Views
/Qipo enables multifile interprocedural optimization, which is a major feature. It can cause other optimizations to be used because the compiler has more information.

Steve,

Will it cause any ofthe/Qax optimisations to be switched on?

As regards the usage of /Qipo1 over /Qipo, I thought maximum inlining is performed ifonly one object file is created.

Daniel.
0 Kudos
Steven_L_Intel1
Employee
438 Views
/Qipo does not enable other options such as /Qax. You get the same optimization no matter how many object files, but memory use may be lower when more than one object is used. The compiler does all the optimization before creating object files.

I recommend that you ensure your program operates correctly without /Qipo before turning it on.
0 Kudos
Ilie__Daniel
Beginner
438 Views
/Qipo does not enable other options such as /Qax. You get the same optimization no matter how many object files, but memory use may be lower when more than one object is used. The compiler does all the optimization before creating object files.

I recommend that you ensure your program operates correctly without /Qipo before turning it on.

Thank you, Steve.
0 Kudos
Reply