visual c++ - Is there any benefit to passing all source files at once to a compiler? -


i have read "whole program optimization" (wpo) , "link time code generation" (ltcg).

i wonder there more inter-module-analysis going on if pass sources @ once compiler cli (like "g++ a.cpp b.cpp")? or going enable 1 of flags?

is there difference between compilers this? instance can intel compiler benefit such practice while other compilers don't?

i wonder there more inter-module-analysis going on if pass sources @ once compiler cli (like "g++ a.cpp b.cpp")?

for gcc, no, doing not enable wpo, each translation unit processed separately, in isolation. i'm 99% sure same true clang, , 90% sure it's true other compilers.

with gcc, enable inter-module optimisation need request explicitly via -flto switch, still processes each translation unit in isolation, additional information written object file , when linked further optimisation passes done produce final output.


Comments

Popular posts from this blog

c# - How to get the current UAC mode -

postgresql - Lazarus + Postgres: incomplete startup packet -

javascript - Ajax jqXHR.status==0 fix error -