[Mesa-dev] [PATCH 0/10] more header file clean-ups

Emil Velikov emil.l.velikov at gmail.com
Sat Feb 28 06:59:51 PST 2015

On 26 February 2015 at 23:31, Thomas Helland <thomashelland90 at gmail.com> wrote:
> On Feb 26, 2015 4:32 PM, "Emil Velikov" <emil.l.velikov at gmail.com> wrote:
>> On 26/02/15 01:30, Brian Paul wrote:
>> > Another clean-up series.  Mostly trimming down on unneeded #includes.
>> >
>> > I tested DRI, non-DRI and MSVC builds of this series but it's possible
>> > I've missed some configuration and broke something.  Fix-ups should be
>> > simple though.
>> >
>> Hi Brian,
>> Did you go through the includes list manually, or there is a handy tool
>> that you've used ?
>> I'll test a couple extra build permutations as it lands, although the
>> series looks great.
>> -Emil
> Hi Emil,
> I've previously used a llvm tool called "Include what you use".
> (Mostly referred to as IWYU)
> This checks includes to find out where they should be located and not,
> and prints a git-diff sorta thing on them.
> (It can also directly modify source, but this is a bit beta)
> I used this on the glsl part of the tree once, and it works quite OK.
> It does give some false positives, so one should check the suggestions.
> Apparently its been used on Firefox with great success.
> They reduced compile time quite drastically, but I don't have the
> source of those claims ATM.
> At least it greatly reduces the impact of recompiles when changing a header
> (That's what I noticed the most when I used it.)
> This might be what you're looking for.
That's the one. Thank you Thomas.
It does give a significant amount of extra includes (false positives I assume).

It's a lovely tool though :-)


More information about the mesa-dev mailing list