[LLVMdev] [RFC] BlockFrequency is the wrong metric; we need a new one

Diego Novillo dnovillo at google.com
Mon Feb 3 07:47:19 PST 2014


On Sun, Feb 2, 2014 at 5:13 AM, Chandler Carruth <chandlerc at gmail.com> wrote:

> ---- Block Freqs ----
>  a = 1.0
>   a -> b1 = 0.5
>   a -> b2 = 0.5
>  b1 = 0.5
>   b1 -> c1 = 0.25
>   b1 -> c2 = 0.25

But this looks as if none of the edge probabilities were taking static
indicators into account? An edge going into a return, abort(), etc.

> BlockWeights instead of BlockFrequencies. My idea is that we don't really
> care about the depth of the control dependence for a particular basic block.

I agree. I naively thought that's what it's already done today. If you
follow this, then the relative hotness of blocks/regions can be
computed based on the aggregate weight by the paths into them.

Now, when we have sample information, we have raw block counts.
Wouldn't it make sense to just use them in that case?


Diego.



More information about the llvm-dev mailing list