[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:

[PATCH] D113391: [Modules] Don't support clang module and c++20 module at the same time

2021-11-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/test/ClangScanDeps/Inputs/header-search-pruning/cdb.json:1 -[ - { -"directory": "DIR", -"command": "clang -E DIR/header-search-pruning.cpp -Ibegin -I1 -Ia -I3 -I4 -I5 -I6 -Ib -I8 -Iend DEFINES -fmodules

[PATCH] D113391: [Modules] Don't support clang module and c++20 module at the same time

2021-11-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/test/ClangScanDeps/Inputs/header-search-pruning/cdb.json:1 -[ - { -"directory": "DIR", -"command": "clang -E DIR/header-search-pruning.cpp -Ibegin -I1 -Ia -I3 -I4 -I5 -I6 -Ib -I8 -Iend DEFINES -fmodules

[PATCH] D113391: [Modules] Don't support clang module and c++20 module at the same time

2021-11-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/test/ClangScanDeps/Inputs/header-search-pruning/cdb.json:3 + "directory" : "DIR", + "command" : "clang -E DIR/header-search-pruning.cpp -Ibegin -I1 -Ia -I3 -I4 -I5 -I6 -Ib -I8 -Iend DEFINES -fmodules

[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

[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

[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:

[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/

[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

[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] D112088: [clang][deps] Keep #pragma push_macro, pop_macro and include_alias when minimizing source code.

2021-11-01 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/D112088/new/ https://reviews.llvm.org/D112088

[PATCH] D112923: [clang][deps] Reset some benign codegen options

2021-11-01 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some command-line codegen arguments are likely to differ between identical modules

[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:

[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:

[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:

[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

[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:

[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:

[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

[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

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked 3 inline comments as done. jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:50-51 + + /// Minimize contents of the file. + static void minimize(CachedFileSystemEntry );

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 393162. jansvoboda11 added a comment. Prevent potential data races by wrapping access to `Entry.getPPSkippedRangeMapping()` in `if (Entry.isMinimized())`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D115346#3181198 , @dexonsmith wrote: > This looks really nice. > > One problem is that it's subtle to confirm whether it's thread-safe. The > local cache access parts of CachedFileSystemEntry lock-free, but the >

[PATCH] D115332: [clang][deps] Use lock_guard instead of unique_lock

2021-12-09 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG58822837cd53: [clang][deps] Use lock_guard instead of unique_lock (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115332/new/

[PATCH] D115331: [llvm] Add null-termination capability to SmallVectorMemoryBuffer

2021-12-09 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 rGd0262c2394f4: [llvm] Add null-termination capability to SmallVectorMemoryBuffer (authored by jansvoboda11). Changed prior to commit:

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

2021-12-09 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG13a351e862ba: [clang][deps] Use MemoryBuffer in minimizing FS (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115043/new/

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-09 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 393159. jansvoboda11 added a comment. Introduce `EntryRef`, handle delayed minimization. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115346/new/ https://reviews.llvm.org/D115346 Files:

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

2021-12-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 392717. jansvoboda11 added a comment. Rebase on top of D115331 . Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115043/new/ https://reviews.llvm.org/D115043 Files:

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

2021-12-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked 2 inline comments as done. jansvoboda11 added inline comments. Comment at: llvm/include/llvm/Support/SmallVectorMemoryBuffer.h:54 + /// and invoke the given function right after the move. + SmallVectorMemoryBuffer( + SmallVectorImpl &,

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

2021-12-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 392745. jansvoboda11 marked an inline comment as done. jansvoboda11 added a comment. Update comment Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115043/new/ https://reviews.llvm.org/D115043 Files:

[PATCH] D112923: [clang][deps] Reset some benign codegen options

2021-12-08 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG5b6c08379b43: [clang][deps] Reset some benign codegen options (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112923/new/

[PATCH] D115331: [llvm] Add null-termination capability to SmallVectorMemoryBuffer

2021-12-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added subscribers: ormris, steven_wu, hiraditya. Herald added a reviewer: alexander-shaposhnikov. Herald added a reviewer: shafik. Herald added a reviewer: rupprecht. Herald added a reviewer:

[PATCH] D115332: [clang][deps] Use lock_guard instead of unique_lock

2021-12-08 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 a project: clang. Herald added a subscriber: cfe-commits. This patch changes uses of `std::unique_lock` to `std::lock_guard`. The

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, arphaman. Herald added a subscriber: hiraditya. jansvoboda11 requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. The minimizing and

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

2021-12-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:49 - /// running out of file descriptors. + /// mismatching size of the file. static CachedFileSystemEntry createFileEntry(StringRef Filename,

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-08 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 392761. jansvoboda11 added a comment. Update documentation Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115346/new/ https://reviews.llvm.org/D115346 Files:

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

2021-12-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. You're right, I measured only this patch, not per-submodule include tracking (D112915 ). With per-submodule tracking, the results look like this:

[PATCH] D115628: [clang][deps] Remove hard-coded resource directory from tests

2021-12-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, arphaman, mgorny. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Dependency scanner test for resource directory deduction doesn't

[PATCH] D108366: [clang][deps] Make resource directory deduction configurable

2021-12-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D108366#3188028 , @mgorny wrote: > This change causes a test regression on Gentoo (where > `CLANG_RESOURCE_DIR="../../../../lib/clang/${clang_version}"`): Thanks for reporting this. Should be fixed in D115628

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-10 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked 3 inline comments as done. jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:106-108 + std::unique_ptr OriginalContents; + std::unique_ptr MinimizedContents;

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

2021-12-10 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D112915#3141417 , @vsapsai wrote: > I think AST format for `IncludedFiles` was discussed here, so I'll continue > here though the bulk of implementation is in D114095 > now. Have you

[PATCH] D115628: [clang][deps] Remove hard-coded resource directory from tests

2021-12-14 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 rG47eec789ed9c: [clang][deps] Remove hard-coded resource directory from tests (authored by jansvoboda11). Repository: rG LLVM Github Monorepo

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Committed with the writes swapped and explanation in the comment. Thanks for the review! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115346/new/ https://reviews.llvm.org/D115346

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-16 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. jansvoboda11 marked an inline comment as done. Closed by commit rGf66803457ec7: [clang][deps] Squash caches for original and minimized files (authored by

[PATCH] D114966: [clang][deps] Split stat and file content caches

2021-12-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:200-210 + // FIXME: This read can fail. + // In that case, we should probably update `CacheEntry::MaybeStat`. + // However, that is

[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 &, I'm not happy with introducing new (hacky)

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 394585. jansvoboda11 added a comment. Rebase, use `std::atomic` to prevent data races. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115346/new/ https://reviews.llvm.org/D115346 Files:

[PATCH] D115346: [clang][deps] Squash caches for original and minimized files

2021-12-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked 3 inline comments as done. jansvoboda11 added inline comments. Comment at: clang/include/clang/Tooling/DependencyScanning/DependencyScanningFilesystem.h:106-108 + std::unique_ptr OriginalContents; + std::unique_ptr MinimizedContents;

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

2021-12-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 394600. jansvoboda11 marked 5 inline comments as done. jansvoboda11 added a comment. Rebase on top of D115346 , apply suggested changes to the cache structure and allocation strategy. Repository: rG LLVM Github

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

2021-12-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked 3 inline comments as done. jansvoboda11 added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:25-31 llvm::ErrorOr Stat = (*MaybeFile)->status(); if (!Stat) return Stat.getError();

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

2021-12-10 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D114095#3160103 , @vsapsai wrote: > I've mentioned it in D112915 as we've > discussed the stored data format there. But my concern was that bitvector > packing might be not the most

[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] D106146: [clang][deps] Separate filesystem caches for minimized and original files

2021-07-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 rGbc1a2979fc70: [clang][deps] Separate filesystem caches for minimized and original files (authored by jansvoboda11). Changed prior to commit:

[PATCH] D106064: [clang][deps] Normalize ignored filenames in minimizing file system

2021-07-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 rG63fd109d3aa6: [clang][deps] Normalize ignored filenames in minimizing file system (authored by jansvoboda11). Changed prior to commit:

[PATCH] D104536: [clang][deps] Avoid minimizing PCH input files

2021-07-20 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D104536#288 , @thakis wrote: > Looks like this breaks tests on Windows: > http://45.33.8.238/win/42264/step_7.txt > > Please take a look, and revert for now if it takes a while to fix. Thanks, that was a bad rebase.

[PATCH] D104536: [clang][deps] Avoid minimizing PCH input files

2021-07-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 rGe564fd93ab85: [clang][deps] Avoid minimizing PCH input files (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D106064: [clang][deps] Normalize paths in minimizing file system

2021-07-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:161-162 +const StringRef RawFilename) { + llvm::SmallString<256> Filename; + llvm::sys::path::native(RawFilename, Filename); + dexonsmith

[PATCH] D106064: [clang][deps] Normalize paths in minimizing file system

2021-07-19 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. With the call to `llvm::sys::path::native` scoped only to `IgnoredFiles`, would this patch LGTY? Comment at: clang/lib/Tooling/DependencyScanning/DependencyScanningFilesystem.cpp:161-162 +const StringRef RawFilename) { +

[PATCH] D106100: [clang-scan-deps] ignore top-level module dependencies that aren't actually imported

2021-07-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! CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106100/new/ https://reviews.llvm.org/D106100 ___ cfe-commits mailing list

[PATCH] D104536: [clang][deps] Avoid minimizing PCH input files

2021-07-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 359299. jansvoboda11 added a comment. Rebase on top of D106146 . CHANGES SINCE LAST ACTION https://reviews.llvm.org/D104536/new/ https://reviews.llvm.org/D104536 Files:

[PATCH] D106146: [clang][deps] Separate filesystem caches for minimized and original files

2021-07-16 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, arphaman. jansvoboda11 added a project: clang. Herald added a subscriber: mgorny. jansvoboda11 requested review of this revision. This patch separates the local and global caches of

[PATCH] D106788: [clang][driver] NFC: Expose InputInfo in Job instead of plain filenames

2021-07-27 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 rGb76c7c6faf06: [clang][driver] NFC: Expose InputInfo in Job instead of plain filenames (authored by jansvoboda11). Repository: rG LLVM Github

[PATCH] D106787: [clang][driver] NFC: Move InputInfo.h from lib to include

2021-07-27 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 rG60426f33b1d4: [clang][driver] NFC: Move InputInfo.h from lib to include (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D105695: [clang][tooling] Accept Clang invocations with multiple jobs

2021-07-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D105695#2905028 , @dexonsmith wrote: > Seeing the `-fembed-bitcode` case made me think of `-save-temps`. I think > this will work since `-x cpp-output` should return false for `isSrcFile()`... > but probably worth

[PATCH] D106862: [clang][modules] Avoid creating partial FullSourceLoc for explicit modules imports

2021-07-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, arphaman, christof. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Some parts of the codebase use `FullSourceLoc` -- a wrapper around

[PATCH] D105695: [clang][tooling] Accept Clang invocations with multiple jobs

2021-07-27 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 rG11ee699b3c81: [clang][tooling] Accept Clang invocations with multiple jobs (authored by jansvoboda11). Changed prior to commit:

[PATCH] D106864: [clang][cli] Expose -fno-cxx-modules in cc1

2021-07-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith, arphaman. Herald added a subscriber: dang. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. For some use-cases, it might be useful to be

[PATCH] D106864: [clang][cli] Expose -fno-cxx-modules in cc1

2021-07-27 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/test/Modules/cxx20-disable.cpp:2 +// RUN: rm -rf %t && mkdir %t +// RUN: not %clang_cc1 -x objective-c++ -std=c++20 -fno-cxx-modules -I %t %s + I'm not sure how to best test this. Checking the error messages

[PATCH] D105695: [clang][tooling] Accept Clang invocations with multiple jobs

2021-07-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 requested review of this revision. jansvoboda11 added a comment. Requesting re-review, since there are two changes: - `-cc1` commands that don't read a source file are ignored (e.g. jobs generated by `-fembed-bitcode`), - test now have `-target arm64-apple-macosx11.0.0` to ensure

[PATCH] D102488: [clang][deps] Prune unused header search paths

2021-07-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 planned changes to this revision. jansvoboda11 added a comment. After speaking with @dexonsmith, the laziness is probably not necessary when dealing with a short bit vector. I'll also explore using `llvm::BitVector` instead of `std::vector`. Repository: rG LLVM Github Monorepo

[PATCH] D106787: [clang][driver] NFC: Move InputInfo.h from lib to include

2021-07-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: Bigcheese, dexonsmith. Herald added subscribers: frasercrmck, kerbowa, luismarques, apazos, sameer.abuasal, usaxena95, s.egerton, Jim, kadircet, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng,

[PATCH] D106788: [clang][driver] NFC: Expose InputInfo in Job instead of plain filenames

2021-07-26 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 a project: clang. Herald added a subscriber: cfe-commits. This patch exposes `InputInfo` in `Job` instead of plain filenames. This is

[PATCH] D105695: [clang][tooling] Accept Clang invocations with multiple jobs

2021-07-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 361630. jansvoboda11 added a comment. Formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105695/new/ https://reviews.llvm.org/D105695 Files: clang/include/clang/Tooling/Tooling.h

[PATCH] D105695: [clang][tooling] Accept Clang invocations with multiple jobs

2021-07-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 361626. jansvoboda11 added a comment. Also ignore cc1 jobs that have inputs that are not source files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105695/new/ https://reviews.llvm.org/D105695 Files:

[PATCH] D105881: [flang][driver] Switch to `BoolFOption` for boolean options

2021-07-26 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Sorry, I'm not sure I follow. In D105881#2890134 , @awarzynski wrote: > Apologies, it has taken me a bit longer to get back to this. @jansvoboda11 , > now I'm realising the key disadvantage of using

[PATCH] D116750: [clang][lex] Keep search directory indices up-to-date

2022-01-07 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D116750#3227143 , @ahoppen wrote: > Adjusting the indices seem pretty fragile to me. Any reason why you wanted to > stick with indices as keys instead of switching to something else like I > suggested here

[PATCH] D116750: [clang][lex] Keep search directory indices up-to-date

2022-01-07 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 398135. jansvoboda11 added a comment. Use pointers instead of indices to identify `DirectoryLookup` objects. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116750/new/ https://reviews.llvm.org/D116750

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

2022-01-07 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 398146. jansvoboda11 added a comment. Rebase. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D113676/new/ https://reviews.llvm.org/D113676 Files: clang/include/clang/Lex/HeaderSearch.h

[PATCH] D116272: [Clang][Sema] Avoid crashing for va_arg expressions with bool argument

2022-01-07 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 rGc033f0d9b1c7: [Clang][Sema] Avoid crashing for va_arg expressions with bool argument (authored by egorzhdan, committed by jansvoboda11).

[PATCH] D116751: [clang][lex] NFC: Extract module creation into function

2022-01-07 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D116751#3227142 , @ahoppen wrote: > I suppose the idea is that all `Module` creations should go through > `makeModule`, right? In that case I think we should either > > - make the `Module` constructor private and

[PATCH] D116751: [clang][lex] NFC: Extract module creation into function

2022-01-07 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D116751#3227243 , @ahoppen wrote: > I just want to make sure that we don’t accidentally introduce a new > instantiation of a `Module` that doesn’t go through `makeModule` in the > future. I understand that, but I'm not

[PATCH] D116750: [clang][lex] Keep search directory indices up-to-date

2022-01-07 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Yeah, in some cases, we'd be just replacing the index-based indirection with address-based indirection (e.g. when working with `SearchDirToHSEntry`). However, most existing `HeaderSearch` algorithms already work with the index and use that to get the

[PATCH] D116659: [llvm][clang][vfs] NFC: Extract directory iteration boilerplate into macro

2022-01-12 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 399275. jansvoboda11 added a comment. Herald added a subscriber: hiraditya. Replace macro with range of new iterators Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116659/new/

[PATCH] D116659: [llvm][clang][vfs] NFC: Simplify directory iteration

2022-01-12 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. I agree that introducing new iterator and implementing `iterator_range<...> FileSystem::dir_range()` is better solution than a macro. I'm not sure the `dir_range` function needs to take an `std::error_code` out-param though. The error code is only used to stop the

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D116750#3240363 , @carlosgalvezp wrote: > Hi @jansvoboda11 ! > > I believe this commit is the root cause of this issue: > https://github.com/llvm/llvm-project/issues/53161 > > Believe it or not, I was (un)lucky enough

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-13 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. Thank you! I'm pretty sure it's this commit that causes the failure. I now see that `HeaderSearch::LookupFile` callers perform pointer arithmetics on the out-parameter `const DirectoryLookup *`. They rely on the fact that all `DirectoryLookup` instances are in

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-14 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 reopened this revision. jansvoboda11 added a comment. This revision is now accepted and ready to land. I'll need to figure out how to efficiently replace the pointer arithmetic performed by `Preprocessor::LookupFile`, or go back to my first solution: keeping `std::vector` and

[PATCH] D117119: [clang] Remove uses of `std::vector`

2022-01-12 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: dexonsmith. Herald added subscribers: carlosgalvezp, usaxena95, kadircet, arphaman. jansvoboda11 requested review of this revision. Herald added projects: clang, clang-tools-extra. Herald added a subscriber: cfe-commits. LLVM

[PATCH] D117024: [clang] Move `ApplyHeaderSearchOptions` from Frontend to Lex

2022-01-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 398957. jansvoboda11 added a comment. Re-run clang-format Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D117024/new/ https://reviews.llvm.org/D117024 Files: clang/include/clang/Frontend/Utils.h

[PATCH] D117024: [clang] Move `ApplyHeaderSearchOptions` from Frontend to Lex

2022-01-11 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 rGf77d115cc136: [clang] Move `ApplyHeaderSearchOptions` from Frontend to Lex (authored by jansvoboda11). Repository: rG LLVM Github Monorepo

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-11 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. jansvoboda11 marked an inline comment as done. Closed by commit rG8503c688d555: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date (authored by

[PATCH] D117024: [clang] Move `ApplyHeaderSearchOptions` from Frontend to Lex

2022-01-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added a reviewer: thakis. Herald added a subscriber: mgorny. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. In D116750 , the `clangFrontend`

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 marked 4 inline comments as done. jansvoboda11 added a comment. Thanks for the feedback! Comment at: clang/unittests/Lex/HeaderSearchTest.cpp:276 +std::vector ExpectedSearchDirUsageAfterM2{false, true, false}; +EXPECT_EQ(Search.getSearchDirUsage(),

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added a comment. In D116750#3234261 , @thakis wrote: > 1. `which is stable thanks to the bump-ptr-allocation strategy.` I don't > understand this. In each slab, that's true, but why is it true between > objects allocated in different

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-11 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 updated this revision to Diff 398917. jansvoboda11 added a comment. Update documentation, inline variables in test Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D116750/new/ https://reviews.llvm.org/D116750 Files:

[PATCH] D116750: [clang][lex] Keep references to `DirectoryLookup` objects up-to-date

2022-01-10 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/include/clang/Lex/HeaderSearch.h:179 /// directory is suppressed. - std::vector SearchDirs; - /// Whether the DirectoryLookup at the corresponding index in SearchDirs has - /// been successfully used to lookup a file. -

[PATCH] D118890: [clang][deps] Disable global module index

2022-02-15 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 rGc6f8704053ba: [clang][deps] Disable global module index (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D119721: [clang][lex] Use `ConstSearchDirIterator` in lookup cache

2022-02-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 added inline comments. Comment at: clang/lib/Lex/HeaderSearch.cpp:710 + CacheLookup.HitIt = HitIt; + noteLookupUsage(&*HitIt - &*search_dir_begin(), Loc); } jansvoboda11 wrote: > ahoppen wrote: > > I haven’t looked into this in total details but

[PATCH] D119825: [clang][lex] Introduce `SearchDirIndex` to usage tracking code

2022-02-15 Thread Jan Svoboda via Phabricator via cfe-commits
jansvoboda11 created this revision. jansvoboda11 added reviewers: ahoppen, Bigcheese, dexonsmith. Herald added a subscriber: arphaman. jansvoboda11 requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. This patch introduces new `SearchDirIndex`

[PATCH] D119708: [clang][lex] Remove `PPCallbacks::FileNotFound()`

2022-02-15 Thread Jan Svoboda via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG7a124f4859d5: [clang][lex] Remove `PPCallbacks::FileNotFound()` (authored by jansvoboda11). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D119708/new/

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