jansvoboda11 wrote:
I assume that @benlangmuir added the scanner unit-test to demonstrate the
current behavior instead of trying to make sure it's preserved. I think making
it so that the test passes (actually handles raw string literals) and updating
the FIXME in `DependencyDirectivesScanner.
@@ -2068,7 +2068,8 @@ bool Lexer::LexNumericConstant(Token &Result, const char
*CurPtr) {
}
// If we have a digit separator, continue.
- if (C == '\'' && (LangOpts.CPlusPlus14 || LangOpts.C23)) {
+ if (C == '\'' &&
+ (LangOpts.CPlusPlus14 || LangOpts.C23 || Parsing
https://github.com/jansvoboda11 approved this pull request.
LGTM, but I'd prefer to land the re-ordering in a separate commit.
https://github.com/llvm/llvm-project/pull/96939
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.or
jansvoboda11 wrote:
> My main concern with this approach is I'm not sure that after fixing the
> memory issue we don't have a remaining logic bug. Because we are still
> modifying `ModuleMap::Headers` during `ASTWriter::WriteHeaderSearch`
> iteration and that looks suspicious. Need to think ho
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/108056
>From 9b9d8f02e26839758c51c7e48c1ba43dc3c24146 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 10 Sep 2024 09:55:07 -0700
Subject: [PATCH 1/2] [clang][deps] Print tracing VFS data
---
.../Dependency
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/108056
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1894,6 +1894,18 @@ def fprofile_selected_function_group :
Visibility<[ClangOption, CC1Option]>, MetaVarName<"">,
HelpText<"Partition functions into N groups using -fprofile-function-groups
and select only functions in group i to be instrumented. The valid range is 0
to
https://github.com/jansvoboda11 approved this pull request.
https://github.com/llvm/llvm-project/pull/108189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 approved this pull request.
Thanks for the explanation! This LGTM, but I agree with the sentiment that I'd
be nice to have this as the default behavior. Any effort towards that would be
appreciated!
https://github.com/llvm/llvm-project/pull/88893
___
@@ -4772,6 +4772,23 @@ bool
ASTWriter::PreparePathForOutput(SmallVectorImpl &Path) {
Changed = true;
}
+ // If we are generating a normal PCH (EG. not a C++ module).
+ if (!WritingModule) {
+// Use the vfs overlay if it exists to translate paths.
+auto &FileSy
@@ -0,0 +1,26 @@
+// RUN: rm -rf %t
+// RUN: mkdir -p %t/From
+// RUN: mkdir -p %t/To
+// RUN: echo '#pragma once' > %t/From/B.h
jansvoboda11 wrote:
Could you rewrite the test using `split-file`? That is much easier to read.
https://github.com/llvm/llvm-project/
https://github.com/jansvoboda11 commented:
Instead of using VFS overlays to make the AST file relocatable, have you
considered making use of `adjustFilenameForRelocatableAST()` (i.e. storing
relative paths to the AST file) and then setting the CWD accordingly when
loading?
https://github.com/
jansvoboda11 wrote:
No objections on my part.
https://github.com/llvm/llvm-project/pull/108189
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2753,6 +2753,33 @@ void tools::addMachineOutlinerArgs(const Driver &D,
addArg(Twine("-enable-machine-outliner=never"));
}
}
+
+ auto *CodeGenDataGenArg =
+ Args.getLastArg(options::OPT_fcodegen_data_generate,
jansvoboda11 wrote:
Since `fc
jansvoboda11 wrote:
Can you explain why exactly is this necessary/beneficial? If the compilation
database got created with just the tool name, I'd expect the rest of the build
to be able to use just the tool name when the scanner spits it out again, no?
If this is about the scanner finding the
https://github.com/jansvoboda11 approved this pull request.
https://github.com/llvm/llvm-project/pull/108539
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2753,6 +2753,31 @@ void tools::addMachineOutlinerArgs(const Driver &D,
addArg(Twine("-enable-machine-outliner=never"));
}
}
+
+ auto *CodeGenDataGenArg =
+ Args.getLastArg(options::OPT_fcodegen_data_generate_EQ);
+ auto *CodeGenDataUseArg = Args.getLastAr
jansvoboda11 wrote:
The options handling part LGTM, but I'll let others review the actual semantics
of this PR.
https://github.com/llvm/llvm-project/pull/90304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mail
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/111734
>From c4c5b9cd372707a53cfe1948ab3881a8a64001a3 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 8 Oct 2024 16:21:40 -0700
Subject: [PATCH 1/2] [clang][deps] Serialize JSON without creating
intermediat
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/111734
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -450,58 +458,65 @@ class FullDeps {
ModuleIDs.push_back(M.first);
llvm::sort(ModuleIDs);
-using namespace llvm::json;
-
-Array OutModules;
-for (auto &&ModID : ModuleIDs) {
- auto &MD = Modules[ModID];
- Object O{{"name", MD.ID.ModuleName},
-
jansvoboda11 wrote:
The issue with the current state of things in Clang is that if you have N
instances waiting for a PCM file to be built, they all load the PCM file as
soon as the lock is released by the writer. They all find out that there's no
timestamp file and attempt to write it after t
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/112795
In `clang-scan-deps`, we're creating lots of `Module` instances. Allocating
them all in a bump-pointer allocator reduces the number of retired instructions
by 1-1.5% on my workload.
>From 7e00bbe74f71c55d
jansvoboda11 wrote:
> Have you checked the performance for incremental builds?
I haven't, since I believe this change doesn't affect incremental builds at all.
https://github.com/llvm/llvm-project/pull/112452
___
cfe-commits mailing list
cfe-commits@l
https://github.com/jansvoboda11 edited
https://github.com/llvm/llvm-project/pull/113389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/113389
With inferred modules, the dependency scanner takes care to replace the fake
"__inferred_module.map" path with the file that allowed the module to be
inferred. However, this only worked when such a module
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/112452
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/113391
This patch avoids eagerly populating the submodule index on `Module`
construction. The `StringMap` allocation shows up in my profiles of
`clang-scan-deps`, while the index is not necessary most of the time
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/113395
This patch shrinks the size of the `Module` class from 2112B to 1624B. I wasn't
able to get a good data on the actual impact on memory usage, but given my
`clang-scan-deps` workload at hand (with tens of t
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/112795
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/112452
>From 6550eecf945d5a8537242646ef17b49b49eff859 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 15 Oct 2024 16:29:37 -0700
Subject: [PATCH 1/2] [clang][modules] Timestamp PCM files when writing
Clang
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/113984
When reading a path from a bitstream blob, `ASTReader` performs up to three
allocations:
1. Conversion of the `StringRef` blob into `std::string` to conform to the
`ASTReader::ResolveImportedPath()` API t
Author: Jan Svoboda
Date: 2024-10-28T12:50:53-07:00
New Revision: 19131c7f36e047898ea954ee5a187ac62f2ab09b
URL:
https://github.com/llvm/llvm-project/commit/19131c7f36e047898ea954ee5a187ac62f2ab09b
DIFF:
https://github.com/llvm/llvm-project/commit/19131c7f36e047898ea954ee5a187ac62f2ab09b.diff
L
@@ -541,11 +541,14 @@ class ModuleMap {
///
/// \param IsExplicit Whether this is an explicit submodule.
///
- /// \returns The found or newly-created module, along with a boolean value
- /// that will be true if the module is newly-created.
- std::pair findOrCreateMod
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113395
>From 09246d11c8663c0b2b31317eddc297c1d29fcd60 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 22 Oct 2024 16:07:27 -0700
Subject: [PATCH 1/3] [clang][modules] Shrink the size of `Module::Headers`
Th
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113395
>From 09246d11c8663c0b2b31317eddc297c1d29fcd60 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 22 Oct 2024 16:07:27 -0700
Subject: [PATCH 1/4] [clang][modules] Shrink the size of `Module::Headers`
Th
@@ -271,8 +271,22 @@ class alignas(8) Module {
DirectoryEntryRef Entry;
};
- /// The headers that are part of this module.
- SmallVector Headers[5];
+private:
+ unsigned HeaderKindBeginIndex[6] = {};
jansvoboda11 wrote:
I used `NumHeaderKinds`, but e
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113984
>From 709cc1c8c41603c4d9eb637cb0453521029af201 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Mon, 28 Oct 2024 16:59:13 -0700
Subject: [PATCH 1/2] [clang][modules] Avoid allocations when reading blob
pat
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
@@ -472,7 +465,8 @@ class FullDeps {
JOS.attributeArray("command-line",
toJSONStrings(JOS, MD.getBuildArguments()));
JOS.attribute("context-hash", StringRef(MD.ID.ContextHash));
-JOS.attributeArray("file-deps",
@@ -34,8 +34,8 @@ module mod { header "mod.h" }
// CHECK:],
// CHECK-NEXT: "context-hash": "[[HASH_MOD:.*]]",
// CHECK-NEXT: "file-deps": [
-// CHECK-NEXT: "[[PREFIX]]/mod.h"
-// CHECK-NEXT: "[[PREFIX]]/module.modulemap"
+// CHECK-DAG:
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/114085
What the special case for `"__inferred_module.map"` was getting at is that in
general we cannot report overridden files as dependencies: neither the build
system nor Clang itself won't know what to do with
@@ -472,7 +465,8 @@ class FullDeps {
JOS.attributeArray("command-line",
toJSONStrings(JOS, MD.getBuildArguments()));
JOS.attribute("context-hash", StringRef(MD.ID.ContextHash));
-JOS.attributeArray("file-deps",
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/114079
The dependency scanner collects file dependencies of modules into a
`llvm::StringSet`. However, we don't need the deduplication it performs, since
that's already guaranteed by the PCM we read the paths fro
https://github.com/jansvoboda11 edited
https://github.com/llvm/llvm-project/pull/113984
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
@@ -1341,9 +1341,22 @@ class ASTReader
serialization::InputFile getInputFile(ModuleFile &F, unsigned ID,
bool Complain = true);
+ /// Buffer we use as temporary storage backing resolved paths.
+ SmallString<256> PathBuf;
jansvoboda11 wrote:
Ping.
https://github.com/llvm/llvm-project/pull/114457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/115065
The `FileManager` sharing between module-building `CompilerInstance`s was
disabled a while ago due to `FileEntry::getName()` being unreliable. Now that
we use `FileEntryRef::getNameAsRequested()` in places
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113984
>From 709cc1c8c41603c4d9eb637cb0453521029af201 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Mon, 28 Oct 2024 16:59:13 -0700
Subject: [PATCH 1/3] [clang][modules] Avoid allocations when reading blob
pat
@@ -1342,19 +1343,47 @@ class ASTReader
bool Complain = true);
/// Buffer we use as temporary storage backing resolved paths.
- SmallString<256> PathBuf;
+ std::optional> PathBuf{{}};
+
+ /// A RAII wrapper around \c StringRef that
jansvoboda11 wrote:
How about something like this?
```c++
auto FE = CI.getFileManager().getOptionalFileEntryRef("foo.h");
bool IsFooIncluded = FE &&
CI.getPreprocessor().getIncludedFiles().contains(*FE);
```
https://github.com/llvm/llvm-project/pull/74910
__
@@ -779,23 +795,16 @@ static StringRef
makeAbsoluteAndPreferred(CompilerInstance &CI, StringRef Path,
void ModuleDepCollector::addFileDep(StringRef Path) {
if (IsStdModuleP1689Format) {
// Within P1689 format, we don't want all the paths to be absolute path
-// since
jansvoboda11 wrote:
> Can this be tested?
Hmm, I'm not sure. The current tests for inferred module maps still pass. The
other ways how `SourceManager` ends up overwriting a file are:
* is by using the `-remap-file`, which is unsupported with modules (`ASTWriter`
intentionally asserts),
* using
@@ -779,23 +795,16 @@ static StringRef
makeAbsoluteAndPreferred(CompilerInstance &CI, StringRef Path,
void ModuleDepCollector::addFileDep(StringRef Path) {
if (IsStdModuleP1689Format) {
// Within P1689 format, we don't want all the paths to be absolute path
-// since
https://github.com/jansvoboda11 edited
https://github.com/llvm/llvm-project/pull/113984
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/86534
>From d49ef2de83b37156ab73c0028676d9b0425ef2ed Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Mon, 25 Mar 2024 10:15:33 -0700
Subject: [PATCH] [clang] Move VFS overlays from `HeaderSearchOptions` to
`File
@@ -263,17 +261,36 @@ class alignas(8) Module {
FileEntryRef Entry;
};
- /// Information about a directory name as found in the module map
- /// file.
+private:
+ static const int NumHeaderKinds = HK_Excluded + 1;
+ // The begin index for a HeaderKind also acts the e
@@ -3018,13 +3019,19 @@ void ASTWriter::WriteSubmodules(Module *WritingModule) {
SourceLocationEncoding::RawLocEncoding DefinitionLoc =
getRawSourceLocationEncoding(getAdjustedLocation(Mod->DefinitionLoc));
+ModuleMap &ModMap = PP->getHeaderSearchInfo().getModu
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/113389
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113391
>From c795bab6ec59676daaa3ef67077b9a738dd93839 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 22 Oct 2024 15:46:07 -0700
Subject: [PATCH 1/2] [clang][modules] Optimize construction and usage of the
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113389
>From efcd62d35fe296b2bd4fe5cdbec9ab96493a885f Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 22 Oct 2024 14:01:45 -0700
Subject: [PATCH 1/2] [clang][modules] Preserve the module map that allowed
in
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113391
>From c6ff124355209de31c86096eb2ede14d598aa5cd Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 22 Oct 2024 15:46:07 -0700
Subject: [PATCH 1/2] [clang][modules] Optimize construction and usage of the
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/113391
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113726
>From 58056a40734ee2a64dca37f7669f77f2447f492c Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Fri, 25 Oct 2024 11:42:58 -0700
Subject: [PATCH 1/2] [clang][deps] Improve timing output
This patch adds the
@@ -34,6 +34,7 @@ def deprecated_driver_command :
F<"deprecated-driver-command", "use a single dri
defm resource_dir_recipe : Eq<"resource-dir-recipe", "How to produce missing
'-resource-dir' argument">;
def print_timing : F<"print-timing", "Print timing information">;
+def
@@ -541,11 +541,14 @@ class ModuleMap {
///
/// \param IsExplicit Whether this is an explicit submodule.
///
- /// \returns The found or newly-created module, along with a boolean value
- /// that will be true if the module is newly-created.
- std::pair findOrCreateMod
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/113726
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 edited
https://github.com/llvm/llvm-project/pull/113726
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/114457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/115239
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/115237
>From 24f60890a4a1cef2c9387040fce6d0864fcb01f4 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Wed, 6 Nov 2024 11:18:09 -0800
Subject: [PATCH 1/3] [clang][serialization] Make `ASTWriter` accept
`Preproces
@@ -4858,14 +4860,21 @@ time_t ASTWriter::getTimestampForOutput(const FileEntry
*E) const {
return IncludeTimestamps ? E->getModificationTime() : 0;
}
-ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile,
- Module *Wr
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/115237
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -661,8 +661,8 @@ class ASTWriter : public ASTDeserializationListener,
/// Write a precompiled header for the given semantic analysis.
///
- /// \param SemaRef a reference to the semantic analysis object that processed
- /// the AST to be written into the precompiled h
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/115239
>From 136e484907d24f1ba0efc4f658fabcdb95fa8498 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Wed, 6 Nov 2024 14:16:51 -0800
Subject: [PATCH 1/2] [clang][deps] Only write preprocessor info into PCMs
---
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/116095
This PR changes a part of the PCM format to store string-like things in the
blob attached to a record instead of VBR6-encoding them into the record itself.
Applied to the `IMPORTS` section (which is very h
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/114330
None
>From c11ea47908e93fedf83021377f904d296802e627 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Wed, 30 Oct 2024 16:52:42 -0700
Subject: [PATCH] [clang][modules] De-duplicate some logic in
`HeaderFil
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113984
>From c11ea47908e93fedf83021377f904d296802e627 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Wed, 30 Oct 2024 16:52:42 -0700
Subject: [PATCH 1/6] [clang][modules] De-duplicate some logic in
`HeaderFileI
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/114330
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/113984
>From c11ea47908e93fedf83021377f904d296802e627 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Wed, 30 Oct 2024 16:52:42 -0700
Subject: [PATCH 1/6] [clang][modules] De-duplicate some logic in
`HeaderFileI
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/113984
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/114459
This PR removes the `-index-header-map` functionality from Clang. AFAIK this
was only used internally at Apple and is now dead code. The main motivation
behind this change is to enable the removal of `Head
@@ -2045,21 +2041,7 @@ namespace {
LE.write(
Writer.getIdentifierRef(Data.HFI.LazyControllingMacro.getPtr()));
- unsigned Offset = 0;
- if (!Data.HFI.Framework.empty()) {
-// If this header refers into a framework, save the framework name.
@@ -21,6 +21,16 @@ using namespace clang;
using namespace tooling;
using namespace dependencies;
+void ModuleDeps::forEachFileDep(llvm::function_ref Cb) const {
+ SmallString<0> PathBuf;
+ PathBuf.reserve(256);
jansvoboda11 wrote:
Curious what people think
jansvoboda11 wrote:
Ok, abandoning in favor of #114457.
https://github.com/llvm/llvm-project/pull/114079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/114079
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -779,23 +795,16 @@ static StringRef
makeAbsoluteAndPreferred(CompilerInstance &CI, StringRef Path,
void ModuleDepCollector::addFileDep(StringRef Path) {
if (IsStdModuleP1689Format) {
// Within P1689 format, we don't want all the paths to be absolute path
-// since
https://github.com/jansvoboda11 edited
https://github.com/llvm/llvm-project/pull/114457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 edited
https://github.com/llvm/llvm-project/pull/114457
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/114457
This PR builds on top of #113984 and attempts to avoid allocating input file
paths eagerly. Instead, the `InputFileInfo` type used by `ASTReader` now only
holds `StringRef`s that point into the PCM file bu
https://github.com/jansvoboda11 created
https://github.com/llvm/llvm-project/pull/114460
This PR removes the `HeaderFileInfo::Framework` member and reduces the size of
this data type from 32B to 16B. This should improve Clang's memory usage in
situations where it keeps track of lots of header
https://github.com/jansvoboda11 updated
https://github.com/llvm/llvm-project/pull/114457
>From 3be61a8f1eecdc64c0df5d6635f5bf7809c31de4 Mon Sep 17 00:00:00 2001
From: Jan Svoboda
Date: Tue, 22 Oct 2024 09:41:18 -0700
Subject: [PATCH 1/2] [clang][deps][modules] Reduce allocations of input file
@@ -472,7 +465,9 @@ class FullDeps {
JOS.attributeArray("command-line",
toJSONStrings(JOS, MD.getBuildArguments()));
JOS.attribute("context-hash", StringRef(MD.ID.ContextHash));
-JOS.attributeArray("file-deps",
https://github.com/jansvoboda11 closed
https://github.com/llvm/llvm-project/pull/114459
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -839,9 +839,11 @@ int clang_scan_deps_main(int argc, char **argv, const
llvm::ToolContext &) {
auto R = std::make_reverse_iterator(FlagsEnd);
for (auto I = R, E = Args.rend(); I != E; ++I) {
StringRef Arg = *I;
+if ((I + 1) == E)
1101 - 1200 of 1565 matches
Mail list logo