From c554a4903cfcdf53ce08eaaa73ba97078be152ce Mon Sep 17 00:00:00 2001 From: Connor Tsui Date: Sun, 15 Dec 2024 21:52:12 -0500 Subject: [PATCH] specify what a CGU is --- .../incremental-compilation-in-detail.md | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/src/queries/incremental-compilation-in-detail.md b/src/queries/incremental-compilation-in-detail.md index b7f475620..4133b196c 100644 --- a/src/queries/incremental-compilation-in-detail.md +++ b/src/queries/incremental-compilation-in-detail.md @@ -377,15 +377,14 @@ the result cache doesn't unnecessarily shrink again. # Incremental Compilation and the Compiler Backend The compiler backend, the part involving LLVM, is using the query system but -it is not implemented in terms of queries itself. As a consequence -it does not automatically partake in dependency tracking. However, the manual -integration with the tracking system is pretty straight-forward. The compiler -simply tracks what queries get invoked when generating the initial LLVM version -of each codegen unit, which results in a dep-node for each of them. In -subsequent compilation sessions it then tries to mark the dep-node for a CGU as -green. If it succeeds it knows that the corresponding object and bitcode files -on disk are still valid. If it doesn't succeed, the entire codegen unit has to -be recompiled. +it is not implemented in terms of queries itself. As a consequence it does not +automatically partake in dependency tracking. However, the manual integration +with the tracking system is pretty straight-forward. The compiler simply tracks +what queries get invoked when generating the initial LLVM version of each +codegen unit (CGU), which results in a dep-node for each CGU. In subsequent +compilation sessions it then tries to mark the dep-node for a CGU as green. If +it succeeds, it knows that the corresponding object and bitcode files on disk +are still valid. If it doesn't succeed, the entire CGU has to be recompiled. This is the same approach that is used for regular queries. The main differences are: