[flang] [clang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-22 Thread Brad Smith via cfe-commits
brad0 wrote: @MaskRay Still could use some input about the ```CLOption, DXCOption``` part. Same with 34e4e5eb70818fca90574beb8f5617e27bfac138. https://github.com/llvm/llvm-project/pull/72601 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][AST][ASTMerge] prevent AST nodes from being deallocated early (PR #73096)

2023-11-22 Thread Chuanqi Xu via cfe-commits
ChuanqiXu9 wrote: > Debug the https://github.com/llvm/llvm-project/issues/72783 can prove it. > Address interval (local from 0x3a9a00 to 0x3aaa00) allocated by allocator > contains a IdentifierInfo variable (local address:0x3aa190) whose address is > freed early. In this case, it looks

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-22 Thread Omair Javaid via cfe-commits
omjavaid wrote: This change appears to have broken several clang tests on following buildbots: https://lab.llvm.org/buildbot/#/builders/245 https://lab.llvm.org/buildbot/#/builders/188 https://lab.llvm.org/buildbot/#/builders/186 https://lab.llvm.org/buildbot/#/builders/183 Kindly fix issues if

[clang] clang/CodeGen/RISCV: test lowering of math builtins (PR #71399)

2023-11-22 Thread Ramkumar Ramachandra via cfe-commits
https://github.com/artagnon closed https://github.com/llvm/llvm-project/pull/71399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 083a539 - clang/CodeGen/RISCV: test lowering of math builtins (#71399)

2023-11-22 Thread via cfe-commits
Author: Ramkumar Ramachandra Date: 2023-11-23T07:39:32Z New Revision: 083a53971758c6f9bbd448eeb9c5d839661e3f68 URL: https://github.com/llvm/llvm-project/commit/083a53971758c6f9bbd448eeb9c5d839661e3f68 DIFF:

[clang] [clang][ExprConst] allow single element access of vector object to be constant expression (PR #72607)

2023-11-22 Thread Yuanfang Chen via cfe-commits
https://github.com/yuanfang-chen updated https://github.com/llvm/llvm-project/pull/72607 >From b7d7c5fc70ffb792f67d007ec1bd71bcaed868fc Mon Sep 17 00:00:00 2001 From: Yuanfang Chen Date: Fri, 17 Nov 2023 03:16:38 + Subject: [PATCH] [clang][ExprConst] allow single element access of vector

[clang] clang/CodeGen/RISCV: test lowering of math builtins (PR #71399)

2023-11-22 Thread Craig Topper via cfe-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/71399 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Add the --gcc-triple option (PR #73214)

2023-11-22 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 7f18f9a28c73490d09938af1fdb1908eb333a62c 72f6f3a611f237f71ce02cfb79620257a9e2d827 --

[clang] [Driver] Add the --gcc-triple option (PR #73214)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-driver Author: Tom Stellard (tstellar) Changes When --gcc-triple is used, the driver will search for the 'best' gcc installation that has the given triple. This is useful for distributions that want clang to use a

[clang] [Driver] Add the --gcc-triple option (PR #73214)

2023-11-22 Thread Tom Stellard via cfe-commits
https://github.com/tstellar created https://github.com/llvm/llvm-project/pull/73214 When --gcc-triple is used, the driver will search for the 'best' gcc installation that has the given triple. This is useful for distributions that want clang to use a specific gcc triple, but do not want to

[clang-tools-extra] [clangd] Add includes from source to non-self-contained headers (PR #72479)

2023-11-22 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: A somewhat narrow use case where this approach might be workable is unity builds (groups of source files batched together to be compiled as a single translation unit for build performance). That's a situation where the non-self-contained files of interest (the

[clang] [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (PR #71677)

2023-11-22 Thread via cfe-commits
https://github.com/serge-sans-paille closed https://github.com/llvm/llvm-project/pull/71677 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0d2860b - [clang] Avoid memcopy for small structure with padding under -ftrivial-auto-var-init (#71677)

2023-11-22 Thread via cfe-commits
Author: serge-sans-paille Date: 2023-11-23T05:38:14Z New Revision: 0d2860b795879f4dd152963b52f969b53b136899 URL: https://github.com/llvm/llvm-project/commit/0d2860b795879f4dd152963b52f969b53b136899 DIFF: https://github.com/llvm/llvm-project/commit/0d2860b795879f4dd152963b52f969b53b136899.diff

[flang] [clang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-22 Thread Brad Smith via cfe-commits
brad0 wrote: > It would be helpful if you could clearly distinguish between the two opposite > cases that are currently being tested in "dynamic-linker.f90". Ok, done. https://github.com/llvm/llvm-project/pull/72601 ___ cfe-commits mailing list

[flang] [clang] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib (PR #72601)

2023-11-22 Thread Brad Smith via cfe-commits
https://github.com/brad0 updated https://github.com/llvm/llvm-project/pull/72601 >From da17459071b039e9da0f53ae5e68ab1c3aaa13e4 Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Wed, 15 Nov 2023 14:24:11 -0500 Subject: [PATCH] [flang][Driver] Support -nodefaultlibs, -nostartfiles and -nostdlib

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-22 Thread Chuanqi Xu via cfe-commits
@@ -38,9 +39,52 @@ Task coro_create() { co_return; } -// CHECK-LABEL: define{{.*}} ptr @_Z11coro_createv( +// CHECK-LABEL: define{{.*}} ptr @_ZN9can_throw11coro_createEv( // CHECK: init.ready: // CHECK-NEXT: store i1 true, ptr {{.*}} -// CHECK-NEXT: call void

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-22 Thread Chuanqi Xu via cfe-commits
@@ -129,7 +130,14 @@ static SmallString<32> buildSuspendPrefixStr(CGCoroData , AwaitKind Kind) { return Prefix; } -static bool memberCallExpressionCanThrow(const Expr *E) { +static bool ResumeExprCanThrow(const CoroutineSuspendExpr ) { + const Expr *E = S.getResumeExpr();

[clang] [Clang] CGCoroutines skip emitting try block for value returning `noexcept` init `await_resume` calls (PR #73160)

2023-11-22 Thread Chuanqi Xu via cfe-commits
@@ -12,9 +12,10 @@ #include "CGCleanup.h" #include "CodeGenFunction.h" -#include "llvm/ADT/ScopeExit.h" +#include "clang/AST/ExprCXX.h" #include "clang/AST/StmtCXX.h" #include "clang/AST/StmtVisitor.h" +#include "llvm/ADT/ScopeExit.h" ChuanqiXu9 wrote: Is

[clang] [clang] Add missing LinkageSpec case to getCursorKindForDecl (PR #72401)

2023-11-22 Thread Shivam Gupta via cfe-commits
xgupta wrote: Does this fix https://github.com/llvm/llvm-project/issues/56687? https://github.com/llvm/llvm-project/pull/72401 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add partial-inlining options (PR #73210)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Jolyon (Jolyon0202) Changes Adaptation of adding -fpartial-inlining and -fno-partial-inlining options with GCC. --- Full diff: https://github.com/llvm/llvm-project/pull/73210.diff 3 Files Affected: - (modified)

[clang] [clang] Add partial-inlining options (PR #73210)

2023-11-22 Thread via cfe-commits
https://github.com/Jolyon0202 created https://github.com/llvm/llvm-project/pull/73210 Adaptation of adding -fpartial-inlining and -fno-partial-inlining options with GCC. >From f525387d65a1cdee561f919b3351b528bd44a535 Mon Sep 17 00:00:00 2001 From: Jian Yang Date: Thu, 23 Nov 2023 12:54:52

[llvm] [clang] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/73207 >From f8d61499c92d98e3c29027f0137e9d2f734d39c0 Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 22 Nov 2023 16:14:14 -0800 Subject: [PATCH] ms inline asm: Fix {call,jmp} fptr

[llvm] [clang] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/73207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-22 Thread Fangrui Song via cfe-commits
MaskRay wrote: I should confess that I don't understand the mechanism well. I've tried hard to write a good description but I cannot improve the comments in `CreateMemForMSInlineAsm`. https://github.com/llvm/llvm-project/pull/73207 ___ cfe-commits

[llvm] [clang] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Fangrui Song (MaskRay) Changes https://reviews.llvm.org/D151863 (2023-05) removed `BaseReg = BaseReg ? BaseReg : 1` (introduced in commit 175d0aeef3725ce17032e9ef76e018139f2f52f0 (2013)) and caused a regression: ensuring a non-zero

[llvm] [clang] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay edited https://github.com/llvm/llvm-project/pull/73207 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay updated https://github.com/llvm/llvm-project/pull/73207 >From 5b74d57faf8ab5fae4d9512517d6ec4d888a6ecd Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Wed, 22 Nov 2023 16:14:14 -0800 Subject: [PATCH] ms inline asm: Fix {call,jmp} fptr

[llvm] [clang] ms inline asm: Fix {call,jmp} fptr (PR #73207)

2023-11-22 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay created https://github.com/llvm/llvm-project/pull/73207 https://reviews.llvm.org/D151863 (2023-05) removed `BaseReg = BaseReg ? BaseReg : 1` (introduced in commit 175d0aeef3725ce17032e9ef76e018139f2f52f0 (2013)) and caused a regression: ensuring a non-zero `BaseReg`

[clang] [RISCV] Use Float type instead of Half type for Fixed RVV vector type mangling (PR #73091)

2023-11-22 Thread Jianjian Guan via cfe-commits
https://github.com/jacquesguan closed https://github.com/llvm/llvm-project/pull/73091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2eb9c64 - [RISCV] Use Float type instead of Half type for Fixed RVV vector type mangling (#73091)

2023-11-22 Thread via cfe-commits
Author: Jianjian Guan Date: 2023-11-23T11:08:27+08:00 New Revision: 2eb9c649f0971aaa05404764d74ee7fff15b83ed URL: https://github.com/llvm/llvm-project/commit/2eb9c649f0971aaa05404764d74ee7fff15b83ed DIFF: https://github.com/llvm/llvm-project/commit/2eb9c649f0971aaa05404764d74ee7fff15b83ed.diff

[clang] [CUDA][HIP] allow trivial ctor/dtor in device var init (PR #73140)

2023-11-22 Thread via cfe-commits
alexfh wrote: Thank you! https://github.com/llvm/llvm-project/pull/73140 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Support `fgetc` in StreamChecker (PR #72627)

2023-11-22 Thread Ben Shi via cfe-commits
https://github.com/benshi001 updated https://github.com/llvm/llvm-project/pull/72627 >From 3032cafc2ad43baeeea14de318cd82026b96d035 Mon Sep 17 00:00:00 2001 From: Ben Shi Date: Fri, 17 Nov 2023 17:22:10 +0800 Subject: [PATCH] [clang][analyzer] Support `fgetc` in StreamChecker ---

[clang] [CUDA][HIP] allow trivial ctor/dtor in device var init (PR #73140)

2023-11-22 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Could you first land the two reverts > ([511cecf](https://github.com/llvm/llvm-project/commit/511cecff7f76958ebfe713189bc106615763b64a) > and > [e9a8e90](https://github.com/llvm/llvm-project/commit/e9a8e906d4c14eb4b317a7420b9bba3dc7321ba2)) > and then have the third commit

[clang] [CUDA][HIP] allow trivial ctor/dtor in device var init (PR #73140)

2023-11-22 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu updated https://github.com/llvm/llvm-project/pull/73140 >From 2dc8bda89483ee655e7a76deac19b8ea9e463c7b Mon Sep 17 00:00:00 2001 From: "Yaxun (Sam) Liu" Date: Wed, 22 Nov 2023 10:02:59 -0500 Subject: [PATCH] [CUDA][HIP] allow trivial ctor/dtor in device var init

[clang] [LinkerWrapper] Accept some needed lld-link linker arguments for COFF targets (PR #72889)

2023-11-22 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 closed https://github.com/llvm/llvm-project/pull/72889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b16f765 - [LinkerWrapper] Accept some needed lld-link linker arguments for COFF targets (#72889)

2023-11-22 Thread via cfe-commits
Author: Joseph Huber Date: 2023-11-22T20:23:23-06:00 New Revision: b16f765d6fec56a07aecd2056bb1760a9e72d64f URL: https://github.com/llvm/llvm-project/commit/b16f765d6fec56a07aecd2056bb1760a9e72d64f DIFF: https://github.com/llvm/llvm-project/commit/b16f765d6fec56a07aecd2056bb1760a9e72d64f.diff

[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-libunwind Author: Heejin Ahn (aheejin) Changes Wasm doesn't use that file; Wasm does not allow access of system registers and those functionalities are provided from the VM. Wasm only uses

[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-22 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/73196 Wasm doesn't use that file; Wasm does not allow access of system registers and those functionalities are provided from the VM. Wasm only uses

[clang] 6b3470b - Revert "[CUDA][HIP] make trivial ctor/dtor host device (#72394)"

2023-11-22 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-11-22T21:20:53-05:00 New Revision: 6b3470b4b83195aeeda60b101e8d3bf8800c321c URL: https://github.com/llvm/llvm-project/commit/6b3470b4b83195aeeda60b101e8d3bf8800c321c DIFF:

[clang] 22078bd - Revert "[CUDA][HIP] ignore implicit host/device attr for override (#72815)"

2023-11-22 Thread Yaxun Liu via cfe-commits
Author: Yaxun (Sam) Liu Date: 2023-11-22T21:04:55-05:00 New Revision: 22078bd9f6842411aac2b75196975d68a817a358 URL: https://github.com/llvm/llvm-project/commit/22078bd9f6842411aac2b75196975d68a817a358 DIFF:

[clang] [CUDA][HIP] allow trivial ctor/dtor in device var init (PR #73140)

2023-11-22 Thread Yaxun Liu via cfe-commits
yxsamliu wrote: > Could you first land the two reverts > ([511cecf](https://github.com/llvm/llvm-project/commit/511cecff7f76958ebfe713189bc106615763b64a) > and > [e9a8e90](https://github.com/llvm/llvm-project/commit/e9a8e906d4c14eb4b317a7420b9bba3dc7321ba2)) > and then have the third commit

[clang] [CUDA][HIP] allow trivial ctor/dtor in device var init (PR #73140)

2023-11-22 Thread via cfe-commits
alexfh wrote: Could you first land the two reverts (511cecff7f76958ebfe713189bc106615763b64a and e9a8e906d4c14eb4b317a7420b9bba3dc7321ba2) and then have the third commit properly reverted? @Artem-B may be unavailable for a few more days, but we'd like a fix/revert to land very soon.

[clang] [clang] Refactor TBAA Base Info construction (PR #70499)

2023-11-22 Thread Nathan Sidwell via cfe-commits
urnathan wrote: I'm going to break this apart, as I've realized this has conflated two separate problems. https://github.com/llvm/llvm-project/pull/70499 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread Owen Pan via cfe-commits
owenca wrote: After giving more thoughts to this, I think what we really want is `SkipMacroDefinitionBody`, which would format the code below: ``` # define A a. b //comment # define A( x , y ) ( ( x ) + ( y ) ) ``` To the following: ``` #define A a. b // comment #define A(x,

[clang] [clang] fix emitvaarg when struct is null (PR #72624)

2023-11-22 Thread via cfe-commits
Jolyon0202 wrote: @efriedma-quic https://github.com/llvm/llvm-project/pull/72624 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Driver] Default Generic_GCC aarch64_be to -fasynchronous-unwind-tables (PR #72971)

2023-11-22 Thread via cfe-commits
https://github.com/hstk30-hw closed https://github.com/llvm/llvm-project/pull/72971 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] b14f651 - [Driver] Default Generic_GCC aarch64_be to -fasynchronous-unwind-tables (#72971)

2023-11-22 Thread via cfe-commits
Author: dong jianqiang Date: 2023-11-23T09:30:51+08:00 New Revision: b14f651caf4bb507753ffc94db8911bb2e2a7995 URL: https://github.com/llvm/llvm-project/commit/b14f651caf4bb507753ffc94db8911bb2e2a7995 DIFF:

[clang] [clang][analyzer][NFC] Use `*EofVal` instead of constant `-1` (PR #73072)

2023-11-22 Thread Ben Shi via cfe-commits
https://github.com/benshi001 closed https://github.com/llvm/llvm-project/pull/73072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix sorting module headers (PR #73146)

2023-11-22 Thread David Blaikie via cfe-commits
dwblaikie wrote: > Splitting it wouldn't help with bisect, as we would continue having a broken > commit. Not sure I understand - presumably this bug has existed for a while, separate from the qsort issue? So fixing it separately seems good so that patches do one thing clearly - makes it

[clang] [AArch64][SME2] Add multi-vector SEL (x2, x4) ACLE builtins & intrinsics (PR #73188)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dinar Temirbulatov (dtemirbulatov) Changes Add multi-vector SEL (x2, x4) ACLE builtins intrinsics Patch by: David Sherwood david.sherwood@arm.com --- Patch is 114.68 KiB, truncated to 20.00 KiB below, full version:

[clang] [clang] Fix sorting module headers (PR #73146)

2023-11-22 Thread Tulio Magno Quites Machado Filho via cfe-commits
tuliom wrote: > Sorry, I don't quite understand tnhis - but I guess the second field ( > PathRelativeToRootModuleDirectory ) comparison was to address this bug? @dwblaikie Yes. > It'd probably be good to fix that separately, so it can be discussed in more > detail, etc. The commit is

[clang] [clang] Fix sorting module headers (PR #73146)

2023-11-22 Thread Tulio Magno Quites Machado Filho via cfe-commits
tuliom wrote: > Sorry, I don't quite understand tnhis @dwblaikie Would you have any questions? I'd be glad to answer them. https://github.com/llvm/llvm-project/pull/73146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [llvm] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-22 Thread Tom Honermann via cfe-commits
@@ -4282,10 +4300,19 @@ llvm::Constant *CodeGenModule::GetOrCreateMultiVersionResolver(GlobalDecl GD) { // Holds the name of the resolver, in ifunc mode this is the ifunc (which has // a separate resolver). std::string ResolverName = MangledName; - if

[clang-tools-extra] [clang] [llvm] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-22 Thread Tom Honermann via cfe-commits
@@ -4114,8 +4114,26 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) {

[clang] [llvm] [clang-tools-extra] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-22 Thread Tom Honermann via cfe-commits
@@ -16,13 +16,22 @@ // LINUX: @__cpu_model = external dso_local global { i32, i32, i32, [1 x i32] } // LINUX: @__cpu_features2 = external dso_local global [3 x i32] -// LINUX: @internal.ifunc = internal ifunc i32 (), ptr @internal.resolver -// LINUX: @foo.ifunc = weak_odr

[clang-tools-extra] [clang] [llvm] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-22 Thread Tom Honermann via cfe-commits
@@ -4114,8 +4114,26 @@ void CodeGenModule::emitMultiVersionFunctions() { } llvm::Constant *ResolverConstant = GetOrCreateMultiVersionResolver(GD); -if (auto *IFunc = dyn_cast(ResolverConstant)) +if (auto *IFunc = dyn_cast(ResolverConstant)) {

[clang-tools-extra] [clang] [llvm] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-22 Thread Tom Honermann via cfe-commits
@@ -555,6 +555,7 @@ Bug Fixes in This Version Fixes (`#67687 `_) - Fix crash from constexpr evaluator evaluating uninitialized arrays as rvalue. Fixes (`#67317 `_) +- Fix

[clang] [clang-tools-extra] [llvm] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-22 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann requested changes to this pull request. I requested some minor changes. Can we document the `.ifunc` symbols as a deprecated feature? With this change, they will never be referenced except by code compiled by older compiler versions. Maybe plan to deprecate them

[clang-tools-extra] [llvm] [clang] [Clang] Fix linker error for function multiversioning (PR #71706)

2023-11-22 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann edited https://github.com/llvm/llvm-project/pull/71706 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [clang] [llvm] [lld] [flang] [libc] [libcxx] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-x86 Author: David Li (david-xl) Changes 512bit vpbroadcastw is available only with AVX512BW. Avoid lowering BUILD_VEC into vbroard_cast node when the condition is not met. This fixed a crash (see the added new test). --- Full diff:

[llvm] [clang] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Yusra Syeda via cfe-commits
@@ -1026,6 +1030,71 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = mdconst::extract_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Yusra Syeda via cfe-commits
@@ -1026,6 +1030,71 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = mdconst::extract_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Yusra Syeda via cfe-commits
https://github.com/ysyeda updated https://github.com/llvm/llvm-project/pull/68926 >From 78f82bcf33998de0663f4684a64a240f2e97f8a9 Mon Sep 17 00:00:00 2001 From: Yusra Syeda Date: Thu, 12 Oct 2023 16:56:27 -0400 Subject: [PATCH 01/20] This change adds support for the PPA2 section in zOS ---

[clang] [llvm] [SystemZ][z/OS] This change adds support for the PPA2 section in zOS (PR #68926)

2023-11-22 Thread Yusra Syeda via cfe-commits
@@ -1026,6 +1030,78 @@ void SystemZAsmPrinter::emitADASection() { OutStreamer->popSection(); } +static uint32_t getProductVersion(Module ) { + if (auto *VersionVal = cast_or_null( + M.getModuleFlag("zos_product_major_version"))) +return

[llvm] [clang] [AMDGPU] Emit a waitcnt instruction after each memory instruction (PR #68932)

2023-11-22 Thread Jun Wang via cfe-commits
@@ -1708,6 +1710,19 @@ bool SIInsertWaitcnts::insertWaitcntInBlock(MachineFunction , } ++Iter; +if (ST->isPreciseMemoryEnabled() && Inst.mayLoadOrStore()) { + auto Builder = + BuildMI(Block, Iter, DebugLoc(), TII->get(AMDGPU::S_WAITCNT)) +

Re: [clang] 661a73f - Fix typo in DiagnosticSemaKinds.td

2023-11-22 Thread David Blaikie via cfe-commits
Does this diagnostic have test coverage, could it be expanded to check the spelling here? (mostly as a motivation to ensure this diagnostic is actually tested... ) On Mon, Nov 20, 2023 at 3:04 AM via cfe-commits wrote: > > Author: Utkarsh Saxena > Date: 2023-11-20T12:04:32+01:00 > New Revision:

[clang] [Driver] Add support for -export-dynamic which can match GCC behavior. (PR #72781)

2023-11-22 Thread Fangrui Song via cfe-commits
MaskRay wrote: GCC compatibility certainly matters a lot, but I feel that some of my previous points are ignored. My previous replies asked us to focus on other respects (a) whether the behavior makes sense or makes things more error-prone (b) whether not supporting it causes us trouble (c)

[clang] [LinkerWrapper] Accept some needed lld-link linker arguments for COFF targets (PR #72889)

2023-11-22 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/72889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lld] [clang-tools-extra] [mlir] [clang] [llvm] [flang] [clangtidy] Allow safe suspensions in coroutine-hostile-raii check (PR #72954)

2023-11-22 Thread Björn Svensson via cfe-commits
@@ -52,27 +52,42 @@ AST_MATCHER_P(Stmt, forEachPrevStmt, ast_matchers::internal::Matcher, } return IsHostile; } + +// Matches the expression awaited by the `co_await`. +AST_MATCHER_P(CoawaitExpr, awaiatable, ast_matchers::internal::Matcher, bjosv wrote:

[llvm] [lld] [flang] [clang-tools-extra] [clang] [mlir] [clangtidy] Allow safe suspensions in coroutine-hostile-raii check (PR #72954)

2023-11-22 Thread Björn Svensson via cfe-commits
https://github.com/bjosv commented: Nice. Added a naming comment/nit. https://github.com/llvm/llvm-project/pull/72954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [llvm] [flang] [lld] [clang-tools-extra] [clang] [clangtidy] Allow safe suspensions in coroutine-hostile-raii check (PR #72954)

2023-11-22 Thread Björn Svensson via cfe-commits
https://github.com/bjosv edited https://github.com/llvm/llvm-project/pull/72954 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LinkerWrapper] Accept some needed lld-link linker arguments for COFF targets (PR #72889)

2023-11-22 Thread Michael Kruse via cfe-commits
https://github.com/Meinersbur edited https://github.com/llvm/llvm-project/pull/72889 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Fix sorting module headers (PR #73146)

2023-11-22 Thread David Blaikie via cfe-commits
dwblaikie wrote: > This commit also fixes commit > https://github.com/llvm/llvm-project/commit/d3676d4b666ead794fc58bbc7e07aa406dcf487a > that caused all headers to have NameAsWritten set to a 0-length string > without adapting compareModuleHeaders() to the new field. Sorry, I don't quite

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread Owen Pan via cfe-commits
https://github.com/owenca edited https://github.com/llvm/llvm-project/pull/70338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread Owen Pan via cfe-commits
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + +

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread Owen Pan via cfe-commits
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + +

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread Owen Pan via cfe-commits
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + +

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread Owen Pan via cfe-commits
@@ -24153,6 +24153,123 @@ TEST_F(FormatTest, WhitespaceSensitiveMacros) { verifyNoChange("FOO(String-ized+But: :Still=Intentional);", Style); } +TEST_F(FormatTest, IgnorePPDefinitions) { + FormatStyle Style = getLLVMStyle(); + Style.IgnorePPDefinitions = true; + +

[clang] [clang-format] Option to ignore macro definitions (PR #70338)

2023-11-22 Thread Owen Pan via cfe-commits
https://github.com/owenca requested changes to this pull request. https://github.com/llvm/llvm-project/pull/70338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [lld] [mlir] [clang] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-22 Thread David Blaikie via cfe-commits
dwblaikie wrote: (part of the point is so that patches can be reverted as needed without having to revert/reapply huge patches when they aren't actually dependent) https://github.com/llvm/llvm-project/pull/73000 ___ cfe-commits mailing list

[llvm] [lld] [mlir] [clang] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-22 Thread David Blaikie via cfe-commits
dwblaikie wrote: Generally when we split things up, they're separate reviews and separate commits. fixups are for necessary changes that need to be applied atomically (fixes to the base patch in a pull request, etc). https://github.com/llvm/llvm-project/pull/73000

[clang] [mlir] [llvm] [lld] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-22 Thread David Blaikie via cfe-commits
https://github.com/dwblaikie closed https://github.com/llvm/llvm-project/pull/73000 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [llvm] [lld] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-22 Thread David Blaikie via cfe-commits
@@ -2402,7 +2402,7 @@ void tools::checkAMDGPUCodeObjectVersion(const Driver , unsigned tools::getAMDGPUCodeObjectVersion(const Driver , const llvm::opt::ArgList ) { - unsigned CodeObjVer = 4; // default + unsigned CodeObjVer = 5;

[clang] [mlir] [llvm] [lld] [AMDGPU] Change default AMDHSA Code Object version to 5 (PR #73000)

2023-11-22 Thread David Blaikie via cfe-commits
@@ -4708,12 +4708,12 @@ defm amdgpu_ieee : BoolOption<"m", "amdgpu-ieee", NegFlag>, Group; def mcode_object_version_EQ : Joined<["-"], "mcode-object-version=">, Group, - HelpText<"Specify code object ABI version. Defaults to 4. (AMDGPU only)">, + HelpText<"Specify code

[clang] [clang] Ensure minimal alignment of global vars of incomplete type. (PR #72886)

2023-11-22 Thread Eli Friedman via cfe-commits
@@ -0,0 +1,32 @@ +// RUN: %clang --target=s390x-linux -S -emit-llvm -o - %s | FileCheck %s efriedma-quic wrote: Sorry, I missed this when reviewing. We generally only use Driver tests when we're trying to test some aspect of the driver. For arm-alignment.c,

[clang] 8840eb3 - [flang][OpenMP] Add semantic check for declare target (#72770)

2023-11-22 Thread via cfe-commits
Author: Shraiysh Date: 2023-11-22T16:13:14-06:00 New Revision: 8840eb3fb535bc44704bb61515ca90dceaae35a7 URL: https://github.com/llvm/llvm-project/commit/8840eb3fb535bc44704bb61515ca90dceaae35a7 DIFF: https://github.com/llvm/llvm-project/commit/8840eb3fb535bc44704bb61515ca90dceaae35a7.diff

[clang] [llvm] [flang] [flang][OpenMP] Add semantic check for declare target (PR #72770)

2023-11-22 Thread via cfe-commits
https://github.com/shraiysh closed https://github.com/llvm/llvm-project/pull/72770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D105909: [clang][CallGraphSection] Add type id metadata to indirect call and targets

2023-11-22 Thread Prabhu Karthikeyan Rajasekaran via Phabricator via cfe-commits
Prabhuk updated this revision to Diff 558152. Prabhuk added a comment. Rebased the patchset and addressed the compilation and test failures Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105909/new/ https://reviews.llvm.org/D105909 Files:

[clang] [clang][CodeGen] Emit atomic IR instead of libcalls for misaligned po… (PR #73176)

2023-11-22 Thread via cfe-commits
https://github.com/Logikable updated https://github.com/llvm/llvm-project/pull/73176 >From dd6964d9108cf16fb062c1c809abbd75dae7ff65 Mon Sep 17 00:00:00 2001 From: Sean Luchen Date: Fri, 17 Nov 2023 17:29:52 + Subject: [PATCH] [clang][CodeGen] Emit atomic IR instead of libcalls for

[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation

2023-11-22 Thread Prabhu Karthikeyan Rajasekaran via Phabricator via cfe-commits
Prabhuk updated this revision to Diff 558151. Prabhuk added a comment. Rebased the patchset and addressed the compilation failures Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105907/new/ https://reviews.llvm.org/D105907 Files:

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread Tom Eccles via cfe-commits
tblah wrote: > Thank you for the changes, Tom! > > I have one minor comment, but I would like to ask to merge this after US > holidays, if possible. Could you please postpone the merging until Monday GMT? Sure. I'll wait until Monday. https://github.com/llvm/llvm-project/pull/73111

[clang] [clang][CodeGen] Emit atomic IR instead of libcalls for misaligned po… (PR #73176)

2023-11-22 Thread via cfe-commits
https://github.com/Logikable updated https://github.com/llvm/llvm-project/pull/73176 >From d0f164da6b75d5698da45d863f7d955cecd94f20 Mon Sep 17 00:00:00 2001 From: Sean Luchen Date: Fri, 17 Nov 2023 17:29:52 + Subject: [PATCH] [clang][CodeGen] Emit atomic IR instead of libcalls for

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread Slava Zakharin via cfe-commits
@@ -142,6 +142,26 @@ void Flang::addCodegenOptions(const ArgList , if (shouldLoopVersion(Args)) CmdArgs.push_back("-fversion-loops-for-stride"); + Arg *aliasAnalysis = Args.getLastArg(options::OPT_falias_analysis, +

[clang] [flang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari commented: Thank you for the changes, Tom! I have one minor comment, but I would like to ask to merge this after US holidays, if possible. Could you please postpone the merging until Monday GMT? https://github.com/llvm/llvm-project/pull/73111

[flang] [clang] [flang] Enable alias tags pass by default (PR #73111)

2023-11-22 Thread Slava Zakharin via cfe-commits
https://github.com/vzakhari edited https://github.com/llvm/llvm-project/pull/73111 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CodeGen] Emit atomic IR instead of libcalls for misaligned po… (PR #73176)

2023-11-22 Thread via cfe-commits
https://github.com/Logikable updated https://github.com/llvm/llvm-project/pull/73176 >From cba04d497b09aa932b9f515b353d00794abac011 Mon Sep 17 00:00:00 2001 From: Sean Luchen Date: Fri, 17 Nov 2023 17:29:52 + Subject: [PATCH] [clang][CodeGen] Emit atomic IR instead of libcalls for

[llvm] [clang] [CUDA][HIP] Improve variable registration with the new driver (PR #73177)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Joseph Huber (jhuber6) Changes Summary: This patch adds support for registering texture / surface variables from CUDA / HIP. Additionally, we now properly track the

[llvm] [clang] [CUDA][HIP] Improve variable registration with the new driver (PR #73177)

2023-11-22 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Joseph Huber (jhuber6) Changes Summary: This patch adds support for registering texture / surface variables from CUDA / HIP. Additionally, we now properly track the `extern` and `const` flags that are also used in these runtime

[llvm] [clang] [CUDA][HIP] Improve variable registration with the new driver (PR #73177)

2023-11-22 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/73177 Summary: This patch adds support for registering texture / surface variables from CUDA / HIP. Additionally, we now properly track the `extern` and `const` flags that are also used in these runtime functions.

[clang] [clang][CodeGen] Emit atomic IR instead of libcalls for misaligned po… (PR #73176)

2023-11-22 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 07fdc084fe75f971688d4140a5bd2dcb1d60eba2 51423d866934f1507b64f8049d7cfcedf9727e43 --

  1   2   3   4   >