[clang] 307e853 - Add nomerge function attribute to clang

2020-05-21 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-05-21T15:28:27-07:00 New Revision: 307e85395485e1eff9533b2d7952b16f33ceae38 URL: https://github.com/llvm/llvm-project/commit/307e85395485e1eff9533b2d7952b16f33ceae38 DIFF: https://github.com/llvm/llvm-project/commit/307e85395485e1eff9533b2d7952b16f33ceae38.diff LOG

[clang] b0a0f01 - Revert "Add nomerge function attribute to clang"

2020-05-21 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-05-21T16:13:18-07:00 New Revision: b0a0f01bc175b4c444052f871a89421889f8b5ce URL: https://github.com/llvm/llvm-project/commit/b0a0f01bc175b4c444052f871a89421889f8b5ce DIFF: https://github.com/llvm/llvm-project/commit/b0a0f01bc175b4c444052f871a89421889f8b5ce.diff LOG

[clang] e36076e - [clang] Add nomerge function attribute to clang

2020-05-21 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-05-21T17:07:39-07:00 New Revision: e36076ee3a2ebc6013372d9b71e6bb09e8612366 URL: https://github.com/llvm/llvm-project/commit/e36076ee3a2ebc6013372d9b71e6bb09e8612366 DIFF: https://github.com/llvm/llvm-project/commit/e36076ee3a2ebc6013372d9b71e6bb09e8612366.diff LOG

[clang] 170b686 - [Clang] Add a new warning to warn when passing uninitialized variables as const reference parameters to a function

2020-06-02 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-06-02T10:21:02-07:00 New Revision: 170b6869b563dd3393d99f3e03d389b9058d5f24 URL: https://github.com/llvm/llvm-project/commit/170b6869b563dd3393d99f3e03d389b9058d5f24 DIFF: https://github.com/llvm/llvm-project/commit/170b6869b563dd3393d99f3e03d389b9058d5f24.diff LOG

[clang] abd4515 - [Coverage] Add comment to skipped regions

2020-07-21 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-21T17:34:18-07:00 New Revision: abd45154bdb6b76c5b480455eacc8c75b08242aa URL: https://github.com/llvm/llvm-project/commit/abd45154bdb6b76c5b480455eacc8c75b08242aa DIFF: https://github.com/llvm/llvm-project/commit/abd45154bdb6b76c5b480455eacc8c75b08242aa.diff LOG

[clang] 3930c4e - [Coverage] fix failed test case.

2020-07-21 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-21T19:16:18-07:00 New Revision: 3930c4e7d1aa486ccb4245214c0b383f40574a52 URL: https://github.com/llvm/llvm-project/commit/3930c4e7d1aa486ccb4245214c0b383f40574a52 DIFF: https://github.com/llvm/llvm-project/commit/3930c4e7d1aa486ccb4245214c0b383f40574a52.diff LOG

[clang] b46176b - Reland [Coverage] Add comment to skipped regions

2020-07-28 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-28T13:20:57-07:00 New Revision: b46176bbb094610460667edad950a9c99f844118 URL: https://github.com/llvm/llvm-project/commit/b46176bbb094610460667edad950a9c99f844118 DIFF: https://github.com/llvm/llvm-project/commit/b46176bbb094610460667edad950a9c99f844118.diff LOG

[clang] e408cba - [AST] Mangle LambdaContextDecl for top level decl

2020-06-10 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-06-10T09:44:09-07:00 New Revision: e408cba84f8a9471bb26deca8d9aac049a924847 URL: https://github.com/llvm/llvm-project/commit/e408cba84f8a9471bb26deca8d9aac049a924847 DIFF: https://github.com/llvm/llvm-project/commit/e408cba84f8a9471bb26deca8d9aac049a924847.diff LOG

[clang] 0547040 - [SemaCXX] Fix false positive of -Wuninitialized-const-reference in empty function body.

2020-07-06 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-06T10:52:05-07:00 New Revision: 054704082b461418d3dac3a379792cdaf52d40b3 URL: https://github.com/llvm/llvm-project/commit/054704082b461418d3dac3a379792cdaf52d40b3 DIFF: https://github.com/llvm/llvm-project/commit/054704082b461418d3dac3a379792cdaf52d40b3.diff LOG

[clang] c92a8c0 - [LPM] Port CGProfilePass from NPM to LPM

