[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-11-11 Thread Jan Svoboda via 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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-11-06 Thread Ben Langmuir via cfe-commits
https://github.com/benlangmuir approved this pull request. 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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-11-05 Thread Jan Svoboda via cfe-commits
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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-11-01 Thread Jan Svoboda via 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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-11-01 Thread Jan Svoboda via 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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via 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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via 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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
@@ -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",

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via 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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff a553c620b7d70dedd268aa2588e5e50e7dc6ccc8 3be61a8f1eecdc64c0df5d6635f5bf7809c31de4 --e

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via cfe-commits
@@ -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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes 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

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes 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 P

[clang] [clang][deps][modules] Allocate input file paths lazily (PR #114457)

2024-10-31 Thread Jan Svoboda via 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