3 ms·
I presume "the compiler" you're speaking of is some version of MSVC? I only ask because while this article is about MSVC's pgo, other compilers also have pgo a
by codys 10y ago
I presume "the compiler" you're speaking of is some version of MSVC?
I only ask because while this article is about MSVC's pgo, other compilers also have pgo and lto, and may not have the same issues wrt optimizing across compilation units with lto enabled.
- wscott 10y agoGCC and, I would assume, Clang both support -fprofile-generate and -fprofile-use. But these are based on a trace of actual execution, not a function use profile like implied by the article. But the article may be after a ELI5 filter.
- alfalfasprout 10y agoI haven't used GCC or Clang's PGO, but Intel's PGO lets you specify the kind of instrumentation used and generates a detailed profile. Clang also lets you use instrumented code-paths to generated detailed profiles (that include function use statistics).
- alfalfasprout 10y agoActually, the Intel C++ compiler. I develop for Linux so it's still one of the best options there. All compilers will have more difficulty inlining across compilation units even with LTO than putting the relevant functions in a single unit.