2020-07-09 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-09T13:03:42-07:00 New Revision: c92a8c0a0f68fbbb23e3fdde071007e63a552e82 URL: https://github.com/llvm/llvm-project/commit/c92a8c0a0f68fbbb23e3fdde071007e63a552e82 DIFF: https://github.com/llvm/llvm-project/commit/c92a8c0a0f68fbbb23e3fdde071007e63a552e82.diff LOG

[clang] 672ae62 - [Lexer] Fix missing coverage line after #endif

2020-07-09 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-09T15:15:40-07:00 New Revision: 672ae621e91ff5cdefb2535bdd530641536685ea URL: https://github.com/llvm/llvm-project/commit/672ae621e91ff5cdefb2535bdd530641536685ea DIFF: https://github.com/llvm/llvm-project/commit/672ae621e91ff5cdefb2535bdd530641536685ea.diff LOG

[clang] 8be204f - Revert "[Lexer] Fix missing coverage line after #endif"

2020-07-09 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-09T15:51:02-07:00 New Revision: 8be204fe75caac4ce6ed1e2cf5659011476bde79 URL: https://github.com/llvm/llvm-project/commit/8be204fe75caac4ce6ed1e2cf5659011476bde79 DIFF: https://github.com/llvm/llvm-project/commit/8be204fe75caac4ce6ed1e2cf5659011476bde79.diff LOG

[clang] dcd76c0 - [Lexer] Fix missing coverage line after #endif

2020-07-10 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-10T09:05:20-07:00 New Revision: dcd76c0c0716a4417110423718c7cae4b516b4d0 URL: https://github.com/llvm/llvm-project/commit/dcd76c0c0716a4417110423718c7cae4b516b4d0 DIFF: https://github.com/llvm/llvm-project/commit/dcd76c0c0716a4417110423718c7cae4b516b4d0.diff LOG

[clang] 1fbb719 - [LPM] Port CGProfilePass from NPM to LPM

2020-07-10 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-07-10T09:04:51-07:00 New Revision: 1fbb719470c6e0395abaab66c68fae3b8ae405d0 URL: https://github.com/llvm/llvm-project/commit/1fbb719470c6e0395abaab66c68fae3b8ae405d0 DIFF: https://github.com/llvm/llvm-project/commit/1fbb719470c6e0395abaab66c68fae3b8ae405d0.diff LOG

[clang] c354b2e - [Clang] Add note for bad conversion when expression is pointer to forward-declared type

2020-08-07 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-08-07T11:06:08-07:00 New Revision: c354b2e3bfe6709ffd78d0fcd017b7e5be7a7a23 URL: https://github.com/llvm/llvm-project/commit/c354b2e3bfe6709ffd78d0fcd017b7e5be7a7a23 DIFF: https://github.com/llvm/llvm-project/commit/c354b2e3bfe6709ffd78d0fcd017b7e5be7a7a23.diff LOG

[clang] 94c6cea - [AST] add parenthesis locations for IfStmt and SwitchStmt

2020-08-10 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-08-10T19:19:51-07:00 New Revision: 94c6ceab539efe26a1707124e803f444139c1b12 URL: https://github.com/llvm/llvm-project/commit/94c6ceab539efe26a1707124e803f444139c1b12 DIFF: https://github.com/llvm/llvm-project/commit/94c6ceab539efe26a1707124e803f444139c1b12.diff LOG

[clang] 4aaa977 - [Sema] Fix missing warning on initializer lists on field initializers with overloaded operators

2020-08-10 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-08-10T19:32:59-07:00 New Revision: 4aaa97700377a811dbcaf88a81ec068a5b517a4d URL: https://github.com/llvm/llvm-project/commit/4aaa97700377a811dbcaf88a81ec068a5b517a4d DIFF: https://github.com/llvm/llvm-project/commit/4aaa97700377a811dbcaf88a81ec068a5b517a4d.diff LOG

[clang] a31c89c - [Coverage] Enable emitting gap area between macros

2020-08-12 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-08-12T16:25:27-07:00 New Revision: a31c89c1b7a0a2fd3e2c0b8a587a60921abf4abd URL: https://github.com/llvm/llvm-project/commit/a31c89c1b7a0a2fd3e2c0b8a587a60921abf4abd DIFF: https://github.com/llvm/llvm-project/commit/a31c89c1b7a0a2fd3e2c0b8a587a60921abf4abd.diff LOG

