[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] [compiler-rt] [llvm] [openmp] [PGO][Offload] Profile profraw generation for GPU instrumentation #76587 (PR #93365)

2025-02-14 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Hi @EthanLuisMcDonough ! As @dtellenbach noted earlier, this PR is breaking two tests on our bots. Could you fix it as soon as possible? I will come back and revisit by 2pm PST today. If I don't hear back from you, I will revert this PR. Really appreciate your attention to th

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-19 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Thanks @nikic !! In this case, I will revisit this Friday morning PST and see where we are at. https://github.com/llvm/llvm-project/pull/125880 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/ma

[clang] [llvm] [CaptureTracking][FunctionAttrs] Add support for CaptureInfo (PR #125880)

2025-02-19 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: What is the current plan for this PR? Are we still inclined to reland it this week? I would like to reduce the downstream churns it is causing. If we intend to reland it soon, I will not revert everything downstream that is related. https://github.com/llvm/llvm-project/pull/1

[clang] [Modules] Add `clang/Lex/HLSLRootSignatureTokenKinds.def` to clang's `modulemap` (PR #127839)

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

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/3] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Or maybe it makes more sense to set the working directory to SYSROOT, or to the input header's path? https://github.com/llvm/llvm-project/pull/128446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-23 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/128446 This PR explicitly sets `DebugCompilationDir` to the system's root directory if it is safe to ignore the current working directory. This fixes a problem where a PCM file's embedded debug information can lead

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Note to reviewers: This fixes rdar://145249881, but I'd like to get some input on two things. 1. I am not sure if it is a good idea to always set `DebugCompilationDir` to root. I chose it because I think it is safe and all systems should have the root directory. I am all ear

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

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

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-24 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/2] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

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

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

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

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

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

[clang] [Modules] Add `clang/Lex/HLSLRootSignatureTokenKinds.def` to clang's `modulemap` (PR #127839)

2025-02-19 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/127839 b41b86a907f653f79bab10d4c80b3a41d146c71b added a new textual header `clang/Lex/HLSLRootSignatureTokenKinds.def` but did not add it to `clang`'s module map. This causes build failure when building llvm with `

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-26 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Ping for review. Thanks so much! https://github.com/llvm/llvm-project/pull/128446 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

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

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/6] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/5] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/7] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); if (CWD && !IgnoreCWD) HashBuilder.add(*CWD); - else + else { FSOpts.WorkingDir.clear(); +auto &CGOpts = const_cast(CI.getCo

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/128446 >From c8eda8b9192cf4bdad4121063336beeb14cbe689 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Sun, 23 Feb 2025 16:47:18 -0800 Subject: [PATCH 1/4] Initial commit --- .../DependencyScanning/ModuleDepCollecto

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); qiongsiwu wrote: I refactored the code a bit in this PR and we don't use `const_cast` any more. https://github.com/llvm/llv

[clang] [clang modules] Setting `DebugCompilationDir` when it is safe to ignore current working directory (PR #128446)

2025-02-25 Thread Qiongsi Wu via cfe-commits
@@ -492,8 +492,23 @@ static std::string getModuleContextHash(const ModuleDeps &MD, auto &FSOpts = const_cast(CI.getFileSystemOpts()); if (CWD && !IgnoreCWD) HashBuilder.add(*CWD); - else + else { FSOpts.WorkingDir.clear(); +auto &CGOpts = const_cast(CI.getCo

[clang] [compiler-rt] [Clang][PGO] Fix profile function visibility bug (PR #127257)

2025-02-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu approved this pull request. Thanks Ethan! LGTM! https://github.com/llvm/llvm-project/pull/127257 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2025-03-10 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/2] Changing DependencyScanningTool::getModuleDependencies to tak

<    1   2   3   >