[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] [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 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-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 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
@@ -,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 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 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 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 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] [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-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-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 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
@@ -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/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
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
@@ -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-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] [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] [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-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-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
@@ -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/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-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-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-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 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
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
@@ -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-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
@@ -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
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 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] [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-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-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 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-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
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] [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] Revert `#pragma mc_func` check (PR #102919)

2024-08-12 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: /cherry-pick 123b6fc https://github.com/llvm/llvm-project/pull/102919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AIX] Revert `#pragma mc_func` check (PR #102919)

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

[clang] [AIX] Revert `#pragma mc_func` check (PR #102919)

2024-08-12 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu milestoned https://github.com/llvm/llvm-project/pull/102919 ___ 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-12 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: https://github.com/llvm/llvm-project/pull/102919 is created to revert this feature now. I will review our discussion and consider an improved implementation. Thanks again for the input and discussion! https://github.com/llvm/llvm-project/pull/101336 __

[clang] [AIX] Revert `#pragma mc_func` check (PR #102919)

2024-08-12 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/102919 https://github.com/llvm/llvm-project/pull/99888 added a specific diagnostic for `#pragma mc_func` on AIX. There are some disagreements on: 1. If the check should be on by default. Leaving the check off by def

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

2024-08-12 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > > Thank you! However, we're getting pretty late in the release cycle and so > > I'd like to see this backed out of 19.x ASAP (and given the direction the > > discussion is going, I think it should be backed out of main as well). > > @qiongsiwu will you be able to get these c

[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] [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] 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: @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] [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-07-31 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu edited 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-07-31 Thread Qiongsi Wu via cfe-commits
@@ -562,7 +562,7 @@ void AIX::addClangTargetOptions( CC1Args.push_back("-fno-sized-deallocation"); if (Args.hasFlag(options::OPT_ferr_pragma_mc_func_aix, - options::OPT_fno_err_pragma_mc_func_aix, false)) + options::OPT_fno_err_pragma_

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

2024-07-31 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/101336 >From e823d1e7eb3357fc5c15b614ac5fd94d331ac630 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 31 Jul 2024 10:12:59 -0400 Subject: [PATCH 1/2] Turn on mc_func check by default. --- clang/include/clang/D

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

2024-07-31 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > My preference is for this to be on-by-default (then it shows its utility), > and I'd like to see those changes in the 19.x release (which means we'd need > to turn this around fairly quickly as we've already put out rc1). Sounds good! Thanks again for your input @AaronBallma

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

2024-07-31 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/101336 https://github.com/llvm/llvm-project/pull/99888 added a check (and corresponding options) to flag uses of `#pragma mc_func` on AIX. This PR turns on the check by default. >From e823d1e7eb3357fc5c15b614ac5f

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

2024-07-29 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > I'm wondering why this option isn't on by default for AIX. I don't think > anyone is going to know to turn this option on, whereas if it's on by > default, users have to make a decision as to how to proceed, which seems like > the better default. Yes I agree. This is at th

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

2024-07-26 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > Is that not the case? It does not seem so. See [here](https://godbolt.org/#g:!((g:!((g:!((h:codeEditor,i:(filename:'1',fontScale:14,fontUsePx:'0',j:1,lang:___c,selection:(endColumn:40,endLineNumber:8,positionColumn:40,positionLineNumber:8,selectionStartColumn:40,selectionSta

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

2024-07-25 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > this same logic can be applied to almost every pragma we don't support, but > we don't want to add special handlers for every pragma we don't support. > It doesn't seem particularly dangerous to ignore this pragma because ignoring > it means no symbol is generated for the sy

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

2024-07-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Thanks for chiming in and describing your concern @AaronBallman ! We think this feature should be in the community clang for the following reasons. 1. It is useful for a community `clang` user on AIX to be aware of uses of `#pragma mc_func` in their code. The community `cla

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

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

[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-tools-extra] [clang] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: https://github.com/llvm/llvm-project/pull/79150 is posted to avoid calling `_llvm_orderfile_dump()` in the test. https://github.com/llvm/llvm-project/pull/78285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.ll

[clang-tools-extra] [clang] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: @w2yehia and I discussed, and we will remove `__llvm_orderfile_dump` from the main test for now. https://github.com/llvm/llvm-project/pull/78285 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang-tools-extra] [clang] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: @w2yehia I think a reasonable way to go forward is to remove the testing of `__llvm_orderfile_dump` from the main test, and add a separate test that runs only on Darwin. What do you think? https://github.com/llvm/llvm-project/pull/78285 _

[clang] [compiler-rt] [clang-tools-extra] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-23 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > This patch broke both the > [Solaris/sparcv9](https://lab.llvm.org/buildbot/#/builders/72/builds/2015) > and [Solaris/amd64](https://lab.llvm.org/staging/#/builders/94/builds/394) > buildbots. > > If it really requires recent `lld`, this is guaranteed to not work: `lld` >

[compiler-rt] [clang-tools-extra] [clang] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

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

[compiler-rt] [clang-tools-extra] [clang] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-22 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Hi @vitalybuka ! I am landing this PR. The precommit CI failures do not seem to related to changes in this PR. Please let me know if you see failures and I will revert. Thanks so much! https://github.com/llvm/llvm-project/pull/78285 ___

[compiler-rt] [clang] [clang-tools-extra] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-22 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Thanks for to comments/suggestions @w2yehia ! The test is modified so that 1. The profile files are generated. 2. The test does not support Windows to avoid known limitations on Windows. https://github.com/llvm/llvm-project/pull/78285 _

[clang] [clang-tools-extra] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-22 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/78285 >From ebae7155814ad83ebd1a0159b86550c14c72b2b6 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 12 Jan 2024 11:45:50 -0500 Subject: [PATCH 1/3] Reland https://github.com/llvm/llvm-project/pull/76471 --- .

[clang] [clang-tools-extra] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-19 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Ok I think I have a good theory on why these tests are failing. Most likely the test machine does not have the latest `lld` during the test. If we build `lld` together with the project, these tests pass. https://github.com/llvm/llvm-project/pull/78285

[clang-tools-extra] [clang] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-17 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: It seems that either the precommit CI has some problems, or there are existing `compiler-rt` breakages. https://github.com/llvm/llvm-project/pull/78037 is also failing the same test cases. The changes in #78037 does not look harmful either. I took a brief look at the current b

[compiler-rt] [clang] [clang-tools-extra] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-17 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/78285 >From ebae7155814ad83ebd1a0159b86550c14c72b2b6 Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 12 Jan 2024 11:45:50 -0500 Subject: [PATCH 1/2] Reland https://github.com/llvm/llvm-project/pull/76471 --- .

[clang-tools-extra] [compiler-rt] [clang] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-16 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > thanks for the fix! > > One test `Clang :: Preprocessor/init.c` failed > (https://lab.llvm.org/buildbot/#/builders/74/builds/24843) and the error is > due to mismatched macros (if I'm reading correctly wants `__LONG_LONG_MAX__` > right after `__LLONG_WIDTH__` but sees `__LL

[clang] [clang-tools-extra] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-16 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/78285 >From d64fabb3911ae6990a87729a2477df32c837fb1f Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Fri, 12 Jan 2024 11:45:50 -0500 Subject: [PATCH 1/2] Reland https://github.com/llvm/llvm-project/pull/76471 --- .

[clang] [clang-tools-extra] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

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

[clang] [clang-tools-extra] [compiler-rt] [PGO] Reland PGO's Counter Reset and File Dumping APIs #76471 (PR #78285)

2024-01-16 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu created https://github.com/llvm/llvm-project/pull/78285 https://github.com/llvm/llvm-project/pull/76471 caused buildbot failure on Windows. For more details, see https://github.com/llvm/llvm-project/issues/77546. This PR revises the test and relands https://gith

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2024-01-09 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > Sometimes godbolt output (like https://godbolt.org/z/MxbjcnanW) could be > faster and more convenient (e.g., there is no need to get windows executable > to for debugging, only LLVM IR is needed). Thanks for the pointer! Yup godbolt can indeed reproduce IR quite well. https

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2024-01-09 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: > Breaks https://lab.llvm.org/buildbot/#/builders/127/builds/60635 Please fix > or revert. Thanks for reporting the problem @vitalybuka ! I don't have a Windows machine to reproduce the issue. It is not clear to me how the IR can contain names like `"??_C@_0BA@MIKMMAII@rawpr

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

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

[compiler-rt] [clang] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2024-01-09 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: Landing this PR. It seems that the format error is not caused by any changes in this PR. https://github.com/llvm/llvm-project/pull/76471 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/l

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2024-01-03 Thread Qiongsi Wu via cfe-commits
qiongsiwu wrote: I realized one problem during testing IRPGO (thanks again for the suggestion @minglotus-6 !). A functions control flow may change between `-fprofile-generate` and `-fprofile-use` when we make use of definitions in the new header. For example, one may have the following code:

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2024-01-03 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/76471 >From 6c9381ec324595947237bd25642b03ab40b6a4df Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 27 Dec 2023 13:05:01 -0500 Subject: [PATCH 01/13] Initial commit --- .../ExpandModularHeadersPPCallbacks.cpp

[clang] [compiler-rt] [clang-tools-extra] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2024-01-02 Thread Qiongsi Wu via cfe-commits
https://github.com/qiongsiwu updated https://github.com/llvm/llvm-project/pull/76471 >From 6c9381ec324595947237bd25642b03ab40b6a4df Mon Sep 17 00:00:00 2001 From: Qiongsi Wu Date: Wed, 27 Dec 2023 13:05:01 -0500 Subject: [PATCH 01/12] Initial commit --- .../ExpandModularHeadersPPCallbacks.cpp

[clang] [clang-tools-extra] [compiler-rt] [PGO] Exposing PGO's Counter Reset and File Dumping APIs (PR #76471)

2024-01-02 Thread Qiongsi Wu via cfe-commits
@@ -0,0 +1,38 @@ +// RUN: %clang_profgen %s --target=ppc64le-unknown-linux-gnu -S \ +// RUN:-emit-llvm -o - | FileCheck %s --check-prefix=PROFGEN +// RUN: %clang_profgen -o %t %s +// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t qiongsiwu wrote: Ah thanks for

  1   2   >