[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik closed https://github.com/llvm/llvm-project/pull/80730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] a7bc9cb - [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (#80730)

2024-02-05 Thread via cfe-commits
Author: Shafik Yaghmour Date: 2024-02-05T14:40:07-08:00 New Revision: a7bc9cb6ffa91ff0ebabc45c0c7263c7c2c3a4de URL: https://github.com/llvm/llvm-project/commit/a7bc9cb6ffa91ff0ebabc45c0c7263c7c2c3a4de DIFF:

[clang] [llvm] [RISCV] Add Zicfiss support to the shadow call stack implementation. (PR #68075)

2024-02-05 Thread Craig Topper via cfe-commits
topperc wrote: Will https://github.com/riscv-non-isa/riscv-elf-psabi-doc/pull/417 be implemented in a separate patch? https://github.com/llvm/llvm-project/pull/68075 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-05 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: > (Sidenote: "dynamic" isn't even > [documented](https://clang.llvm.org/docs/UsersManual.html#cmdoption-fdenormal-fp-math)). It's not a selectable enum of the Clang `-fdenormal-fp-math` flag, but it is one for the LLVM function attribute `denormal-fp-math`.

[clang-tools-extra] [clang] [llvm] [HLSL] Vector standard conversions (PR #71098)

2024-02-05 Thread John McCall via cfe-commits
rjmccall wrote: Argh, sorry for the slow response. https://github.com/llvm/llvm-project/pull/71098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [HLSL] Vector standard conversions (PR #71098)

2024-02-05 Thread John McCall via cfe-commits
@@ -2414,9 +2420,41 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { return EmitScalarConversion(Visit(E), E->getType(), DestTy, CE->getExprLoc(), Opts); } - case CK_IntegralToFloating: - case CK_FloatingToIntegral: - case

[llvm] [clang] [clang-tools-extra] [HLSL] Vector standard conversions (PR #71098)

2024-02-05 Thread John McCall via cfe-commits
@@ -361,6 +361,9 @@ CAST_OPERATION(AddressSpaceConversion) // Convert an integer initializer to an OpenCL sampler. CAST_OPERATION(IntToOCLSampler) +// Truncate a vector type (HLSL only). +CAST_OPERATION(HLSLVectorTruncation) rjmccall wrote: Unfortunately, we

[clang-tools-extra] [clang] [llvm] [HLSL] Vector standard conversions (PR #71098)

2024-02-05 Thread John McCall via cfe-commits
@@ -1843,13 +1843,86 @@ bool Sema::IsFunctionConversion(QualType FromType, QualType ToType, return true; } +/// Determine whether the conversion from FromType to ToType is a valid +/// floating point conversion. +/// +static bool IsFloatingPointConversion(Sema , QualType

[llvm] [clang] [clang-tools-extra] [HLSL] Vector standard conversions (PR #71098)

2024-02-05 Thread John McCall via cfe-commits
@@ -2466,6 +2504,15 @@ Value *ScalarExprEmitter::VisitCastExpr(CastExpr *CE) { case CK_IntToOCLSampler: return CGF.CGM.createOpenCLIntToSamplerConversion(E, CGF); + case CK_HLSLVectorTruncation: { +assert(DestTy->isVectorType() && "Expected dest type to be vector

[llvm] [libc] [flang] [clang-tools-extra] [libcxx] [clang] [compiler-rt] [SLP]Improve minbitwidth analysis. (PR #78976)

2024-02-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/78976 >From 391145a2d04873ef84c4f1083fe9b9fcdbb3b940 Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Mon, 22 Jan 2024 14:13:51 + Subject: [PATCH]

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: @ldionne what about fixing upstream behavior to match actual system compiler behavior now and when/as soon as we have new behavior in Apple compiler fix it again in newer clang versions? Moreover as I pointed out Apple compiler behavior is problematic for clang-tools and

[clang] ae9e1fd - [clang] Fix extractAPI typo in comments, NFC

2024-02-05 Thread Cyndy Ishida via cfe-commits
Author: Cyndy Ishida Date: 2024-02-05T14:14:21-08:00 New Revision: ae9e1fd2edb6eb11dfd6816d1e9013e39e21aa04 URL: https://github.com/llvm/llvm-project/commit/ae9e1fd2edb6eb11dfd6816d1e9013e39e21aa04 DIFF: https://github.com/llvm/llvm-project/commit/ae9e1fd2edb6eb11dfd6816d1e9013e39e21aa04.diff

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

2024-02-05 Thread Jun Wang via cfe-commits
jwanggit86 wrote: @t-tye Code has been updated based on your feedback. Pls take a look. https://github.com/llvm/llvm-project/pull/79236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Louis Dionne via cfe-commits
ldionne wrote: Woah, I just checked Xcode 15.2 and you are totally right, it contains `clang-1500.1.0.2.5` which still has the behavior reversed from upstream. Sorry for the confusion, I assumed it was out in recent Xcodes cause the change was made a while back, but it looks like this change

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-05 Thread James Y Knight via cfe-commits
jyknight wrote: > You'll get different results depending on whether the input is implicitly > flushed in fcmp vs. not in the is.fpclass This sounds intuitively like the sort of semantics-breaking optimization which is expected from `-ffast-math`. If the only issues are things like getting a

[llvm] [clang-tools-extra] [clang] [codegen] Emit cleanups for lifetime-extended temporaries when an expr contains control-flow (PR #80698)

2024-02-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: If I understand correctly, a "lifetime-extended" cleanup deals with the case of a temporary whose lifetime continues beyond the expression. In other words, it has different lifetimes depending on how you exit the expression: if the variable's lifetime begins, it lasts

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Daniel Rodríguez Troitiño via cfe-commits
drodriguez wrote: The `Xcode.app` I was using in the previous comment was 15.1. I tried again the same steps with the last version I have (Xcode 15.3b1, 15E5178i) and I obtain the same behaviour. https://github.com/llvm/llvm-project/pull/80524 ___

[llvm] [clang] [RISCV] Add Ssqosid support to -march. (PR #80747)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-mc Author: Craig Topper (topperc) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/80747.diff 8 Files Affected: - (modified) clang/test/Preprocessor/riscv-target-features.c (+9) - (modified) llvm/docs/RISCVUsage.rst (+3) -

[llvm] [clang] [RISCV] Add Ssqosid support to -march. (PR #80747)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Craig Topper (topperc) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/80747.diff 8 Files Affected: - (modified) clang/test/Preprocessor/riscv-target-features.c (+9) - (modified) llvm/docs/RISCVUsage.rst (+3) -

[llvm] [clang] [RISCV] Add Ssqosid support to -march. (PR #80747)

2024-02-05 Thread Craig Topper via cfe-commits
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/80747 None >From a92d11432df57ad7172d80157e794ebec63b3410 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Mon, 5 Feb 2024 13:46:32 -0800 Subject: [PATCH] [RISCV] Add Ssqosid support to -march. ---

[libcxxabi] [lldb] [clang] [flang] [compiler-rt] [lld] [libc] [clang-tools-extra] [libcxx] [llvm] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-02-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/77529 >From 7440ee8ba235fd871af0999f66d5d6130456400b Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Tue, 9 Jan 2024 21:43:31 + Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Stanislav Mekhanoshin via cfe-commits
@@ -832,6 +832,13 @@ void test_atomic_inc_dec(local uint *lptr, global uint *gptr, uint val) { res = __builtin_amdgcn_atomic_dec32((volatile global uint*)gptr, val, __ATOMIC_SEQ_CST, ""); } +// CHECK-LABEL test_wavefrontsize( +unsigned test_wavefrontsize() {

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec approved this pull request. https://github.com/llvm/llvm-project/pull/80741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Stanislav Mekhanoshin via cfe-commits
https://github.com/rampitec edited https://github.com/llvm/llvm-project/pull/80741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-05 Thread Craig Topper via cfe-commits
topperc wrote: Looks like we missed updating llvm/test/MC/RISCV/attribute-arch.s https://github.com/llvm/llvm-project/pull/79929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Joseph Huber via cfe-commits
@@ -832,6 +832,13 @@ void test_atomic_inc_dec(local uint *lptr, global uint *gptr, uint val) { res = __builtin_amdgcn_atomic_dec32((volatile global uint*)gptr, val, __ATOMIC_SEQ_CST, ""); } +// CHECK-LABEL test_wavefrontsize( +unsigned test_wavefrontsize() {

[llvm] [clang-tools-extra] [clang] Add clang-tidy check to suggest replacement of conditional statement with std::min/std::max (PR #77816)

2024-02-05 Thread Piotr Zegar via cfe-commits
PiotrZSL wrote: Unless you want this to be merged as "76656712+11ha...@users.noreply.github.com", change your email privacy settings. https://github.com/llvm/llvm-project/pull/77816 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Stanislav Mekhanoshin via cfe-commits
@@ -832,6 +832,13 @@ void test_atomic_inc_dec(local uint *lptr, global uint *gptr, uint val) { res = __builtin_amdgcn_atomic_dec32((volatile global uint*)gptr, val, __ATOMIC_SEQ_CST, ""); } +// CHECK-LABEL test_wavefrontsize( +unsigned test_wavefrontsize() {

[llvm] [clang] New calling convention preserve_none (PR #76868)

2024-02-05 Thread via cfe-commits
https://github.com/weiguozhi closed https://github.com/llvm/llvm-project/pull/76868 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c166a43 - New calling convention preserve_none (#76868)

2024-02-05 Thread via cfe-commits
Author: weiguozhi Date: 2024-02-05T13:28:43-08:00 New Revision: c166a43c6e6157b1309ea757324cc0a71c078e66 URL: https://github.com/llvm/llvm-project/commit/c166a43c6e6157b1309ea757324cc0a71c078e66 DIFF: https://github.com/llvm/llvm-project/commit/c166a43c6e6157b1309ea757324cc0a71c078e66.diff

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Dmitry Polukhin via cfe-commits
dmpolukhin wrote: @ldionne I also haven't see Apple compiler that matches upstream behavior. In https://reviews.llvm.org/D157283#4648242, you mentioned that "Xcode 15 RC" should be such compiler and checked it and couple version after that and none of them matched upstream so I decided to

[llvm] [clang-tools-extra] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread David Li via cfe-commits
david-xl wrote: > > I don't understand, if you're saying the profile is accurate, then those > > functions are actually cold, so we should be able to mark them as optsize? > > Accurate is not black or white. The current heuristic requires certain level > of accuracy to be effective. If you

[llvm] [clang-tools-extra] [clang] [mlir] [mlir][sparse] Change LevelType enum to 64 bit (PR #80501)

2024-02-05 Thread Aart Bik via cfe-commits
@@ -25,7 +25,9 @@ MLIR_DECLARE_CAPI_DIALECT_REGISTRATION(SparseTensor, sparse_tensor); /// These correspond to SparseTensorEncodingAttr::LevelType in the C++ API. /// If updating, keep them in sync and update the static_assert in the impl /// file. -enum

[llvm] [mlir] [clang] [clang-tools-extra] [mlir][sparse] Change LevelType enum to 64 bit (PR #80501)

2024-02-05 Thread Aart Bik via cfe-commits
https://github.com/aartbik edited https://github.com/llvm/llvm-project/pull/80501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [mlir] [llvm] [mlir][sparse] Change LevelType enum to 64 bit (PR #80501)

2024-02-05 Thread Aart Bik via cfe-commits
https://github.com/aartbik approved this pull request. https://github.com/llvm/llvm-project/pull/80501 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Aiden Grossman via cfe-commits
boomanaiden154 wrote: Looks like there was a transient failure in the stage2 build while loading the container image. I've restarted it and everything seems to be going fine. Hopefully that's not an issue going forward. https://github.com/llvm/llvm-project/pull/80713

[clang-tools-extra] [llvm] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread via cfe-commits
WenleiHe wrote: > I don't understand, if you're saying the profile is accurate, then those > functions are actually cold, so we should be able to mark them as optsize? Accurate is not black or white. The current heuristic requires certain level of accuracy to be effective. If you make the

[clang] Disable FTZ/DAZ when compiling shared libraries by default. (PR #80475)

2024-02-05 Thread Joshua Cranmer via cfe-commits
jcranmer-intel wrote: > I think there is a bit of a problematic interaction with > getDenormalModeForType > [here](https://github.com/llvm/llvm-project/blob/7a94acb2da5b20d12f13f3c5f4eb0f3f46e78e73/clang/lib/Driver/ToolChains/Linux.cpp#L838C8-L838C37). > "-shared" is (should be) a flag used

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-amdgpu Author: Joseph Huber (jhuber6) Changes Summary: The backend supports the wavefrontsize intrinsic, and suggests that it is tied to a corresponding clang builtin, but it is not actually present. This simply adds

[clang] [AMDGPU] Add missing `__builtin_amdgcn_wavefrontsize` builtin (PR #80741)

2024-02-05 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/80741 Summary: The backend supports the wavefrontsize intrinsic, and suggests that it is tied to a corresponding clang builtin, but it is not actually present. This simply adds it in so it can be used from clang. This

[clang-tools-extra] [mlir] [llvm] [clang] [MLIR][tensor] Improve `tensor.pack` verifier to catch more cases with unconditional runtime errors (PR #77217)

2024-02-05 Thread via cfe-commits
https://github.com/srcarroll updated https://github.com/llvm/llvm-project/pull/77217 >From e016ccb680d84257fe44e4e408bad6e510eb703d Mon Sep 17 00:00:00 2001 From: Sam Date: Sat, 6 Jan 2024 18:51:24 -0600 Subject: [PATCH 1/2] Include output size in determining UB for `tensor.pack` ---

[llvm] [clang] [clang-tools-extra] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: I don't understand, if you're saying the profile is accurate, then those functions are actually cold, so we should be able to mark them as optsize? https://github.com/llvm/llvm-project/pull/69030 ___ cfe-commits mailing list

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Tom Stellard via cfe-commits
https://github.com/tstellar approved this pull request. https://github.com/llvm/llvm-project/pull/80713 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [mlir] [llvm] [clang] [mlir][linalg] Refactor `EraseIdentityGenericOp` to be reused by other `LinalgOp`s (PR #80466)

2024-02-05 Thread via cfe-commits
https://github.com/srcarroll updated https://github.com/llvm/llvm-project/pull/80466 >From f51bb7b15be55e682be76f2289b991ed42ab4d41 Mon Sep 17 00:00:00 2001 From: Sam Date: Fri, 2 Feb 2024 11:37:03 -0600 Subject: [PATCH 1/3] [mlir][linalg]Implement canonicalizer for `linalg::BroadCastOp` on

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Tom Stellard via cfe-commits
@@ -0,0 +1,13 @@ +diff --git a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +index 1a04ca9a74e5..d092820e4115 100644 +--- a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +@@ -4,6 +4,8 @@ set(CLANG_BOOTSTRAP_TARGETS +

[llvm] [clang] [clang-tools-extra] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks edited https://github.com/llvm/llvm-project/pull/69030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang-tools-extra] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread via cfe-commits
WenleiHe wrote: > > FWIW we've tried this with sampling PGO in the past. While on paper this > > seems like an obvious thing to do, in reality aggressively tuning down opt > > level for cold functions can lead to regression since profile isn't always > > accurate. > > That said, as long as

[clang] [llvm] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Aiden Grossman via cfe-commits
@@ -0,0 +1,13 @@ +diff --git a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +index 1a04ca9a74e5..d092820e4115 100644 +--- a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +@@ -4,6 +4,8 @@ set(CLANG_BOOTSTRAP_TARGETS +

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Daniel Rodríguez Troitiño via cfe-commits
drodriguez wrote: > @drodriguez I'm not certain why you think AppleClang prefers `isysroot` over > toolchain headers -- it might be because we simply don't ship libc++ > toolchain headers anymore and we only ship libc++ SDK headers. But if you try > installing libc++ headers in the toolchain

[clang] [llvm] [clang-tools-extra] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
https://github.com/aeubanks updated https://github.com/llvm/llvm-project/pull/69030 >From e52a811c3b643548837b4e630e8293a0b6857ad4 Mon Sep 17 00:00:00 2001 From: Arthur Eubanks Date: Fri, 13 Oct 2023 14:40:28 -0700 Subject: [PATCH 1/6] [PGO] Add ability to mark cold functions as

[compiler-rt] [flang] [llvm] [openmp] [libc] [lldb] [mlir] [libcxx] [clang-tools-extra] [clang] [lld] [Driver] Report invalid target triple versions for all environment types. (PR #78655)

2024-02-05 Thread Mike Hommey via cfe-commits
glandium wrote: This broke the wasi-threads target: `clang: error: version 'threads' in target triple 'wasm32-unknown-wasi-threads' is invalid` https://github.com/llvm/llvm-project/pull/78655 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] Turn 'counted_by' into a type attribute and parse it into 'CountAttributedType' (PR #78000)

2024-02-05 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: It's generally not a good idea to use sugar to represent constructs that are semantically significant: anything that uses the canonical type will throw it away. We try to avoid throwing away sugar in most cases, but we aren't always successful. It's possible there are

[llvm] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
@@ -0,0 +1,73 @@ +//===--===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[llvm] [clang] [AMDGPU] Adding the amdgpu-num-work-groups function attribute (PR #79035)

2024-02-05 Thread Jun Wang via cfe-commits
jwanggit86 wrote: @krzysz00 Code has been updated. Pls take a look when convenient. Pls note the following: (1) Two attributes are now supported, one for min and one for max num of workgroups. (2) It is allowed to only specify one of the two attributes. (3) An attribute is ignored if any one

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-05 Thread David Goldman via cfe-commits
@@ -538,11 +565,254 @@ std::optional checkName(const NamedDecl , Conflict->getLocation().printToString(ASTCtx.getSourceManager())}; } } - if (Result) + if (Result) { InvalidNameMetric.record(1, toString(Result->K)); +return makeError(*Result); +

[llvm] [clang] [clang-tools-extra] [HLSL] Vector standard conversions (PR #71098)

2024-02-05 Thread Chris B via cfe-commits
llvm-beanz wrote: @rjmccall, friendly ping  https://github.com/llvm/llvm-project/pull/71098 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[lldb] [clang] [clang-tools-extra] [libcxxabi] [libc] [flang] [llvm] [lld] [libcxx] [compiler-rt] [TTI][RISCV]Improve costs for fixed vector whole reg extract/insert. (PR #80164)

2024-02-05 Thread Alexey Bataev via cfe-commits
@@ -326,6 +326,48 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind, switch (Kind) { default: break; +case TTI::SK_ExtractSubvector: + if (isa(SubTp) && + LT.second.getVectorElementType() != MVT::i1) { +unsigned

[clang-tools-extra] Add support for renaming objc methods, even those with multiple selector pieces (PR #76466)

2024-02-05 Thread David Goldman via cfe-commits
@@ -508,24 +513,46 @@ static bool mayBeValidIdentifier(llvm::StringRef Ident) { !isAsciiIdentifierStart(Ident.front(), AllowDollar)) return false; for (char C : Ident) { +if (AllowColon && C == ':') DavidGoldman wrote: This doesn't check the

[lldb] [clang] [clang-tools-extra] [libcxxabi] [libc] [flang] [llvm] [lld] [libcxx] [compiler-rt] [TTI][RISCV]Improve costs for fixed vector whole reg extract/insert. (PR #80164)

2024-02-05 Thread Alexey Bataev via cfe-commits
https://github.com/alexey-bataev updated https://github.com/llvm/llvm-project/pull/80164 >From cfd0dcfa1f5fabd12cf4d7bf8d5a10bd324ace0a Mon Sep 17 00:00:00 2001 From: Alexey Bataev Date: Wed, 31 Jan 2024 16:47:49 + Subject: [PATCH]

[llvm] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > FWIW we've tried this with sampling PGO in the past. While on paper this > seems like an obvious thing to do, in reality aggressively tuning down opt > level for cold functions can lead to regression since profile isn't always > accurate. > > That said, as long as this

[llvm] [clang] [PGO] Add ability to mark cold functions as optsize/minsize/optnone (PR #69030)

2024-02-05 Thread Arthur Eubanks via cfe-commits
aeubanks wrote: > How does this relate to the existing `shouldOptimizeForSize(Function&, ...)` > and `shouldOptimizeForSize(MachineFunction&, ...)` APIs which appear to > provide similar functionality at a first glance. If they are the same, then > we should have a plan in place to cleanup

[clang-tools-extra] [llvm] [clang] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-02-05 Thread via cfe-commits
sethp wrote: Looks like I missed the branch for v18 with this one, hence the conflict (now resolved), too bad. The test that's failing is looking for clang to emit some options that it's not; it looks like the same test is failing on main, so I haven't dug too deep into it. I believe I'm

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/80730 >From 80f7b2004a9ae980f8d652e870080a8ff53e3664 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Mon, 5 Feb 2024 11:08:25 -0800 Subject: [PATCH] [Clang][Sema] Fix regression due to missing ambiguity check

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -816,7 +816,7 @@ void FormatTokenLexer::handleTableGenMultilineString() { auto CloseOffset = Lex->getBuffer().find("}]", OpenOffset); if (CloseOffset == StringRef::npos) return; - auto Text = Lex->getBuffer().substr(OpenOffset, CloseOffset + 2); + auto Text =

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -1423,11 +1692,30 @@ class AnnotatingParser { if (!Tok->getPreviousNonComment()) Line.IsContinuation = true; } + if (Style.isTableGen()) { +if (Tok->is(Keywords.kw_assert)) { + if (!parseTableGenValue()) +return

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -256,6 +256,18 @@ class AnnotatingParser { } } } + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::equal)) { + // They appears as a separator. Unless it is not in class definition.

[clang] [clang-format] Support of TableGen value annotations. (PR #80299)

2024-02-05 Thread Björn Schäpers via cfe-commits
@@ -833,13 +885,207 @@ class AnnotatingParser { Left->setType(TT_ArrayInitializerLSquare); } FormatToken *Tok = CurrentToken; + if (Style.isTableGen()) { +if (CurrentToken->isOneOf(tok::comma, tok::minus, tok::ellipsis)) { + // '-' and

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
@@ -201,6 +201,8 @@ Bug Fixes to C++ Support parameter where we did an incorrect specialization of the initialization of the default parameter. Fixes (`#68490 `_) +- Fix regression due missing ambiguity check before

[clang] [clang] move -Wcast-function-type under -Wextra (PR #77178)

2024-02-05 Thread Aaron Ballman via cfe-commits
@@ -0,0 +1,42 @@ +// RUN: %clang_cc1 %s -fsyntax-only -Wextra -verify + + +int t(int array[static 12]); +int u(int i); +const int v(int i); /* expected-warning {{'const' type qualifier on return type has no effec}} */ +int x(long); + +typedef int (f1)(long); +typedef int

[llvm] [clang] [clang-tools-extra] [Clang][Sema] Print more static_assert exprs (PR #74852)

2024-02-05 Thread via cfe-commits
https://github.com/sethp updated https://github.com/llvm/llvm-project/pull/74852 >From f281d34a51f662c934f158e4770774b0dc3588a2 Mon Sep 17 00:00:00 2001 From: Seth Pellegrino Date: Thu, 7 Dec 2023 08:45:51 -0800 Subject: [PATCH 01/12] [Clang][Sema] Print more static_assert exprs This change

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Louis Dionne via cfe-commits
ldionne wrote: @dmpolukhin Replying to https://reviews.llvm.org/D157283#4648445: > @ldionne thank you for the reply. Unfortunately current behaviour makes > problems for clang-tools like clang-tidy and clangd that read CDBs from > compile_commands.json. They start looking headers relative

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Louis Dionne via cfe-commits
ldionne wrote: In https://reviews.llvm.org/D157283#4648242, I explained that the current upstream code actually matches exactly what we have downstream. I made sure to upstream everything to avoid differences after we started shipping libc++ in the SDK and were done with our transition.

[clang] [clang] Fix unexpected `-Wconstant-logical-operand` in C23 (PR #80724)

2024-02-05 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM though you should add a release note before landing. I think this is a good one to backport into Clang 18.x given how simple the fix is. Thank you! https://github.com/llvm/llvm-project/pull/80724

[lldb] [libcxx] [clang] [libc] [llvm] [libcxxabi] [flang] [lld] [compiler-rt] [clang-tools-extra] [TTI][RISCV]Improve costs for fixed vector whole reg extract/insert. (PR #80164)

2024-02-05 Thread Alexey Bataev via cfe-commits
@@ -326,6 +326,48 @@ InstructionCost RISCVTTIImpl::getShuffleCost(TTI::ShuffleKind Kind, switch (Kind) { default: break; +case TTI::SK_ExtractSubvector: + if (isa(SubTp) && + LT.second.getVectorElementType() != MVT::i1) { +unsigned

[llvm] [clang-tools-extra] [mlir] [clang] [mlir][sparse] Change LevelType enum to 64 bit (PR #80501)

2024-02-05 Thread Yinying Li via cfe-commits
https://github.com/yinying-lisa-li updated https://github.com/llvm/llvm-project/pull/80501 >From 1754868fc5f600ff59fac02d21ce9a37dc9ebcad Mon Sep 17 00:00:00 2001 From: Yinying Li Date: Fri, 2 Feb 2024 22:08:10 + Subject: [PATCH 1/7] [mlir][sparse] Change enum to be 64 bit ---

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik updated https://github.com/llvm/llvm-project/pull/80730 >From 1795bc031b9f5367e3bb61e8420278668964c416 Mon Sep 17 00:00:00 2001 From: Shafik Yaghmour Date: Mon, 5 Feb 2024 11:08:25 -0800 Subject: [PATCH] [Clang][Sema] Fix regression due to missing ambiguity check

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 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 5942868a215ce4dbd927a7f0b06432e1eeaed698 16968712c7caa38c80c6e8ac4db0e318511aaa99 --

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/80730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread via cfe-commits
@@ -201,6 +201,8 @@ Bug Fixes to C++ Support parameter where we did an incorrect specialization of the initialization of the default parameter. Fixes (`#68490 `_) +- Fix regression due missing ambiguity check before

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread via cfe-commits
https://github.com/cor3ntin approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/80730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. This'll need a cherry pick to 18 as it is a break against 17, right? Otherwise LGTM. https://github.com/llvm/llvm-project/pull/80730 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CLANG] Fix INF/NAN warning. (PR #80290)

2024-02-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/80290 >From 529879c78ae4c1bf4d04110b543f37c1d1af20f7 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Thu, 1 Feb 2024 05:26:00 -0800 Subject: [PATCH 1/5] Fix INF/NAN warning. ---

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Shafik Yaghmour (shafik) Changes Previously when fixing ambiguous lookup diagnostics in cc1b6668c57170cd440d321037ced89d6a61a9cb The change refactored `LookupResult` to split out diagnosing access and ambiguous lookups. The call to

[clang] [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (PR #80730)

2024-02-05 Thread Shafik Yaghmour via cfe-commits
https://github.com/shafik created https://github.com/llvm/llvm-project/pull/80730 Previously when fixing ambiguous lookup diagnostics in cc1b6668c57170cd440d321037ced89d6a61a9cb The change refactored `LookupResult` to split out diagnosing access and ambiguous lookups. The call to

[llvm] [clang] [clang-tools-extra] [AArch64] Implement -fno-plt for SelectionDAG/GlobalISel (PR #78890)

2024-02-05 Thread Matt Arsenault via cfe-commits
@@ -1293,8 +1293,19 @@ bool AArch64CallLowering::lowerCall(MachineIRBuilder , !Subtarget.noBTIAtReturnTwice() && MF.getInfo()->branchTargetEnforcement()) Opc = AArch64::BLR_BTI; - else + else { +// For an intrinsic call (e.g. memset), use GOT

[clang] [clang] Match -isysroot behaviour with system compiler on Darwin (PR #80524)

2024-02-05 Thread Daniel Rodríguez Troitiño via cfe-commits
drodriguez wrote: > I need to take a closer look, since at first reading I can't evaluate the > consequences, especially if this does change the behaviour when -isysroot is > **not** provided. Small detail that I think you are aware: the `-isysroot` can be provided, but it needs to have the

[flang] [clang] [flang][driver] Add support for -isysroot in the frontend (PR #77365)

2024-02-05 Thread Leandro Lupori via cfe-commits
luporl wrote: https://github.com/llvm/llvm-project/issues/80728 opened to track this issue. https://github.com/llvm/llvm-project/pull/77365 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [CLANG] Fix INF/NAN warning. (PR #80290)

2024-02-05 Thread Zahira Ammarguellat via cfe-commits
@@ -73,7 +73,7 @@ def warn_pragma_debug_unexpected_argument : Warning< def warn_fp_nan_inf_when_disabled : Warning< "use of %select{infinity|NaN}0%select{| via a macro}1 is undefined behavior " "due to the currently enabled floating-point options">, - InGroup>; +

[clang] [CLANG] Fix INF/NAN warning. (PR #80290)

2024-02-05 Thread Zahira Ammarguellat via cfe-commits
https://github.com/zahiraam updated https://github.com/llvm/llvm-project/pull/80290 >From 529879c78ae4c1bf4d04110b543f37c1d1af20f7 Mon Sep 17 00:00:00 2001 From: Ammarguellat Date: Thu, 1 Feb 2024 05:26:00 -0800 Subject: [PATCH 1/4] Fix INF/NAN warning. ---

[llvm] [clang] [RISCV] Add support for RISC-V Pointer Masking (PR #79929)

2024-02-05 Thread Michael Maitland via cfe-commits
https://github.com/michaelmaitland closed https://github.com/llvm/llvm-project/pull/79929 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 0bf165e - [RISCV] Add support for RISC-V Pointer Masking (#79929)

2024-02-05 Thread via cfe-commits
Author: Michael Maitland Date: 2024-02-05T13:56:25-05:00 New Revision: 0bf165e383ac9c58dcb1764aef9f35334afa0cc7 URL: https://github.com/llvm/llvm-project/commit/0bf165e383ac9c58dcb1764aef9f35334afa0cc7 DIFF:

[clang] [clang] Fix unexpected `-Wconstant-logical-operand` in C23 (PR #80724)

2024-02-05 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mariya Podchishchaeva (Fznamznon) Changes C23 has bool, but logical operators still return int. Double check that we're not in C23 to avoid false-positive -Wconstant-logical-operand. Fixes

[clang] [clang] Fix unexpected `-Wconstant-logical-operand` in C23 (PR #80724)

2024-02-05 Thread Mariya Podchishchaeva via cfe-commits
https://github.com/Fznamznon created https://github.com/llvm/llvm-project/pull/80724 C23 has bool, but logical operators still return int. Double check that we're not in C23 to avoid false-positive -Wconstant-logical-operand. Fixes https://github.com/llvm/llvm-project/issues/64356 >From

[llvm] [clang] [Github] Use building LLVM as perf-training for CI container (PR #80713)

2024-02-05 Thread Tom Stellard via cfe-commits
@@ -0,0 +1,13 @@ +diff --git a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +index 1a04ca9a74e5..d092820e4115 100644 +--- a/clang/cmake/caches/BOLT-PGO.cmake b/clang/cmake/caches/BOLT-PGO.cmake +@@ -4,6 +4,8 @@ set(CLANG_BOOTSTRAP_TARGETS +

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

[clang] [clang][Interp] Implement __builtin_bit_cast (PR #68288)

2024-02-05 Thread via cfe-commits
Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?= , Timm =?utf-8?q?Bäder?=

<    1   2   3   4   5   >