[cfe-dev] Intros, C++ modules, and Facebook

Louis Brandy via cfe-dev cfe-dev at lists.llvm.org
Tue Oct 27 17:10:53 PDT 2015


From: Sean Silva <chisophugis at gmail.com<mailto:chisophugis at gmail.com>>
Date: Friday, October 23, 2015 at 9:35 PM
To: Louis Brandy <ldbrandy at fb.com<mailto:ldbrandy at fb.com>>
Cc: "cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>" <cfe-dev at lists.llvm.org<mailto:cfe-dev at lists.llvm.org>>, Richard Smith <richard at metafoo.co.uk<mailto:richard at metafoo.co.uk>>
Subject: Re: [cfe-dev] Intros, C++ modules, and Facebook


If you don't have DTrace available so that you can directly measure the time, you can probably get a decent idea based on the inclusion counts. One easy way to do this is to tally up files mentioned by the -H option whose output you can massage. There is also '.d' files, but I forget exactly what we emit into them (we may emit header file names even if we didn't textually touch the header, but only loaded its module).

Spent some time playing with the different options today and -H actually does approximately what I want (telling me which headers are being textually included). It doesn't seem to emit headers that are pulled from the module, though it will emit it during the module build itself (at least with –Rmodule–build). So if I do a clean build leaving the module cache intact, I'll only get the textually included headers.

The dep files appear to include all headers, even those pulled modularly, but it also includes the module maps, so in theory with some parsing I could work it out from there as well. I think I'll try to get by with –H for now and see where it leads.

-Louis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20151028/dc187e96/attachment.html>


More information about the cfe-dev mailing list