[PATCH] D136624: [clang][modules] Account for non-affecting inputs in `ASTWriter`

Jan Svoboda via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 1 16:35:28 PDT 2022


jansvoboda11 marked 4 inline comments as done.
jansvoboda11 added a comment.

In D136624#3900183 <https://reviews.llvm.org/D136624#3900183>, @dexonsmith wrote:

> Partly, trying to dig into why read speeds got slower. But maybe that was noise that went away though when you switched to cycles/instructions?
> Great; looking forward to seeing new numbers.

Ah, I forgot to mention this. Building the modules is now only 0.2% slower and importing them 1.2% faster (compared to PCMs with all input files serialized).



================
Comment at: clang/include/clang/Basic/SourceManager.h:1831-1833
+  bool isLoadedOffset(SourceLocation::UIntTy SLocOffset) const {
+    return SLocOffset >= CurrentLoadedOffset;
+  }
----------------
dexonsmith wrote:
> The logic for `isLoadedOffset()` suggests that it could maybe be subsumed with "location past the end"?
I don't think so - we don't want to adjust loaded offsets. Their invariant is that they grow from 2^31 downwards.

We do want to adjust local offsets past the last non-affecting file though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136624/new/

https://reviews.llvm.org/D136624



More information about the cfe-commits mailing list