Re: [Mesa-dev] Profile-guides optimizations

2020-02-14 Thread Eero Tamminen
Hi, On 13.2.2020 20.44, Dylan Baker wrote: I actually spent a bunch of time toying with PGO a couple of years ago. I got the guidance all working and was able to train it, but what we found was that it made the specific workloads we threw at it much faster, but it made every real world use case

Re: [Mesa-dev] Profile-guides optimizations

2020-02-13 Thread Timur Kristóf
The GCC wiki says: "GCC uses execution profiles consisting of basic block and edge frequency counts to guide optimizations such as instruction scheduling, basic block reordering, function splitting, and register allocation." More info here: https://gcc.gnu.org/wiki/AutoFDO/Tutorial Timur On

Re: [Mesa-dev] Profile-guides optimizations

2020-02-13 Thread Marek Olšák
Yeah I guess it reduces instruction cache misses, but then other codepaths are likely to get more misses. Does it do anything smarter? Marek On Thu., Feb. 13, 2020, 17:52 Dave Airlie, wrote: > On Fri, 14 Feb 2020 at 08:22, Marek Olšák wrote: > > > > I wonder what PGO really does other than

Re: [Mesa-dev] Profile-guides optimizations

2020-02-13 Thread Dave Airlie
On Fri, 14 Feb 2020 at 08:22, Marek Olšák wrote: > > I wonder what PGO really does other than placing likely/unlikely. With LTO it can do a lot more, like grouping hot functions into closer regions so they avoid TLB misses and faults etc. Dave. ___

Re: [Mesa-dev] Profile-guides optimizations

2020-02-13 Thread Marek Olšák
I wonder what PGO really does other than placing likely/unlikely. Marek On Thu., Feb. 13, 2020, 13:43 Dylan Baker, wrote: > I actually spent a bunch of time toying with PGO a couple of years ago. I > got > the guidance all working and was able to train it, but what we found was > that it >

Re: [Mesa-dev] Profile-guides optimizations

2020-02-13 Thread Dylan Baker
I actually spent a bunch of time toying with PGO a couple of years ago. I got the guidance all working and was able to train it, but what we found was that it made the specific workloads we threw at it much faster, but it made every real world use case I tried (playing a game, running piglit,

[Mesa-dev] Profile-guides optimizations

2020-02-13 Thread Marek Olšák
[Forked from the other thread] Guys, we could run some simple tests similar to piglit/drawoverhead as the last step of the pgo=generate build. Tests like that should exercise the most common codepaths in drivers. We could add subtests that we care about the most. Marek On Thu., Feb. 13, 2020,