[clang] [AIX] Detect `#pragma mc_func` (PR #99888)

2024-07-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/99888 `#pragma mc_func` is an IBM XL feature that should be replaced by inline assembly. This PR adds an option `-ferr-pragma-mc-func-aix` to detect uses of `#pragma mc_func` and reports an error if the option is in

[clang] [llvm] [PGO][OpenMP] Instrumentation for GPU devices (Revision of #76587) (PR #102691)

2024-08-27 Thread Qiongsi Wu via cfe-commits
@@ -985,7 +990,8 @@ void FunctionInstrumenter::instrument() { Intrinsic::getDeclaration(&M, PGOBlockCoverage ? Intrinsic::instrprof_cover : Intrinsic::instrprof_increment), -{Nam

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-08-01 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/101336 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-08-02 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: @AaronBallman sorry to bug you. This patch was not tested sufficiently on my end and it is causing build failures on AIX buildbots due to the aforementioned system headers including `#pragma mc_func`. See https://lab.llvm.org/buildbot/#/builders/64/builds/582/steps/5/logs/stdi

[clang] dd7a4c3 - Revert "[AIX] Turn on `#pragma mc_func` check by default (#101336)"

2024-08-02 Thread Qiongsi Wu via cfe-commits
Author: Qiongsi Wu Date: 2024-08-02T15:01:15-04:00 New Revision: dd7a4c3e5ee3300588b7c12631f3305553d8ea6c URL: https://github.com/llvm/llvm-project/commit/dd7a4c3e5ee3300588b7c12631f3305553d8ea6c DIFF: https://github.com/llvm/llvm-project/commit/dd7a4c3e5ee3300588b7c12631f3305553d8ea6c.diff LO

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-08-02 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Pushed dd7a4c3e5ee3300588b7c12631f3305553d8ea6c to revert this PR for the moment since it is causing too many failures (upstream and downstream). Will revert this PR from llvm19 release branch as well. /cherry-pick dd7a4c3e5ee3300588b7c12631f3305553d8ea6c https://github.com/

[clang] [AIX] Turn on `#pragma mc_func` check by default (PR #101336)

2024-08-08 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Sorry about the delay! I was on break. Thanks for the comments @AaronBallman and @cor3ntin ! > I think it would make sense to revert this and the original patch (so there's > no #pragma mc_func support in Clang 19.x or main at all) so we can take a > fresh run at a new PR to

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/108570 This PR registers the writeout and reset functions for `gcov` for all modules in the PGO runtime, instead of registering them using global constructors in each module. The change is made for AIX only, but the

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-13 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: I would like to get input from the community if it is a good idea to use this initialization mechanism on more platforms, such as on Linux/macOS. If it works on more platforms, I will revise this PR so that we can perform the initialization in the runtime on as many platforms

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-16 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/108570 >From e1b5e886f3f7642ec691a08378a1f2cdc9e2465f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 11 Sep 2024 14:56:58 -0400 Subject: [PATCH 1/3] Initial commit. --- clang/test/CodeGen/attr-function-return

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/108570 >From e1b5e886f3f7642ec691a08378a1f2cdc9e2465f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 11 Sep 2024 14:56:58 -0400 Subject: [PATCH 1/7] Initial commit. --- clang/test/CodeGen/attr-function-return

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,129 @@ +; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op +; referring to the __llvm_covinit section. +; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s +; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s + +target d

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-15 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,129 @@ +; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op +; referring to the __llvm_covinit section. +; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s +; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s + +target d

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/108570 >From e1b5e886f3f7642ec691a08378a1f2cdc9e2465f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 11 Sep 2024 14:56:58 -0400 Subject: [PATCH 1/5] Initial commit. --- clang/test/CodeGen/attr-function-return

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -781,6 +798,9 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_COVNAME_COFF ".lcovn" #define INSTR_PROF_ORDERFILE_COFF ".lorderfile$M" +// TODO: Placeholder for Windows. We need to revise when we upstream this. qiongsiwu wro

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -3,12 +3,18 @@ /// 4.7 enables cfg_checksum. /// 4.8 (default, compatible with gcov 7) emits the exit block the second. // RUN: rm -rf %t && mkdir %t && cd %t -// RUN: %clang_cc1 -emit-llvm -disable-red-zone -coverage-data-file=/dev/null -coverage-version='304*' %s -o - | \

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -781,6 +798,9 @@ serializeValueProfDataFrom(ValueProfRecordClosure *Closure, #define INSTR_PROF_COVNAME_COFF ".lcovn" #define INSTR_PROF_ORDERFILE_COFF ".lorderfile$M" +// TODO: Placeholder for Windows. We need to revise when we upstream this. qiongsiwu wro

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -914,6 +918,7 @@ bool GCOVProfiler::emitProfileNotes( GlobalVariable *Counters = new GlobalVariable( *M, CounterTy, false, GlobalValue::InternalLinkage, Constant::getNullValue(CounterTy), "__llvm_gcov_ctr"); +Counters->setSection("__ll

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -2962,13 +2964,34 @@ void PPCAIXAsmPrinter::emitPGORefs(Module &M) { } } +void PPCAIXAsmPrinter::emitGCOVRefs() { + if (!OutContext.hasXCOFFSection( + "__llvm_gcov_ctr_section", + XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD))) +return; + +

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-16 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/108570 >From e1b5e886f3f7642ec691a08378a1f2cdc9e2465f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 11 Sep 2024 14:56:58 -0400 Subject: [PATCH 1/8] Initial commit. --- clang/test/CodeGen/attr-function-return

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-16 Thread Qiongsi Wu via cfe-commits
@@ -8,14 +8,19 @@ target triple = "powerpc-ibm-aix" ; CHECK-RW: .csect __llvm_covinit[RW],3 ; CHECK-RO: .csect __llvm_covinit[RO],3 -; CHECK: .vbyte 4, __llvm_gcov_writeout[DS] -; CHECK-NEXT:.vbyte 4, __llvm_gcov_reset[DS] -; CHECK: __llvm_gcov_ctr.1: +; CHECK-NE

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-16 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,129 @@ +; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op +; referring to the __llvm_covinit section. +; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s +; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s + +target d

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-16 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/108570 >From e1b5e886f3f7642ec691a08378a1f2cdc9e2465f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 11 Sep 2024 14:56:58 -0400 Subject: [PATCH 1/9] Initial commit. --- clang/test/CodeGen/attr-function-return

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-16 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,138 @@ +; Tests if the __llvm_gcov_ctr section contains a .ref pseudo-op +; referring to the __llvm_covinit section. +; RUN: llc < %s | FileCheck --check-prefixes=CHECK,CHECK-RW %s +; RUN: llc -mxcoff-roptr < %s | FileCheck --check-prefixes=CHECK,CHECK-RO %s + +target d

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-17 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: We prefer to keep the formatting in this particular file. I am merging this PR. https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/108570 >From e1b5e886f3f7642ec691a08378a1f2cdc9e2465f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 11 Sep 2024 14:56:58 -0400 Subject: [PATCH 1/6] Initial commit. --- clang/test/CodeGen/attr-function-return

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
@@ -2962,13 +2964,34 @@ void PPCAIXAsmPrinter::emitPGORefs(Module &M) { } } +void PPCAIXAsmPrinter::emitGCOVRefs() { + if (!OutContext.hasXCOFFSection( + "__llvm_gcov_ctr_section", + XCOFF::CsectProperties(XCOFF::XMC_RW, XCOFF::XTY_SD))) +return; + +

[clang] [compiler-rt] [llvm] [PGO] Initialize GCOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-04 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Thanks so much @hubert-reinterpretcast for the detailed review! All existing comments are now addressed. https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-24 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Gentle ping for review @MaskRay @petrhosek . Could you recommend some reviewers so I can get more comments? Thanks! https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-09-30 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Ping for review! @MaskRay @petrhosek . Thanks so much! https://github.com/llvm/llvm-project/pull/108570 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [llvm] [PGO] Initialize GOV Writeout and Reset Functions in the Runtime on AIX (PR #108570)

2024-10-01 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: @hubert-reinterpretcast and @w2yehia could you take a look at this PR? We can land this PR if you both are OK with it. Currently, the PR only impacts AIX. Thanks so much! https://github.com/llvm/llvm-project/pull/108570 ___ cfe-comm

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-03 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Gentle ping for review. Thanks! https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-01-30 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu ready_for_review https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-01-30 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/124786 >From 7060564de1bb6062639f4b4839fa17958f212755 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 27 Jan 2025 16:44:30 -0800 Subject: [PATCH 1/3] Initial implementation of clang modules current working dire

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/124786 >From 7060564de1bb6062639f4b4839fa17958f212755 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 27 Jan 2025 16:44:30 -0800 Subject: [PATCH 1/5] Initial implementation of clang modules current working dire

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Qiongsi Wu via cfe-commits
@@ -397,9 +397,91 @@ void ModuleDepCollector::applyDiscoveredDependencies(CompilerInvocation &CI) { } } +static bool isSafeToIgnoreCWD(const CowCompilerInvocation &CI) { + // Check if the command line input uses relative paths. + // It is not safe to ignore the current wo

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Qiongsi Wu via cfe-commits
@@ -63,7 +63,10 @@ enum class ScanningOptimizations { /// Canonicalize -D and -U options. Macros = 8, - DSS_LAST_BITMASK_ENUM(Macros), + /// Ignore the compiler's working directory if it is safe. + IgnoreCWD = 0x10, qiongsiwu wrote: Fixed! Thanks! ht

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-04 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Modules] Fix missing module dependency introduced by 7347870 (PR #126007)

2025-02-05 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/126007 73478708839fad8b02b3cfc84959d64a15ba93ca introduced a textual header but did not update clang's module map. This PR adds the header to the module map. >From 103380989b2c01da215c8bc12a5b121678f9c916 Mon Sep 1

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-02-01 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/124786 >From 7060564de1bb6062639f4b4839fa17958f212755 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 27 Jan 2025 16:44:30 -0800 Subject: [PATCH 1/4] Initial implementation of clang modules current working dire

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
@@ -2,6 +2,7 @@ set(LLVM_LINK_COMPONENTS OrcShared OrcTargetProcess Support + Core qiongsiwu wrote: Good question! @Bigcheese and myself discussed. We technically may not need `Core` here and I will revise. The dependency comes from https://github.com

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/119473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/119473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/119473 >From 06ae1ba1222f09e35ed428bcd6da91438b15e016 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 10 Dec 2024 15:42:46 -0800 Subject: [PATCH 1/2] Fixing issues causing build break when -DLLVM_ENABLE_MODULES

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
@@ -14,8 +14,6 @@ #ifndef CLANG_SUPPORT_COMPILER_H #define CLANG_SUPPORT_COMPILER_H -#include "llvm/Support/Compiler.h" qiongsiwu wrote: Thanks! Fixed! https://github.com/llvm/llvm-project/pull/119473 ___ cfe-commi

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/119473 >From 06ae1ba1222f09e35ed428bcd6da91438b15e016 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 10 Dec 2024 15:42:46 -0800 Subject: [PATCH 1/3] Fixing issues causing build break when -DLLVM_ENABLE_MODULES

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
@@ -2,6 +2,7 @@ set(LLVM_LINK_COMPONENTS OrcShared OrcTargetProcess Support + Core qiongsiwu wrote: Code is revised to avoid adding the Core dependency. https://github.com/llvm/llvm-project/pull/119473 ___ c

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu ready_for_review https://github.com/llvm/llvm-project/pull/119473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-10 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu converted_to_draft https://github.com/llvm/llvm-project/pull/119473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-11 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/119473 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][Modules] Fixing Build Breaks When -DLLVM_ENABLE_MODULES=ON (PR #119473)

2024-12-10 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/119473 A few recent changes are causing build breaks when `-DLLVM_ENABLE_MODULES=ON` (such as 834dfd23155351c9885eddf7b9664f7697326946 and 7dfdca1961aadc75ca397818bfb9bd32f1879248). This PR makes the required upda

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-16 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/119908 >From 63c424414c1814ec9b4c3c5a459bfe1be684586d Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 13 Dec 2024 09:41:41 -0800 Subject: [PATCH 1/2] Fix parsing :: in method parameter type. --- clang/lib/Pars

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/119908 >From 63c424414c1814ec9b4c3c5a459bfe1be684586d Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 13 Dec 2024 09:41:41 -0800 Subject: [PATCH 1/4] Fix parsing :: in method parameter type. --- clang/lib/Pars

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-18 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: The Objective-C test is modified to contain valid code with `::` to include @vsapsai 's suggestion . https://github.com/llvm/llvm-project/pull/119908/files#diff-0c0e8844905a75c581903811a694e614f49b2945e2254a76bb5a215443028554R11 https://github.com/llvm/llvm-project/pull/119908

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/119908 >From 63c424414c1814ec9b4c3c5a459bfe1be684586d Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 13 Dec 2024 09:41:41 -0800 Subject: [PATCH 1/4] Fix parsing :: in method parameter type. --- clang/lib/Pars

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-18 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Thanks for the feedback everyone! The PR is updated to address the review comments. - A test is added to cover Objective-C++. https://github.com/llvm/llvm-project/pull/119908/files#diff-7f1cce2d0397139fc73d3615c8249ac9530082aa707868c0e921f53daf594384R1 I am not sure if this

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-18 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/119908 >From 63c424414c1814ec9b4c3c5a459bfe1be684586d Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 13 Dec 2024 09:41:41 -0800 Subject: [PATCH 1/3] Fix parsing :: in method parameter type. --- clang/lib/Pars

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-17 Thread Qiongsi Wu via cfe-commits
@@ -,8 +,15 @@ bool Parser::TryAnnotateTypeOrScopeTokenAfterScopeSpec( } } - if (SS.isEmpty()) + if (SS.isEmpty()) { +if (getLangOpts().ObjC && !getLangOpts().CPlusPlus && qiongsiwu wrote: Good question. The reason I added the guard for Ob

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-13 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-13 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/119908 The parser hangs when processing method parameters with types prefixed by `::`. For example, ``` - (instancetype)init:(::A *) foo; ``` The parser should not hang, and it should emit an error. This PR impleme

[clang] [clang][ObjectiveC] Fix Parsing Method Parameter Types with the `::` Prefix (PR #119908)

2024-12-13 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: This fix tripped some tests in `libc++`. I am investigating. https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing Types with the `::` Optional Scope Specifier (PR #119908)

2024-12-20 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Gentle ping for review. Thanks so much! https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing the `::` Optional Scope Specifier (PR #119908)

2024-12-20 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing the `::` Optional Scope Specifier (PR #119908)

2024-12-20 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/119908 >From 63c424414c1814ec9b4c3c5a459bfe1be684586d Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 13 Dec 2024 09:41:41 -0800 Subject: [PATCH 1/4] Fix parsing :: in method parameter type. --- clang/lib/Pars

[clang] [clang][ObjectiveC] Fix Parsing the `::` Optional Scope Specifier (PR #119908)

2024-12-20 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ObjectiveC] Fix Parsing the `::` Optional Scope Specifier (PR #119908)

2024-12-20 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/119908 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2025-01-22 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: The `PrerequisiteModulesTests.ModuleWithDepTest`s this PR added seem to produce errors when scanning model dependencies, and warns that `-c` is not used during compilation, when the tests are run on macOS. ``` $ ./tools/clang/tools/extra/clangd/unittests/ClangdTests --gtest_

[clang-tools-extra] [clangd] [C++20] [Modules] Introduce initial support for C++20 Modules (PR #66462)

2025-01-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > The scanning failure is not expected and the ignored unused argument for -c > is more or less expected. > And we'd better fix them in clangd instead of changing the test since the > test mimics actual compilation databases. Thanks! I will open a Github issue. https://gith

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-01-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu converted_to_draft https://github.com/llvm/llvm-project/pull/124786 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-01-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/124786 >From 7060564de1bb6062639f4b4839fa17958f212755 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 27 Jan 2025 16:44:30 -0800 Subject: [PATCH 1/2] Initial implementation of clang modules current working dire

[clang] [clang module] Current Working Directory Pruning (PR #124786)

2025-01-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/124786 When computing the context hash, `clang` always includes the compiler's working directory. This can lead to situations when the only difference between two compilations is the working directory, different mod

[clang] [Dependency Scanning] Teach `DependencyScanningTool::getModuleDependencies` to Process a List of Module Names (PR #129915)

2025-03-20 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/129915 >From 7f29cb0c9e422f00ce5b6b26af8ebfb228b59830 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 5 Mar 2025 11:16:38 -0800 Subject: [PATCH 1/3] Changing DependencyScanningTool::getModuleDependencies to tak

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-10 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/134698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Fix the Size of `RecordDecl`'s `BitCodeAbbrevOp` (PR #133500)

2025-03-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/133500 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Modules] Fix the Size of `RecordDecl`'s `BitCodeAbbrevOp` (PR #133500)

2025-03-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/133500 https://github.com/llvm/llvm-project/pull/102040/files#diff-125f472e690aa3d973bc42aa3c5d580226c5c47661551aca2889f960681aa64dR2477 added 1 bit to `RecordDecl`'s serialization format, but did not increment its

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-07 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/134698 55323ca6c8b9d21d85591f3499b299b62463321f implemented negative caching of directories. The implementation may be too aggressive in certain cases, and may lead to file not found errors even if the files exist o

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-07 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: To be clear, this PR is basically cherry-picking https://github.com/swiftlang/llvm-project/pull/9076, but we are only taking what is necessary to fix our problem at the moment. I updated the description to reflect this. > What does temporarily mean here? Is it until the proj

[clang] [clang][modules] Dependency Scanning: Temporarily Turn Off Negative Directory Caching (PR #134698)

2025-04-07 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > AFAICT that patch special-cased for framework directories while this one > disables much more. Is that not the case? Oh sorry I misspoke - it is not the case that skipping framework negative caching that fixed the problem. It is the _other_ case in `shouldCacheStatFailures`

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/135703 >From d4b1210c16b4fccc6faa9445bee457a1e330a025 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Apr 2025 16:49:07 -0700 Subject: [PATCH 1/6] Initial commit. --- .../DependencyScanningFilesystem.h

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-17 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,33 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +std::vector +DependencyScanningFilesystemSharedCache::getInvalidNegativeStatCachedPaths( +llvm::vfs::FileSystem &UnderlyingFS) const { + // Iterate thr

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-17 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache:: +diagnoseInvalidNegativeStatCachedPaths( qiongsiwu wrote: Good point! Fixed. https://

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-18 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache:: +diagnoseInvalidNegativeStatCachedPaths( +std::vector &InvalidPaths, qiongsiwu w

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-18 Thread Qiongsi Wu via cfe-commits
@@ -108,6 +108,32 @@ DependencyScanningFilesystemSharedCache::getShardForUID( return CacheShards[Hash % NumShards]; } +void DependencyScanningFilesystemSharedCache:: +diagnoseInvalidNegativeStatCachedPaths( +std::vector &InvalidPaths, +llvm::vfs::FileSyst

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-14 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/135703 We have had numerous situations where the negatively stat cached paths are invalidated during the build, and such invalidations lead to build errors. This PR adds an API to diagnose such cases. `DependencyS

[clang] [clang][Dependency Scanning] Adding an API to Diagnose Invalid Negative Stat Cache Entries (PR #135703)

2025-04-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/135703 >From d4b1210c16b4fccc6faa9445bee457a1e330a025 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Mon, 14 Apr 2025 16:49:07 -0700 Subject: [PATCH 1/5] Initial commit. --- .../DependencyScanningFilesystem.h

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-28 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Hi @AaronBallman ! Again I appreciate your suggestion. I ran into some complexities when adding a test. It is precisely that this is a very internal API that is giving me some trouble. Since `clang/tools/libclang/CXString.h` is not an exposed header, I cannot really even add i

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > Where is this new API expected to be used? An intended use can be found here https://github.com/swiftlang/llvm-project/pull/10524, where we try to pass up a collection of strings to the user, and we try not to create copies of the strings. https://github.com/llvm/llvm-pro

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu closed https://github.com/llvm/llvm-project/pull/136773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-24 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Closing this PR since we will have the changes in https://github.com/swiftlang/llvm-project/pull/10524. https://github.com/llvm/llvm-project/pull/136773 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/c

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Dependency Scanning] Report Exported Modules during Scanning (PR #137421)

2025-04-25 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Note to reviewers: `clang/test/ClangScanDeps/export.c` is the new test. The rest of the test changes are updates. https://github.com/llvm/llvm-project/pull/137421 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://list

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/136773 >From 7f39ebcc34fe3f40c2554ff7fa93baca5b4634a0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 22 Apr 2025 14:17:15 -0700 Subject: [PATCH 1/5] Adding CXStringSet *createSet that takes a vector of StringR

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector &Strings) { +template +static CXStringSet *createSetImpl(ArrayRef Strings) { CXStringSet *Set = new CXStringSet; Set->Count = Strings.size(); S

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
@@ -107,15 +107,28 @@ CXString createCXString(CXStringBuf *buf) { return Str; } -CXStringSet *createSet(const std::vector &Strings) { +template +static CXStringSet *createSetImpl(ArrayRef Strings) { qiongsiwu wrote: Ah yes this is good to keep in mind. I r

[clang] [clang] Adding an API to create a `CXStringSet` from a Vector of `StringRef`s (PR #136773)

2025-04-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/136773 >From 7f39ebcc34fe3f40c2554ff7fa93baca5b4634a0 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Tue, 22 Apr 2025 14:17:15 -0700 Subject: [PATCH 1/4] Adding CXStringSet *createSet that takes a vector of StringR

<    1   2   3   >