[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 385730. jansvoboda11 added a comment. Make loading of (sub)module includes lazy Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112915/new/ https://reviews.llvm.org/D112915 Files: clang/include/clang/Lex/

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 385434. jansvoboda11 added a comment. Herald added a subscriber: mgrang. Fix deserialization, improve (sub)module state tracking Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112915/new/ https://reviews.ll

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-04 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 384791. jansvoboda11 added a comment. Call `getFileInfo` in `Preprocessor::EnterMainSourceFile`. This ensures deserialization of `HeaderFileInfo`, which seems to be necessary with modules-ts enabled. Repository: rG LLVM Github Monorepo CHANGES SINC

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-03 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. In D112915#3106472 , @jansvoboda11 wrote: > That's interesting. I think `HeaderFileInfo::isImport` should definitely be > tracked in the preprocessor, not in `HeaderFileInfo`. The fact that the > header was `#import`ed is not a

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-03 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. Just a few comments on implementation details. The only high-level piece to call out is that I wonder if `NumIncludes` could/should be simplified (semantically) to a Boolean in a prep commit. Comment at: clang/include/clang/Lex/Preprocessor.h:720-7

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D112915#3104873 , @vsapsai wrote: > There can be other reasons to keep `IncludeMap` out of `SubmoduleState` but > I'm not sure the local submodule visibility is the right reason. I might be > reading the code incorrectly

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 384484. jansvoboda11 added a comment. Avoid copying data between submodules Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112915/new/ https://reviews.llvm.org/D112915 Files: clang/include/clang/Lex/Head

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-02 Thread Volodymyr Sapsai via Phabricator via cfe-commits
vsapsai added a comment. I'm not going to cover the entire change, some parts I need to consider more carefully. There can be other reasons to keep `IncludeMap` out of `SubmoduleState` but I'm not sure the local submodule visibility is the right reason. I might be reading the code incorrectly

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-01 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. I'm interested in hearing some feedback whether the direction I'm taking here makes sense. There are a couple of TODOs (mostly on optimizing away unnecessary maps) and a few modules-ts tests are failing. @rsmith left a suggestion on D104344

[PATCH] D112915: WIP: [clang][modules] Granular tracking of includes

2021-11-01 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, vsapsai, rsmith. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When building a module consisting of submodules, the preprocessor keeps a