Effect of clone / duplication / constant distribution function in gcc

When launched gccwith optimization on-on, it clones (duplicates) C-functions when it considers that the function is in a hot path or there are constants that apply to the arguments of the function.

In particular, this is apparently controlled by the option fipa-cp-clone.

Is there any way to influence this? For example, mark one parameter with some attribute as a compile-time constant (how can you do in C ++ with a template parameter), which will cause the function to clone?

+5
source share
1 answer

, ( , - ). GCC , , ; , . , ( ), , , .

, , , , , GCC , . , , , , .

+3

All Articles