[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

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

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-22 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai approved this pull request. 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

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

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

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

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

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-18 Thread Volodymyr Sapsai via cfe-commits
vsapsai wrote: > > Have you checked the performance for incremental builds? > > I haven't, since I believe this change doesn't affect incremental builds at > all. Fair enough. I was thinking that you can achieve the same improvement by using some contentionless-update-mtime function. But I ha

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

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

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-17 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai commented: I think the change makes sense. For example, for just-built .o files we assume they are valid and up-to-date, and don't need any extra verification. As far as I understand, your change helps with the clean builds. And I believe incremental builds can still

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-17 Thread Volodymyr Sapsai via cfe-commits
@@ -4905,6 +4905,10 @@ ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, this->BaseDirectory.clear(); WritingAST = false; + + if (WritingModule) +updateModuleTimestamp(OutputFile); vsapsai wrote: Don't have a strong opinion a

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-17 Thread Volodymyr Sapsai via cfe-commits
https://github.com/vsapsai edited 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

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

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

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-15 Thread Chuanqi Xu via cfe-commits
@@ -4905,6 +4905,10 @@ ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, this->BaseDirectory.clear(); WritingAST = false; + + if (WritingModule) +updateModuleTimestamp(OutputFile); ChuanqiXu9 wrote: Yeah, I'd like to make suc

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-15 Thread Jan Svoboda via cfe-commits
@@ -4905,6 +4905,10 @@ ASTFileSignature ASTWriter::WriteAST(Sema &SemaRef, StringRef OutputFile, this->BaseDirectory.clear(); WritingAST = false; + + if (WritingModule) +updateModuleTimestamp(OutputFile); jansvoboda11 wrote: Calling this here is a b

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Jan Svoboda (jansvoboda11) Changes Clang uses timestamp files to track the last time an implicitly-built PCM file was verified to be up-to-date with regard to its inputs. With `-fbuild-session-{file,timestamp}=` and `-fmodules-validate-

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-15 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-modules Author: Jan Svoboda (jansvoboda11) Changes Clang uses timestamp files to track the last time an implicitly-built PCM file was verified to be up-to-date with regard to its inputs. With `-fbuild-session-{file,timestamp}=` and `-fmodules-v

[clang] [clang][modules] Timestamp PCM files when writing (PR #112452)

2024-10-15 Thread Jan Svoboda via cfe-commits
https://github.com/jansvoboda11 created https://github.com/llvm/llvm-project/pull/112452 Clang uses timestamp files to track the last time an implicitly-built PCM file was verified to be up-to-date with regard to its inputs. With `-fbuild-session-{file,timestamp}=` and `-fmodules-validate-on