Is there any use for transferring all source files at once to the compiler?

I read about "Optimizing the whole program" (wpo) and "Generation Time Time Code" (ltcg).

I wonder if there is still intermodal analysis if I pass all the sources to the compiler from cli at once (for example, "g ++ a.cpp b.cpp")? Or is it just the inclusion of one of these flags?

Is there any difference between compilers for this? For example, can the Intel compiler benefit from this practice while other compilers do not?

+4
source share
3 answers

, , cli (, "g++ a.cpp b.cpp" )?

GCC, , WPO, , . 99% , Clang, 90% , .

GCC, , -flto, - , , , .

+5

GCC, ( ).

, . -funit-at-a-time , . ( -funit-at-a-time) , .

: GCC

, LTO, ( ) .

+2

Intel ++ (ICC) . , IPO . Intel -. ( IPO) . https://software.intel.com/en-us/node/459446.

+2

Source: https://habr.com/ru/post/1530387/


All Articles