[clang] 84fffa6 - [Coverage] Adjust skipped regions only if {Prev,Next}TokLoc is in the same file as regions' {start, end}Loc

2020-08-18 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2020-08-18T13:26:19-07:00 New Revision: 84fffa67283139954b7764328966b5f766db1003 URL: https://github.com/llvm/llvm-project/commit/84fffa67283139954b7764328966b5f766db1003 DIFF: https://github.com/llvm/llvm-project/commit/84fffa67283139954b7764328966b5f766db1003.diff LOG

[clang] [lldb] [mlir] [compiler-rt] [llvm] [clang-tools-extra] [flang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-06 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Ping. https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [Profile] Refactor profile correlation. (PR #70856)

2023-11-08 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > If you omit the data and names sections from the object files, then > __llvm_profile_end_data() - __llvm_profile_begin_data() and > __llvm_profile_end_names() - __llvm_profile_begin_names() are both 0 and > there's no need for [special casing this in the > runtime](https://g

[compiler-rt] [clang-tools-extra] [llvm] [flang] [mlir] [clang] [lldb] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-10 Thread Zequan Wu via cfe-commits
ZequanWu wrote: There are some discussions about this outside the PR: https://github.com/llvm/llvm-project/pull/70856#issuecomment-1791465183 https://discourse.llvm.org/t/rfc-add-binary-profile-correlation-to-not-load-profile-metadata-sections-into-memory-at-runtime/74565/8 Some further discussi

[llvm] [compiler-rt] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-10 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Chatted with @MaskRay offline, we come to an agreement that it's not good to use relying on the bit in __llvm_profile_raw_version to decide whether or not to dump data/name sections at runtime for the reasons mentioned above. Sent a PR: #71996 > Even if we have a way to fix th

[clang] Supports viewing class member variables in lambda when using the vs debugger (PR #71564)

2023-11-14 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,48 @@ +// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -o %t.obj -- %s +// RUN: llvm-pdbutil dump -all %t.obj | FileCheck %s + +class Foo { + public: + void foo() { +int aa = 4; +int bb = 5; +int cc = 6; +auto f = [=] { + int aaa = a + aa; +

[mlir] [llvm] [lldb] [flang] [clang] [compiler-rt] [clang-tools-extra] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-05 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Can you break up all the changes to tests that replace > `-debug-info-correlate` with `--profile-correlate=debug-info` into a separate > PR to reduce the size of this PR? Done. https://github.com/llvm/llvm-project/pull/69493 ___ cf

[clang] [flang] [llvm] [clang-tools-extra] [mlir] [lldb] [compiler-rt] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-05 Thread Zequan Wu via cfe-commits
@@ -702,6 +708,8 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_COVMAP_COMMON __llvm_covmap #define INSTR_PROF_COVFUN_COMMON __llvm_covfun #define INSTR_PROF_ORDERFILE_COMMON __llvm_orderfile ZequanWu wrote: Done. https://gi

[flang] [clang-tools-extra] [compiler-rt] [lldb] [llvm] [mlir] [clang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [llvm] [clang-tools-extra] [lldb] [mlir] [flang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,11 @@ +; RUN: opt < %s -passes=instrprof -profile-correlate=binary -S | FileCheck %s ZequanWu wrote: Moved the test to `coverage.ll` https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing li

[clang-tools-extra] [compiler-rt] [lldb] [llvm] [clang] [flang] [mlir] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -mllvm -profile-correlate=binary -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -o - %s | FileCheck %s --check-prefix=BIN-CORRELATE

[llvm] [clang] [flang] [clang-tools-extra] [lldb] [compiler-rt] [mlir] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,46 @@ +// REQUIRES: linux || windows ZequanWu wrote: I think lld is not require, removed `-fuse-ld=lld`. https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing list cfe-commits@lists.llvm.or

[flang] [lldb] [compiler-rt] [llvm] [clang-tools-extra] [clang] [mlir] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -1829,6 +1833,22 @@ void CoverageMappingModuleGen::emit() { llvm::GlobalValue::InternalLinkage, NamesArrVal, llvm::getCoverageUnusedNamesVarName()); } + const StringRef VarName(INSTR_PROF_QUOTE(INSTR_PROF_RAW_VERSI

[lldb] [mlir] [llvm] [clang] [compiler-rt] [flang] [clang-tools-extra] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -46,14 +73,38 @@ const char *InstrProfCorrelator::NumCountersAttributeName = "Num Counters"; llvm::Expected> InstrProfCorrelator::Context::get(std::unique_ptr Buffer, - const object::ObjectFile &Obj) { + con

[clang] [flang] [llvm] [clang-tools-extra] [lldb] [compiler-rt] [mlir] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu commented: > "binary" is ambiguous. I wonder whether object file correlation is better. > llvm-symbolizer has an option --obj=xxx. llvm-symbolizer's `--obj` could take an pre-linking object file. But here we need to take post-linked binary for merging. https://gith

[flang] [compiler-rt] [lldb] [llvm] [mlir] [clang] [clang-tools-extra] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -1331,6 +1336,18 @@ static int merge_main(int argc, const char *argv[]) { "(default: 1)")); cl::ParseCommandLineOptions(argc, argv, "LLVM profile data merger\n"); + if (!DebugInfoFilename.empty() && !BinaryFilename.empty()) { +exitWithError("Expect

[compiler-rt] [flang] [mlir] [llvm] [clang] [clang-tools-extra] [lldb] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -1331,6 +1336,18 @@ static int merge_main(int argc, const char *argv[]) { "(default: 1)")); cl::ParseCommandLineOptions(argc, argv, "LLVM profile data merger\n"); + if (!DebugInfoFilename.empty() && !BinaryFilename.empty()) { +exitWithError("Expect

[lldb] [clang-tools-extra] [clang] [mlir] [flang] [llvm] [compiler-rt] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -1341,20 +1344,26 @@ void InstrProfiling::createDataVariable(InstrProfCntrInstBase *Inc, } auto *Data = new GlobalVariable(*M, DataTy, false, Linkage, nullptr, DataVarName); - // Reference the counter variable with a label difference (link-time - // constant). -

[compiler-rt] [flang] [llvm] [lldb] [clang-tools-extra] [clang] [mlir] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -195,8 +195,14 @@ OPTIONS .. option:: --debug-info= Specify the executable or ``.dSYM`` that contains debug info for the raw profile. - When ``-debug-info-correlate`` was used for instrumentation, use this option - to correlate the raw profile. + When ``-profile-correlate

[clang-tools-extra] [mlir] [clang] [lldb] [compiler-rt] [llvm] [flang] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,46 @@ +// REQUIRES: linux || windows +// Default +// RUN: %clang -o %t.normal -fprofile-instr-generate -fcoverage-mapping -fuse-ld=lld %S/Inputs/instrprof-debug-info-correlate-main.cpp %S/Inputs/instrprof-debug-info-correlate-foo.cpp +// RUN: env LLVM_PROFILE_FILE=%t.

[clang-tools-extra] [mlir] [clang] [lldb] [compiler-rt] [llvm] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [compiler-rt] [mlir] [llvm] [clang] [clang-tools-extra] [lldb] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [compiler-rt] [clang-tools-extra] [lldb] [clang] [flang] [mlir] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-11-15 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Supports viewing class member variables in lambda when using the vs debugger (PR #71564)

2023-11-16 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,48 @@ +// RUN: %clang_cl --target=x86_64-windows-msvc /c /Z7 -o %t.obj -- %s ZequanWu wrote: I think you are missing `-gcodeview` in the command line to emit the debug info. The change should reflect on a metadata. `llvm/test/DebugInfo/COFF` is the p

[clang] Supports viewing class member variables in lambda when using the vs debugger (PR #71564)

2023-11-16 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu approved this pull request. https://github.com/llvm/llvm-project/pull/71564 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang-tools-extra] [lldb] [compiler-rt] [flang] [clang] [mlir] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-11-16 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Some further discussion/pre-work needed before proceeding with this PR. These two discussions are addressed and this is ready to be reviewed. 1. Support for merging with multiple correlation files will be done in a separate change. 2. Removed the `VARIANT_MASK_BIN_CORRELATE`

[clang] [Profile] Refactor profile correlation. (PR #70712)

2023-10-30 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/70712 Refactor some code from https://github.com/llvm/llvm-project/pull/69493. Rebase of https://github.com/llvm/llvm-project/pull/69656 on top of main as it was messed up. >From e33d4e7d8324e8efb6f0c0ff5f3426a2e0a

[llvm] [compiler-rt] [clang] [Profile] Refactor profile correlation. (PR #70712)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: I think it's fine to land as this is already reviewed & approved at https://github.com/llvm/llvm-project/pull/69656 https://github.com/llvm/llvm-project/pull/70712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.l

[llvm] [compiler-rt] [clang] [Profile] Refactor profile correlation. (PR #70712)

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/70712 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [llvm] [Profile] Refactor profile correlation. (PR #70712)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Reverted at db7a1ed9a22fadacfa651e88d0f75f365d44af9a. The [build](https://lab.llvm.org/buildbot/#/builders/139/builds/52535/steps/6/logs/stdio) shows bunch linking failures, but I can build those failed targets locally. https://github.com/llvm/llvm-project/pull/70712 _

[compiler-rt] [clang] [llvm] [Profile] Refactor profile correlation. (PR #70712)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: I can repro the linking failures when using the same cmake invocation. Here is the full command: ``` $ /usr/bin/c++ -std=c++11 -Wno-documentation-deprecated-sync -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -fno-lifetime-dse -Wall -Wextra -Wn

[clang] [clang-tools-extra] [llvm] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/69513 >From 9a1af6e1d47ab622979796f2319edec8a9c77928 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Wed, 18 Oct 2023 16:28:30 -0400 Subject: [PATCH 1/6] [llvm-profdata] Emit error when counter value is greater than 2

[clang] [clang-tools-extra] [llvm] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Ping. https://github.com/llvm/llvm-project/pull/69513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu created https://github.com/llvm/llvm-project/pull/70856 Refactor some code from https://github.com/llvm/llvm-project/pull/69493. #70712 was reverted due to linking failures. So, I removed `-profile-correlate=` flag and kept `-debug-info-correlate` in this change.

[clang] [llvm] [clang-tools-extra] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/69513 >From 9a1af6e1d47ab622979796f2319edec8a9c77928 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Wed, 18 Oct 2023 16:28:30 -0400 Subject: [PATCH 1/7] [llvm-profdata] Emit error when counter value is greater than 2

[clang] [llvm] [clang-tools-extra] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

2023-10-31 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/69513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-10-31 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Sorry for so many noise regarding this change. https://github.com/llvm/llvm-project/pull/70856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [clang-tools-extra] [llvm-profdata] Emit warning when counter value is greater than 2^56. (PR #69513)

2023-11-01 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Just to double check: the commit message says "emit warning", but it should > error by default, right? Yes, -failure-mode=any is default, which throws an error if there is any. https://github.com/llvm/llvm-project/pull/69513 ___ cfe

[clang] [compiler-rt] [llvm] [Profile] Refactor profile correlation. (PR #70856)

2023-11-01 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Sounds fine to me, but I guess I don't understand why `-profile-correlate=` > doesn't work. Do you still plan to add the flag later? I haven't found a way to share information (whether of not binary correlation is enabled) between CodeGen(TargetLoweringObjectFileImpl.cpp) and

[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-01 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/70856 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > @ZequanWu this seems to cause issues on macOS: > https://green.lab.llvm.org/green/job/clang-stage1-RA/36184/console > > ``` > Profile-x86_64 :: Darwin/instrprof-debug-info-correlate.c > Profile-x86_64 :: instrprof-darwin- > Profile-x86_64h :: Darwin/instrprof-debug-info-correl

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > > Sounds fine to me, but I guess I don't understand why `-profile-correlate=` > > doesn't work. Do you still plan to add the flag later? > > I haven't found a way to share information (whether of not binary correlation > is enabled) between CodeGen(TargetLoweringObjectFileImp

[clang] [llvm] [compiler-rt] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
@@ -261,6 +261,9 @@ uint64_t __llvm_profile_get_magic(void); /*! \brief Get the version of the file format. */ uint64_t __llvm_profile_get_version(void); +/*! \brief If the binary is compiled with profile correlation. */ +int hasCorrelation(); ZequanWu wrote:

[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
@@ -89,3 +89,7 @@ COMPILER_RT_VISIBILITY void __llvm_profile_reset_counters(void) { } lprofSetProfileDumped(0); } + +inline int hasCorrelation() { ZequanWu wrote: COMPILER_RT_VISIBILITY is added at https://github.com/llvm/llvm-project/commit/56e205a89cbb

[clang] [llvm] [mlir] [flang] [compiler-rt] [clang-tools-extra] [lldb] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-02 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/69493 >From 3a394ce5d4d7d91251337bd0a2c1c1a074eb37e6 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 17 Oct 2023 19:24:12 -0400 Subject: [PATCH 1/5] [Profile] Add binary profile correlation. --- clang/lib/CodeGe

[llvm] [lldb] [mlir] [flang] [clang-tools-extra] [clang] [compiler-rt] [Profile] Add binary profile correlation to offload profile metadata at runtime. (PR #69493)

2023-11-02 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/69493 >From 3a394ce5d4d7d91251337bd0a2c1c1a074eb37e6 Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 17 Oct 2023 19:24:12 -0400 Subject: [PATCH 1/6] [Profile] Add binary profile correlation. --- clang/lib/CodeGe

[compiler-rt] [llvm] [clang] [Profile] Refactor profile correlation. (PR #70856)

2023-11-02 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > I'm a bit concerned about the use of hasCorrelation. We require the runtime > to check the flag and omit the data and names section if set which introduces > a potential issue: since we emit the version in every TU and u se COMDAT to > deduplicate them, but that means that if

[clang] [llvm] [lldb] [mlir] [compiler-rt] [clang-tools-extra] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-12 Thread Zequan Wu via cfe-commits
@@ -1829,6 +1833,22 @@ void CoverageMappingModuleGen::emit() { llvm::GlobalValue::InternalLinkage, NamesArrVal, llvm::getCoverageUnusedNamesVarName()); } + const StringRef VarName(INSTR_PROF_QUOTE(INSTR_PROF_RAW_VERSI

[clang] [compiler-rt] [flang] [llvm] [lldb] [mlir] [clang-tools-extra] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-12 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,9 @@ +// RUN: %clang_cc1 -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -mllvm -profile-correlate=binary -fprofile-instrument=clang -fcoverage-mapping -emit-llvm -o - %s | FileCheck %s --check-prefix=BIN-CORRELATE

[llvm] [compiler-rt] [lldb] [clang] [mlir] [flang] [clang-tools-extra] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-12 Thread Zequan Wu via cfe-commits
@@ -1829,6 +1833,22 @@ void CoverageMappingModuleGen::emit() { llvm::GlobalValue::InternalLinkage, NamesArrVal, llvm::getCoverageUnusedNamesVarName()); } + const StringRef VarName(INSTR_PROF_QUOTE(INSTR_PROF_RAW_VERSI

[clang] [llvm] [mlir] [lldb] [clang-tools-extra] [compiler-rt] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-14 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu closed https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [mlir] [lldb] [clang-tools-extra] [compiler-rt] [clang] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-14 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Seems like a mismatch on the diff, so maybe the check is too stringent. > > If this will take a while to fix, would you mind reverting until it can be > addressed? It passed for me locally on x64. Maybe I should use `diff <(llvm-profdata show --all-functions --counts %t.norm

[clang-tools-extra] [compiler-rt] [clang] [llvm] [flang] [lldb] [mlir] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-12-14 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > Well, seems like someone broke ToT w/ a compiler error. I'll let you know if > the forward fix fails to address the issue. The latest build passed: https://luci-milo.appspot.com/ui/p/fuchsia/builders/toolchain.ci/clang-linux-x64/b8761696377585255057/overview. https://github.

[clang] [compiler-rt] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2023-12-15 Thread Zequan Wu via cfe-commits
@@ -569,16 +577,26 @@ struct CounterCoverageMappingBuilder /// Return a counter for the subtraction of \c RHS from \c LHS Counter subtractCounters(Counter LHS, Counter RHS, bool Simplify = true) { +if (llvm::EnableSingleByteCoverage) + assert( + 0 && +

[compiler-rt] [clang] [llvm] [InstrProf] Single byte counters in coverage (PR #75425)

2023-12-15 Thread Zequan Wu via cfe-commits
@@ -234,8 +246,20 @@ struct MapRegionCounters : public RecursiveASTVisitor { if (Hash.getHashVersion() == PGO_HASH_V1) return Base::TraverseIfStmt(If); +// When single byte coverage mode is enabled, add a counter to then and +// else. +for (Stmt *CS : If

[llvm] [mlir] [clang-tools-extra] [clang] [lldb] [compiler-rt] [flang] [Profile] Add binary profile correlation for code coverage. (PR #69493)

2023-11-28 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Ping. https://github.com/llvm/llvm-project/pull/69493 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [compiler-rt] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/75957 >From d72f0e1ad7759bad81767418604d27f11d74d6de Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 19 Dec 2023 12:32:15 -0500 Subject: [PATCH 1/3] [Profile] Allow profile merging with multiple correlate files.

[llvm] [compiler-rt] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu updated https://github.com/llvm/llvm-project/pull/75957 >From d72f0e1ad7759bad81767418604d27f11d74d6de Mon Sep 17 00:00:00 2001 From: Zequan Wu Date: Tue, 19 Dec 2023 12:32:15 -0500 Subject: [PATCH 1/4] [Profile] Allow profile merging with multiple correlate files.

[compiler-rt] [llvm] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ZequanWu wrote: Added by mistake. Removed. https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[compiler-rt] [clang] [clang-tools-extra] [llvm] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -0,0 +1,33 @@ +// REQUIRES: lld-available ZequanWu wrote: The added test in `Linux/instrprof-debug-info-correlate.c` requires build id. Does darwin linker ld64 or ld64.lld have the option to emit build id into binary? I don't find such flag. https://github.

[compiler-rt] [llvm] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -25,6 +25,25 @@ // RUN: diff <(llvm-profdata show --all-functions --counts %t.cov.normal.profdata) <(llvm-profdata show --all-functions --counts %t.cov.profdata) +// Test debug info correlate with build id. ZequanWu wrote: The added test in `Linux/instr

[clang] [llvm] [compiler-rt] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[llvm] [compiler-rt] [clang] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2023-12-20 Thread Zequan Wu via cfe-commits
@@ -481,3 +509,49 @@ Error BinaryInstrProfCorrelator::correlateProfileNameImpl() { this->Names.append(this->Ctx->NameStart, this->Ctx->NameSize); return Error::success(); } + +llvm::Expected> InstrProfCorrelators::get( +ArrayRef> +CorrelateInputs, +uint32_

[compiler-rt] [clang] [llvm] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-02 Thread Zequan Wu via cfe-commits
@@ -481,3 +509,49 @@ Error BinaryInstrProfCorrelator::correlateProfileNameImpl() { this->Names.append(this->Ctx->NameStart, this->Ctx->NameSize); return Error::success(); } + +llvm::Expected> InstrProfCorrelators::get( +ArrayRef> +CorrelateInputs, +uint32_

[compiler-rt] [clang] [llvm] [clang-tools-extra] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-02 Thread Zequan Wu via cfe-commits
@@ -118,18 +118,18 @@ cl::opt ProfiledBinary( "profiled-binary", cl::init(""), cl::desc("Path to binary from which the profile was collected."), cl::sub(ShowSubcommand), cl::sub(MergeSubcommand)); -cl::opt DebugInfoFilename( -"debug-info", cl::init(""), +cl::lis

[clang-tools-extra] [llvm] [compiler-rt] [clang] [Profile] Allow profile merging with multiple correlate files. (PR #75957)

2024-01-10 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Ping. https://github.com/llvm/llvm-project/pull/75957 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-10 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Hi, this breaks our build. I don't know how to update the expectation to match Current expectation: DCHECK_OK(foo); // expected-error@components/reporting/util/status_macros.h:* {{{CHECK,DCHECK,ASSERT,EXPECT}_OK do not accept a type other than Status or StatusOr.}} https

[clang] [Clang] Wide delimiters ('{{{') for expect strings (PR #77326)

2024-01-10 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > @ZequanWu would either of these work for you? > > ```c++ > DCHECK_OK(foo); // > expected-error@components/reporting/util/status_macros.h:* > {{{CHECK,DCHECK,ASSERT,EXPECT}_OK do not accept a type other than Status or > StatusOr.}}} > ``` > > or > > ```c++ > DCHECK_OK(foo

[libcxx] [clang] [llvm] [compiler-rt] [mlir] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-11 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Heads up! This causes clang crash: cmd: ``` clang++ "-cc1" "-triple" "x86_64-apple-macosx10.15.0" "-Wundef-prefix=TARGET_OS_" "-Werror=undef-prefix" "-Wdeprecated-objc-isa-usage" "-Werror=deprecated-objc-isa-usage" "-emit-obj" "-femit-dwarf-unwind=no-compact-unwind" "-disable-f

[llvm] [libcxx] [compiler-rt] [clang] [mlir] [asan] Enable StackSafetyAnalysis by default (PR #77210)

2024-01-11 Thread Zequan Wu via cfe-commits
ZequanWu wrote: Reverted at e7f794875169811f3801fad6d40bb9fe833e1a69. Will file an issue to track it once reducing is done. https://github.com/llvm/llvm-project/pull/77210 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/

[clang] 581dc3c - Revert "Lower `@llvm.global_dtors` using `__cxa_atexit` on MachO"

2022-03-23 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2022-03-23T16:11:54-07:00 New Revision: 581dc3c729c619fe636325a79279fabb2acdc1ce URL: https://github.com/llvm/llvm-project/commit/581dc3c729c619fe636325a79279fabb2acdc1ce DIFF: https://github.com/llvm/llvm-project/commit/581dc3c729c619fe636325a79279fabb2acdc1ce.diff LOG

[clang] d54c4df - [clang-format] Fix namespace format when the name is followed by a macro

2022-03-10 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2022-03-10T15:00:32-08:00 New Revision: d54c4df31470044a66605ebb8a2f936e8dd552af URL: https://github.com/llvm/llvm-project/commit/d54c4df31470044a66605ebb8a2f936e8dd552af DIFF: https://github.com/llvm/llvm-project/commit/d54c4df31470044a66605ebb8a2f936e8dd552af.diff LOG

[clang-tools-extra] 217f267 - Revert "[pseudo] Split greatergreater token."

2022-03-18 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2022-03-18T10:15:48-07:00 New Revision: 217f267efe3082438e698e2f08566b9df8c530fa URL: https://github.com/llvm/llvm-project/commit/217f267efe3082438e698e2f08566b9df8c530fa DIFF: https://github.com/llvm/llvm-project/commit/217f267efe3082438e698e2f08566b9df8c530fa.diff LOG

[clang] d870a57 - [SemaCXX] Set promotion type for enum if its type is promotable to integer type even if it has no definition.

2022-07-21 Thread Zequan Wu via cfe-commits
Author: Zequan Wu Date: 2022-07-21T11:23:21-07:00 New Revision: d870a575631d2cedab2ff237af8edd17916edc64 URL: https://github.com/llvm/llvm-project/commit/d870a575631d2cedab2ff237af8edd17916edc64 DIFF: https://github.com/llvm/llvm-project/commit/d870a575631d2cedab2ff237af8edd17916edc64.diff LOG

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-13 Thread Zequan Wu via cfe-commits
ZequanWu wrote: > > > > IIUC, the approach you choose here is to let `SemaPPCallbacks` control > > > > the "entered file stack" and allow it to remove element (which is file) > > > > from middle of the internal stack in `TimeTraceProfiler`, but this > > > > creates async event which is not des

[clang] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-25 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu approved this pull request. https://github.com/llvm/llvm-project/pull/83961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-25 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/83961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-25 Thread Zequan Wu via cfe-commits
@@ -102,23 +104,24 @@ struct llvm::TimeTraceProfiler { llvm::get_thread_name(ThreadName); } - void begin(std::string Name, llvm::function_ref Detail) { -Stack.emplace_back(ClockType::now(), TimePointType(), std::move(Name), - Detail()); + Time

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-11 Thread Zequan Wu via cfe-commits
@@ -102,23 +104,24 @@ struct llvm::TimeTraceProfiler { llvm::get_thread_name(ThreadName); } - void begin(std::string Name, llvm::function_ref Detail) { -Stack.emplace_back(ClockType::now(), TimePointType(), std::move(Name), - Detail()); + Time

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-11 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu edited https://github.com/llvm/llvm-project/pull/83961 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-11 Thread Zequan Wu via cfe-commits
https://github.com/ZequanWu commented: IIUC, the approach you choose here is to let `SemaPPCallbacks` control the "entered file stack" and allow it to remove element (which is file) from middle of the internal stack in `TimeTraceProfiler`, but this creates async event which is not designed for

[clang] [llvm] Use timeTraceAsyncProfilerBegin for Source span (PR #83961)

2024-03-11 Thread Zequan Wu via cfe-commits
@@ -132,15 +135,18 @@ struct llvm::TimeTraceProfiler { // happens to be the ones that don't have any currently open entries above // itself. if (llvm::none_of(llvm::drop_begin(llvm::reverse(Stack)), - [&](const TimeTraceProfilerEntry &Val) { -

  1   2   3   >