[PATCH] D114093: [clang][lex] Refactor check for the first file include

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. jansvoboda11 marked 2 inline comments as done. Closed by commit rG197576c40986: [clang][lex] Refactor check for the first file include (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org/D114093?

[PATCH] D113676: WIP: [clang][lex] Fix search path usage remark with modules

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added reviewers: Bigcheese, dexonsmith, vsapsai. jansvoboda11 added a comment. Still a WIP, but might be get some feedback on the direction. I'm not 100% sure when to consider a search path that triggered the creation of `Module` as used. Doing so on `Module` creation is not useful,

[PATCH] D114095: [clang][lex][modules] Move number of includes from HeaderFileInfo to Preprocessor

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 388231. jansvoboda11 added a comment. Squash with D114096 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114095/new/ https://reviews.llvm.org/D114095 Files: clang/incl

[PATCH] D114096: [clang][lex][modules] Stop tracking number of includes

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 abandoned this revision. jansvoboda11 added a comment. Squashed into D114095 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114096/new/ https://reviews.llvm.org/D114096 __

[PATCH] D112915: [clang][modules] Track included files per submodule

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 388242. jansvoboda11 added a comment. Rebase, add type alias, improve map allocation in `ASTReader`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112915/new/ https://reviews.llvm.org/D112915 Files: cla

[PATCH] D112915: [clang][modules] Track included files per submodule

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 388251. jansvoboda11 added a comment. Apply part of Volodymyr's cleanup. 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/Externa

[PATCH] D112915: [clang][modules] Track included files per submodule

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 388253. jansvoboda11 added a comment. Add missed newline. 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/ExternalPreprocessorSo

[PATCH] D114173: [clang][modules] Apply local submodule visibility to includes

2021-11-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, vsapsai, rsmith, bruno. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. With this patch, the preprocessor tracks the set of included files

[PATCH] D114095: [clang][lex] Include tracking: simplify and move to preprocessor

2021-11-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 388407. jansvoboda11 added a comment. Add new record into block info. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114095/new/ https://reviews.llvm.org/D114095 Files: clang/include/clang/Lex/HeaderSear

[PATCH] D114095: [clang][lex] Include tracking: simplify and move to preprocessor

2021-11-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked an inline comment as done. jansvoboda11 added inline comments. Comment at: clang/lib/Lex/Preprocessor.cpp:552 +if (const FileEntry *FE = SourceMgr.getFileEntryForID(MainFileID)) { + HeaderInfo.getFileInfo(FE); + markIncluded(FE);

[PATCH] D112915: [clang][modules] Track included files per submodule

2021-11-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 388409. jansvoboda11 added a comment. Rebase 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/ExternalPreprocessorSource.h clan

[PATCH] D114173: [clang][modules] Apply local submodule visibility to includes

2021-11-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 388410. jansvoboda11 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114173/new/ https://reviews.llvm.org/D114173 Files: clang/include/clang/Lex/Preprocessor.h clang/lib/Lex/Prep

[PATCH] D114206: [Clang][ScanDeps] Use the virtual path for module maps

2021-11-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM provided the Windows crash gets resolved. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114206/new/ https://reviews.llvm.org/D1

[PATCH] D114095: [clang][lex] Include tracking: simplify and move to preprocessor

2021-11-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Serialization/ASTWriter.cpp:873 RECORD(PP_TOKEN); + RECORD(PP_INCLUDED_FILES); vsapsai wrote: > I believe `PP_INCLUDED_FILES` is located in `AST_BLOCK`. Yes, you write it in > `ASTWriter::WritePrepr

[PATCH] D114095: [clang][lex] Include tracking: simplify and move to preprocessor

2021-11-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 388814. jansvoboda11 added a comment. Move record ID from `PREPROCESSOR_BLOCK` to `AST_BLOCK`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114095/new/ https://reviews.llvm.org/D114095 Files: clang/inc

[PATCH] D114966: [clang][deps] Split filesystem caches

2021-12-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. Herald added subscribers: dexonsmith, hiraditya. jansvoboda11 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D114966 Fil

[PATCH] D114968: [clang][deps] Avoid reading file for stat calls

2021-12-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends on D114966 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D114968 Files: clan

[PATCH] D114971: [clang][deps] Handle symlinks in minimizing FS

2021-12-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Depends on D114968 . Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D114971 Files: clan

[PATCH] D114966: [clang][deps] Split filesystem caches

2021-12-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 391369. jansvoboda11 added a comment. Add unit test, IWYU. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114966/new/ https://reviews.llvm.org/D114966 Files: clang/include/clang/Tooling/DependencyScannin

[PATCH] D114968: [clang][deps] Avoid reading file for stat calls

2021-12-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 391370. jansvoboda11 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114968/new/ https://reviews.llvm.org/D114968 Files: clang/include/clang/Tooling/DependencyScanning/DependencySc

[PATCH] D114971: [clang][deps] Handle symlinks in minimizing FS

2021-12-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 391371. jansvoboda11 added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114971/new/ https://reviews.llvm.org/D114971 Files: clang/include/clang/Tooling/DependencyScanning/DependencySc

[PATCH] D114968: [clang][deps] Avoid reading file for stat calls

2021-12-02 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Assuming the filesystem doesn't change during dependency scanning, this change keeps the consistency between stat/read calls for minimized files. Thinking about it some more though, the original reason for reading files eagerly (even for stat calls) was most likely

[PATCH] D114968: [clang][deps] Avoid reading file for stat calls

2021-12-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 abandoned this revision. jansvoboda11 added a comment. Thanks for confirming! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D114968/new/ https://reviews.llvm.org/D114968 ___ cfe-commits maili

[PATCH] D115043: [clang][deps] Use MemoryBuffer in minimizing FS

2021-12-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, arphaman. jansvoboda11 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. This patch avoids unnecessarily copying `mmap`-ed memory into

[PATCH] D115043: [clang][deps] Use MemoryBuffer in minimizing FS

2021-12-03 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:54 + /// and invoke the given function right after the move. + SmallVectorMemoryBuffer( + SmallVectorImpl &&SV, I'm not happy with introducing new (hacky) c

[PATCH] D136124: [clang][deps] Remove unintentional `move`

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningWorker.cpp:400 +auto OverlayFS = +llvm::makeIntrusiveRefCnt(BaseFS); auto InMemoryFS = DavidSpickett wrote: > Is this equivalent? > ``` > auto

[PATCH] D136124: [clang][deps] Remove unintentional `move`

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 468555. jansvoboda11 added a comment. Use both `-j 1` and `-j 4` in tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136124/new/ https://reviews.llvm.org/D136124 Files: clang/lib/Tooling/DependencyS

[PATCH] D136124: [clang][deps] Remove unintentional `move`

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/test/ClangScanDeps/modules-full-by-mod-name.cpp:18 // -// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 4 -format experimental-full \ +// RUN: clang-scan-deps -compilation-database %t_clangcl.cdb -j 1 -format

[PATCH] D135657: add time traces for AST serialization

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. This looks good to me in principle. It would be nice to have a simple test that shows what kind of output we get. Can you add that? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135657/new/ https://reviews.llvm.org/D1

[PATCH] D135657: add time traces for AST serialization

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. Thanks, LGTM. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D135657/new/ https://reviews.llvm.org/D135657 __

[PATCH] D135634: [clang][modules] Serialize VFS overlay paths into PCMs

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D135634#3866353 , @benlangmuir wrote: > I think we should deduplicate the vfs overlays if the same ivfsoverlay is > specified in both the pcm and the command-line. My understanding is that `ASTUnit` never uses command-l

[PATCH] D135657: add time traces for AST serialization

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D135657#3865581 , @Trass3r wrote: > Thanks, could you also commit it? I don't have the rights. Sure. What name and email do you want me to associate with the commit? Repository: rG LLVM Github Monorepo CHANGES SINCE

[PATCH] D136124: [clang][deps] Remove unintentional `move`

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd239f3c627a3: [clang][deps] Remove unintentional `move` (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D136019: [clang][lex] Avoid `DirectoryLookup` copies

2022-10-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D136019#3860557 , @ributzka wrote: > We could invoke clang with the `-stats` option and compare the result against > the expected number of stat calls. The `-stats-file=` option only tells you how many times Clang reques

[PATCH] D106876: Remove non-affecting module maps from PCM files.

2022-10-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Herald added a project: All. Hi @ilyakuteev, this patch is causing some issues downstream. (See `clang/test/Modules/non-affecting-module-maps-source-locations.m` here .) I think they all boil down to the fact that a

[PATCH] D106876: Remove non-affecting module maps from PCM files.

2022-10-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Serialization/ASTWriter.cpp:183-184 +HS.getExistingFileInfo(File, /*WantExternal*/false); +if (!HFI || (HFI->isModuleHeader && !HFI->isCompilingModuleHeader)) + continue; + rsmith wrote: >

[PATCH] D106876: Remove non-affecting module maps from PCM files.

2022-10-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Serialization/ASTWriter.cpp:1549 +if (isModuleMap(File.getFileCharacteristic()) && +!isSystem(File.getFileCharacteristic()) && +!AffectingModuleMaps.empty() && Why do we never consider

[PATCH] D135657: add time traces for AST serialization

2022-10-19 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG12d007d4ba21: [clang][modules] Add time traces for AST serialization (authored by Trass3r, committed by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

[PATCH] D106876: Remove non-affecting module maps from PCM files.

2022-10-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. I agree that avoiding serializing non-affecting input files is the better approach. Your code is more or less what I had in mind, thanks for sketching it out! The number of ignored module maps is typically around 70 - 110 on macOS (when you allow system module maps

[PATCH] D136019: [clang][lex] Avoid `DirectoryLookup` copies

2022-10-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 469077. jansvoboda11 added a comment. Add regression test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136019/new/ https://reviews.llvm.org/D136019 Files: clang/lib/Lex/HeaderSearch.cpp clang/test/Mo

[PATCH] D136019: [clang][lex] Avoid `DirectoryLookup` copies

2022-10-20 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 469385. jansvoboda11 added a comment. Remove regression tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136019/new/ https://reviews.llvm.org/D136019 Files: clang/lib/Lex/HeaderSearch.cpp Index: c

[PATCH] D136019: [clang][lex] Avoid `DirectoryLookup` copies

2022-10-20 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGde9731b7033f: [clang][lex] Avoid `DirectoryLookup` copies (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

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

2022-10-24 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: dexonsmith, Bigcheese, vsapsai, ilyakuteev. Herald added subscribers: ributzka, mgrang. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commit

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

2022-10-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D136624#3880526 , @Bigcheese wrote: > This looks reasonable. Have you measured the performance impact of this > change? I have done comparison between this patch and https://github.com/apple/llvm-project/pull/5451 (that

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

2022-10-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. I tried optimizing this patch a bit. Instead of creating compact data structure and using binary search to find the preceding non-affecting file, I now store the adjustment information for each `FileID` in a vector. During deserialization, `FileID` is simply used a

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

2022-10-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 471152. jansvoboda11 added a comment. New version with flat vector + `FileID` indices; replacing the previous compact representation & binary search approach Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2022-10-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 471641. jansvoboda11 added a comment. Avoid looking up `FileID` for an offset. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D136624/new/ https://reviews.llvm.org/D136624 Files: clang/include/clang/Basic

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

2022-10-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. I tried implementing your suggestion (merging ranges of adjacent non-affecting files and avoiding `FileID` lookups), but the numbers from `-ftime-trace` are very noisy. I got more stable data by measuring clock cycles and instruction counts, but nothing conclusive

[PATCH] D131796: [clang][deps] Use a cc1 invocation in FullDependencies::getCommandLine()

2022-08-12 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. I like this direction, I've been wanting to do this for a long time. Since the scanner accepts driver invocations that can expand into multiple (`-cc1`, assembler, linker, ...) invocations, we'll need to update the `clang-scan-deps` output JSON format to accommodat

[PATCH] D131934: [clang][deps] Compute command-lines for dependencies immediately

2022-08-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM overall with some minor nitpicks. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:95 + const llvm::StringSet<> &Alr

[PATCH] D128981: [C++20][Modules] Implement include translation.

2022-08-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Hi @iains, upstream Clang crashes on the attached test case due to an assertion failure. Git bisect pointed me to this commit. Can you please take a look? Previously, the test would result in a warning of incomplete umbrella header. // RUN: rm -rf %t && mkdir %t

[PATCH] D132066: [clang][deps] Allow switching between lazily/eagerly loaded PCMs

2022-08-17 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, Bigcheese. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch introduces new option for `clang-scan-deps`: `-ea

[PATCH] D132066: [clang][deps] Allow switching between lazily/eagerly loaded PCMs

2022-08-18 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 453836. jansvoboda11 added a comment. Stop duplicating worker state, fix context hash computation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132066/new/ https://reviews.llvm.org/D132066 Files: clang

[PATCH] D128981: [C++20][Modules] Implement include translation.

2022-08-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Thank you! Yes, I think this would be a good candidate for backporting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128981/new/ https://reviews.llvm.org/D128981 ___ cfe-co

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:34 +/// \see FullDependencies::Commands. +class Command { +public: Have you considered using the `Job`/`Command` classes the driver uses? What

[PATCH] D132419: [clang] Pull some utility functions into CompilerInvocation NFC

2022-08-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGMT! Nice cleanup. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132419/new/ https://reviews.llvm.org/D132419

[PATCH] D132066: [clang][deps] Allow switching between lazily/eagerly loaded PCMs

2022-08-22 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGbe795ee16a7f: [clang][deps] Allow switching between lazily/eagerly loaded PCMs (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1320

[PATCH] D132430: [clang][modules] Track affecting modules

2022-08-22 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, Bigcheese. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. When compiling a module, its semantics and Clang's behavior

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-23 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningTool.h:34 +/// \see FullDependencies::Commands. +class Command { +public: benlangmuir wrote: > jansvoboda11 wrote: > > Have you considered using the

[PATCH] D132501: [clang][modules] Consider M affecting after mapping M.Private to M_Private

2022-08-23 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, benlangmuir. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Wwhen Clang encounters `@import M.Private` during implicit b

[PATCH] D132502: [clang][modules] Consider M affecting after mapping M.Private to M_Private

2022-08-23 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, benlangmuir. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Wwhen Clang encounters `@import M.Private` during implicit b

[PATCH] D132501: [clang][modules] Consider M affecting after mapping M.Private to M_Private

2022-08-23 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 abandoned this revision. jansvoboda11 added a comment. Arcanist created two revisions, removing this one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132501/new/ https://reviews.llvm.org/D132501 _

[PATCH] D132430: [clang][modules] Track affecting modules

2022-08-23 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp:311 +if (!MDC.isPrebuiltModule(M)) + DirectModularDeps.insert(M); + benlangmuir wrote: > If using eager loading, this will cause us to load the mo

[PATCH] D132430: [clang][modules] Track affecting modules

2022-08-23 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 454975. jansvoboda11 added a comment. Add `-fmodule-file=` assertions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132430/new/ https://reviews.llvm.org/D132430 Files: clang/include/clang/Basic/Module.h

[PATCH] D132430: [clang][modules] Track affecting modules

2022-08-23 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 454979. jansvoboda11 added a comment. Backslashes in tests on Windows Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132430/new/ https://reviews.llvm.org/D132430 Files: clang/include/clang/Basic/Module.h

[PATCH] D132430: [clang][modules] Track affecting modules

2022-08-24 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG002bfdd6b119: [clang][modules] Track affecting modules (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org/D132430?vs=45

[PATCH] D132502: [clang][modules] Consider M affecting after mapping M.Private to M_Private

2022-08-24 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/CompilerInstance.cpp:2017 // migrate off of Foo.Private syntax. -if (!Sub && PP->getLangOpts().ImplicitModules && Name == "Private" && -Module == Module->getTopLevelModule()) { +if (!Sub && Na

[PATCH] D132502: [clang][modules] Consider M affecting after mapping M.Private to M_Private

2022-08-24 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Frontend/CompilerInstance.cpp:2017 // migrate off of Foo.Private syntax. -if (!Sub && PP->getLangOpts().ImplicitModules && Name == "Private" && -Module == Module->getTopLevelModule()) { +if (!Sub && Na

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-24 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. I left a couple of smaller initial comments. I'd like to see this split into multiple patches. I can see some formatting changes, removal of `CompilerInvocation` from `ModuleDeps`, isolated changes to `Tooling`, etc. That'd make it much easier to review. ===

[PATCH] D132502: [clang][modules] Consider M affecting after mapping M.Private to M_Private

2022-08-24 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG94e64df5763b: [clang][modules] Consider M affecting after mapping M.Private to M_Private (authored by jansvoboda11). Changed prior to commit: http

[PATCH] D132615: [clang][tooling] Allow -cc1 arguments in ToolInvocation

2022-08-24 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM, thanks! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132615/new/ https://reviews.llvm.org/D132615 __

[PATCH] D132616: [clang][deps] Remove CompilerInvocation from ModuleDeps

2022-08-24 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D132616/new/ https://reviews.llvm.org/D132616 __

[PATCH] D132617: [clang][deps] Minor ModuleDepCollector refactorings NFC

2022-08-24 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 accepted this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. LGTM with a nit. Comment at: clang/lib/Tooling/DependencyScanning/ModuleDepCollector.cpp:277 +MDC.DirectPrebuiltModularDeps.insert( +std::make_pair(To

[PATCH] D132405: [clang][deps] Split translation units into individual -cc1 or other commands

2022-08-25 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningWorker.h:27 +namespace driver { +class Command; +} Not needed anymore, I assume. Comment at: clang/include/clang/Tooling/Dependen

[PATCH] D133988: [clang][deps] Make sure ScanInstance outlives collector

2022-09-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: benlangmuir. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The `ScanInstance` is a local variable in `DependencyScanningAction::

[PATCH] D133988: [clang][deps] Make sure ScanInstance outlives collector

2022-09-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Another option would be to store `ScanInstance` as member of `DependencyScanningAction`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133988/new/ https://reviews.llvm.org/D133988

[PATCH] D133988: [clang][deps] Make sure ScanInstance outlives collector

2022-09-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 460552. jansvoboda11 added a comment. Replace `std::shared_ptr` by `Optional` stored on `DependencyScanningAction`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133988/new/ https://reviews.llvm.org/D13398

[PATCH] D133988: [clang][deps] Make sure ScanInstance outlives collector

2022-09-16 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4e637fcb2550: [clang][deps] Make sure ScanInstance outlives collector (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D133988/new/

[PATCH] D134222: [clang][deps] Report module map describing compiled module

2022-09-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, Bigcheese. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch fixes compil

[PATCH] D134224: [clang][modules][deps] Report modulemaps describing excluded headers

2022-09-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, Bigcheese, rsmith. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Module map file

[PATCH] D134222: [clang][deps] Report module map describing compiled module

2022-09-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 461431. jansvoboda11 added a comment. Implement suggestions Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134222/new/ https://reviews.llvm.org/D134222 Files: clang/include/clang/Basic/LangOptions.h cl

[PATCH] D134224: [clang][modules][deps] Report modulemaps describing excluded headers

2022-09-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 461432. jansvoboda11 added a comment. Fix failing test by undoing some API changes Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134224/new/ https://reviews.llvm.org/D134224 Files: clang/include/clang/L

[PATCH] D134248: [clang][modules][deps] Preserve module map load order

2022-09-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, Bigcheese. Herald added subscribers: ributzka, arphaman. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In `ASTWriter`

[PATCH] D134222: [clang][deps] Report module map describing compiled module

2022-09-22 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9dc0b1674841: [clang][deps] Report module map describing compiled module (authored by jansvoboda11). Herald added subscribers: Sanitizers, Enna1. Herald added a project: Sanitizers. Changed prior to commi

[PATCH] D134224: [clang][modules][deps] Report modulemaps describing excluded headers

2022-09-22 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf35230ae0a69: [clang][modules][deps] Report modulemaps describing excluded headers (authored by jansvoboda11). Changed prior to commit: https://re

[PATCH] D134248: [clang][modules][deps] Preserve module map load order

2022-09-22 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG20fa87c7e87f: [clang][modules][deps] Preserve module map load order (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org/D134248?vs=461433&id=462271#toc Repository: rG LLVM G

[PATCH] D134653: [clang][modules] Over-align the `Module` class

2022-09-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: srj, mgorny, Bigcheese. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This makes `llvm::Point

[PATCH] D134653: [clang][modules] Over-align the `Module` class

2022-09-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a subscriber: ms178. jansvoboda11 added a comment. Pre-commit CI only runs on x64 Debian and x64 Windows. I don't have good way to reproduce the issue, so ideally the person who reported it (@ms178?) steps up. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D134653: [clang][modules] Over-align the `Module` class

2022-09-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 462965. jansvoboda11 added a comment. Document reason for `alignas`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134653/new/ https://reviews.llvm.org/D134653 Files: clang/include/clang/Basic/Module.h

[PATCH] D134653: [clang][modules] Over-align the `Module` class

2022-09-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked an inline comment as done. jansvoboda11 added a comment. In D134653#3815672 , @srj wrote: > FYI, adding this patch to my local build does allow me to *compile* properly > now. I haven't tested for correctness. Thanks for verifying th

[PATCH] D134653: [clang][modules] Over-align the `Module` class

2022-09-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D134653#3815703 , @srj wrote: > I opened a question at https://discourse.llvm.org/t/x86-32-bit-testing/65480 > on Friday but got no responses. Is there a better venue for asking the right > people? That's what I would d

[PATCH] D134653: [clang][modules] Over-align the `Module` class

2022-09-26 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG715bd12d2e1d: [clang][modules] Over-align the `Module` class (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D134224: [clang][modules][deps] Report modulemaps describing excluded headers

2022-09-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Fixed in D134653 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D134224/new/ https://reviews.llvm.org/D134224 ___ cfe-commits mailing list

[PATCH] D134222: [clang][deps] Report module map describing compiled module

2022-09-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D134222#3815793 , @w2yehia wrote: > @jansvoboda11 > FYI, this is breaking AIX buildbot: > https://lab.llvm.org/buildbot/#/builders/214/builds/3436/steps/6/logs/FAIL__Clang__modules-header-sharing_m Thanks for reporting t

[PATCH] D134837: [libclang] Split-out some data structures out of `Index.h`

2022-09-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: akyrtzi, benlangmuir. Herald added subscribers: ributzka, arphaman. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. The `Index.h` he

[PATCH] D134838: [clang][deps] NFC: Expose more flexible version of `Worker::computeDependencies()`

2022-09-28 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: benlangmuir, Bigcheese. Herald added a subscriber: ributzka. Herald added a project: All. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch adds new mem

[PATCH] D134837: [libclang] Split-out some data structures out of `Index.h`

2022-09-29 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG29e0435ac049: [libclang] Split-out parts of `Index.h` (authored by jansvoboda11). Changed prior to commit: https://reviews.llvm.org/D134837?vs=463

[PATCH] D134838: [clang][deps] NFC: Expose more flexible version of `Worker::computeDependencies()`

2022-09-29 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG13921262cae0: [clang][deps] NFC: Expose more flexible version of `Worker::computeDependencies… (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://review

[PATCH] D134923: [clang][deps] Canonicalize module map path

2022-09-29 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. IIUC this not only canonicalizes path to the main input file when compiling a PCM, but also `-fmodule-map-file=` arguments for dependencies, correct? Since that behavior is desirable, I think it would make sense to check for that in the test, WDYT? Repository:

[PATCH] D134923: [clang][deps] Canonicalize module map path

2022-09-29 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Lex/ModuleMap.cpp:1307 + // Do not canonicalize within the framework; the module map parser expects + // Modules/ not Versions/A/Modules. + if (llvm::sys::path::filename(Dir) == "Modules") { Is that bec

<    4   5   6   7   8   9   10   11   12   13   >