Skip to content

nir, radv, aco: Use precompiled headers during build.

Tatsuyuki Ishi requested to merge ishitatsuyuki/mesa:pch into main

This patchset introduces the use of pre-compiled headers (PCH) for nir, radv and aco, respectively.

PCH allows the compiler to re-use the header parsing results, and can provide significant speedup when the header is large and included in lots of modules. On my 3700X, I observed an 5.5s, 1.4s and 1.1s speed improvement for nir, radv and aco (out of 26.1s for a RADV-only build), respectively.

(Edit: fixed ordering error in the summary.)

The primary drawback is that PCH gets included at the head of every source file. The consequences are:

  • Modifying a file in PCH rebuilds all source inside the component.
  • It's possible to accidentally forget including one of these headers include in PCH, due to the implicit including behavior.

The header set is picked to minimize such drawbacks as possible. As described in commit messages, the headers are large in size and commonly used inside the respective component.

Edited by Tatsuyuki Ishi

Merge request reports

Loading