Question about indirect functions and PGO

Erick Ochoa
Fri Jul 10 11:17:52 GMT 2020


I'm working on an optimization and I encountered this interesting 
behaviour. There are a couple of functions that are specialized when the 
program is not compiled with PGO (-fprofile-generate and -fprofile-use)

However, when the program is compiled with PGO the compiler does not 
specialize the function calls.

I printing the program just after materializing all clones.

I am running this version of GCC:
Author: GCC Administrator <>
Date:   Fri Jul 10 00:16:28 2020 +0000

     Daily bump.

I can imagine that the profiling information was used to determine that 
specializing these functions is a bad tradeoff between binary size and 
speed. But I do not know this for sure. How can I find out why these 
functions were not specialized? (I.e. is there a threshold that wasn't 
met, and if so, where is it located and what's its value?)


More information about the Gcc mailing list