C++ Logo

sg15

Advanced search

Re: [SG15] [isocpp-modules] Reuse of the built modules (BMI) paper

From: Matthew Woehlke <mwoehlke.floss_at_[hidden]>
Date: Tue, 18 Jun 2019 14:28:46 -0400
On 18/06/2019 13.04, Ben Boeckel via SG15 wrote:
> On Mon, Jun 17, 2019 at 14:48:18 -0400, Matthew Woehlke wrote:
>> that a.cpp depends on, whereas I *always*¹ need to rebuild the BMI for
>> a.cpp with or without reusable BMI's.
>>
>> (¹ Pedantically, it depends on if what was changed affects the BMI or
>> not. I'm not sure if IDE's will become "smart enough" to make this
>> determination.)
>
> The compiler can decide to say the BMI that is there is sufficient and
> leave it alone (either by hash or mtime). At least ninja (with `restat =
> 1`) will see that and prune the subgraph that no longer needs scheduled
> because it is up-to-date with the output.

Right, and I expect IDE's can benefit from similar optimization (if they
don't already). I was thinking more along the lines of the IDE being
clever enough to know that e.g. if I changed the body of a
[non-template] function/method, I don't even need to recreate the BMI.

OTOH, since I'm going to re-parse the file anyway, also generating the
BMI (assuming the above optimization) may be nearly free.

-- 
Matthew

Received on 2019-06-18 13:30:37