Estimating branch probability using Intel LBR feature
easyperf.net
easyperf.net
The more important ones are for cache layout of bigger data structures, and there branch tracing is less than useful.
That said, this is very useful for tracing thread execution in particular. (Inter thread cache flushes are a thing.)
The change to a non-inclusive L3 is more likely to contribute to greater capacity.
Core i7-6950X - $1,700 at launch in 05-2016: 10 × 256 KiB of L2, with 25 MiB of L3. Core i9-7960X - $1,700 at launch in 09-2017: 16 x 1024 KiB of L2, with 22 MiB of L3.
i9-7960X: 1024 KiB L2/core, 1.375 MiB L3/core
Seems to be exactly what I described? L2/core went up by 768 KiB, L3/core went down by 1.125 MiB.
Per core you're correct, but I was looking at net cache available, as that had been remaining static, usually just seeing an extra 256 KiB of L2 per core with little L3 change.
Identifying a rare subpath (or more usefully: all the rare subpaths) in a particular control-flow allows a lot of down-stream leverage.
Opportunities exist for biasing everything from register allocation to code-motion towards optimizing the fast-path branch. Additionally, if the rarely-taken branch is part of a conditional that introduces new definitions that are phi-ed later on, the joining block (and subsequent blocks) can be split (specialized) for the fast-path and slow-path cases.
This would open up opportunities for constant-optimization - constants introduced in the common-path branch which stop being constants later on due to phis can remain constants in the modified control flow.
And you get the usual round of benefits for DCE, GVN, etc. coming out of that too.
There is a big overlap, but they are not equivalent. Especially the default prediction and the fact that the number of predictions per cache line (branch density) has a limit. Also, loop unswitching is still worth it.
L1 code cache is just 32 kB. 512 cache lines of 64 bytes each. It's been 32 kB for almost 13 years, since Core 2 release.
> The more important ones are for cache layout of bigger data structures,
Bigger, like more than 500 cache lines (~31 kB) large? Also L1 data cache is just 32 kB. Wouldn't consider that very large data structure, although your mileage may vary.
Intel Ice Lake is supposed to get a "massive" 48 kB L1 data cache. We'll see.
[1] http://people.ee.duke.edu/~sorin/ece252/lectures/6.2-static-...