[cfe-dev] [llvm-dev] Who wants faster LLVM/Clang builds?

Chris Lattner via cfe-dev cfe-dev at lists.llvm.org
Tue Dec 5 23:11:38 PST 2017

> On Dec 5, 2017, at 10:01 PM, Michael Zolotukhin <mzolotukhin at apple.com> wrote:
>> On Dec 5, 2017, at 9:38 PM, Chris Lattner <clattner at nondot.org <mailto:clattner at nondot.org>> wrote:
>> I, for one, want faster builds.
> Good, we have at least two people on board then :)
>> Beyond that though, this seems like obvious goodness to reduce coupling in the codebase.  I’ve only skimmed the patch, but this seems like a clearly amazingly great ideas.  Did you use the IWYU tool or something else?
> I tried using it, but while it gave me some interesting hints, I stopped using it when the build broke after the proposed changes. Probably, I could’ve figured out what went wrong and made it work, but I also noticed that the proposed by IWYU changes are much more intrusive - i.e. it tries to forward declare symbols, analyze include chains and leave only the last include etc (and it only would work if one applies the changes to all affected files at once). While these all are good ideas, I'd expect some objections against mechanical application of such clean-ups. Plus the patch would be much less obvious.
> So, instead, I implemented a light-weight version of it that just tries to remove #include lines, making the footprint of this cleanup local. As a result, here I get a patch consisting of many independent changes (it can be applied per file and everything should work fine). More details of how that was done is in “Methodology” section in the end of the original e-mail.

Got it.  I’ve never used IWYU, but those ideas sound like they could lead to further improvement.  It sounds like the right thing is to get your basic patch set in, then explore where IWYU can do anything useful above and beyond that.

If the gains are immeasurable and a PITA to work with, then it can easily be dropped.  If it leads to a few significant wins, it could be worth playing with.

In any case, thank you for working on this!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20171205/bdf4fb4b/attachment-0001.html>

More information about the cfe-dev mailing list