Recently I've been searching for PGO's related topic, and started wondering how they are applied to the source code and one application effects after another is already applied.
I mean, if you enable PGO optimization in GCC or CLang, for example, it will apply all optimizations (Inlining, Virtual Call Speculation, Dead Code Separation, etc.), right!?
Even if they all are not applied to the source code, let's suppose that some of them are. Then, I guess that they are applied sequentially, right?
So, can they modify the CFG (Control Flow Graph) to the point where some Basic Block frequencies are lost?
For example, if a PGO named "B" is applied after a PGO named "A", and "A" has modified the source code so that some Basic Blocks frequencies are lost, how is "B" applied (supposing that both are PGOs that depend on the BB frequencies)?
(Sorry for my bad english)