[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/81490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
@@ -33,6 +33,7 @@ namespace clang { class Decl; struct DeducedPack; class Sema; +enum class TemplateDeductionResult; Endilll wrote: This is far from the first time we do unscoped enum → scoped enum refactoring so that we can forward declare enums. Me and

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Vlad Serebrennikov via cfe-commits
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema , NamedDecl *Found, Decl *Templated, (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()); - switch (DeductionFailure.Result) { - case Sema::TDK_Success: -

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett edited https://github.com/llvm/llvm-project/pull/81490 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 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 6a7cf806a66c67df01818fda01116a2dd2d90b0d 4111afb81d798f9d8141adc634e617c34b5a --

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: David Spickett (DavidSpickett) Changes The motivation here was a suggestion over in Compiler Explorer. You can use `-mllvm` already to do this but since gfortran supports `-masm`, I figured I'd try to add it. This is done by

[clang] [flang] [flang][Driver] Add -masm option to flang (PR #81490)

2024-02-12 Thread David Spickett via cfe-commits
https://github.com/DavidSpickett created https://github.com/llvm/llvm-project/pull/81490 The motivation here was a suggestion over in Compiler Explorer. You can use `-mllvm` already to do this but since gfortran supports `-masm`, I figured I'd try to add it. This is done by flang expanding

[clang] c9afeaa - [format] Remove an unused variable.

2024-02-12 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-02-12T16:19:42+01:00 New Revision: c9afeaa6434a61b3b3a57c8eda6d2cfb25ab675b URL: https://github.com/llvm/llvm-project/commit/c9afeaa6434a61b3b3a57c8eda6d2cfb25ab675b DIFF: https://github.com/llvm/llvm-project/commit/c9afeaa6434a61b3b3a57c8eda6d2cfb25ab675b.diff

[clang-tools-extra] [clangd] Clean formatting modernize-use-override (PR #81435)

2024-02-12 Thread Kevin Joseph via cfe-commits
kevinjoseph1995 wrote: > Release notes entry (for clang-tidy) is also missing. Added a small entry to the Release notes. I wasn't sure about which section to add it to. Please let me know me if that isn't the right one. https://github.com/llvm/llvm-project/pull/81435

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-02-12 Thread Michael Buch via cfe-commits
@@ -9896,9 +9903,13 @@ Expected ASTImporter::Import(FileID FromID, bool IsBuiltin) { // FIXME: The filename may be a virtual name that does probably not // point to a valid file and we get no Entry here. In this case try with // the memory buffer

[clang] [Clang][Sema] Don't consider top-level cv-qualifiers in template partial orderings (PR #81449)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/81449 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][ASTImporter] fix assert fail due to offset overflow (PR #79084)

2024-02-12 Thread Michael Buch via cfe-commits
@@ -9896,9 +9903,13 @@ Expected ASTImporter::Import(FileID FromID, bool IsBuiltin) { // FIXME: The filename may be a virtual name that does probably not // point to a valid file and we get no Entry here. In this case try with // the memory buffer

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

2024-02-12 Thread Erich Keane via cfe-commits
@@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr()) { +uint32_t X = Attr->getNumWorkGroupsX(); +uint32_t Y =

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

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang

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

2024-02-12 Thread Erich Keane via cfe-commits
@@ -8069,6 +8069,25 @@ static void handleAMDGPUNumVGPRAttr(Sema , Decl *D, const ParsedAttr ) { D->addAttr(::new (S.Context) AMDGPUNumVGPRAttr(S.Context, AL, NumVGPR)); } +static void handleAMDGPUNumWorkGroupsAttr(Sema , Decl *D, +

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

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang

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

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel erichkeane

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

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2705,6 +2705,30 @@ An error will be given if: }]; } +def AMDGPUNumWorkGroupsDocs : Documentation { + let Category = DocCatAMDGPUAttributes; + let Content = [{ +The number of work groups specifies the number of work groups when the kernel +is dispatched. + +Clang

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

2024-02-12 Thread Erich Keane via cfe-commits
@@ -2031,6 +2031,13 @@ def AMDGPUNumVGPR : InheritableAttr { let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } +def AMDGPUNumWorkGroups : InheritableAttr { + let Spellings = [Clang<"amdgpu_num_work_groups", 0>]; + let Args =

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-12 Thread Dominik Wójt via cfe-commits
https://github.com/domin144 updated https://github.com/llvm/llvm-project/pull/81474 From 8f8d2b304aa90c0aea00d67e86d285ecd870e443 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20W=C3=B3jt?= Date: Mon, 12 Feb 2024 13:38:14 +0100 Subject: [PATCH 1/2] [clang][AArch64] multilib: fix deduction

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > New intrinsic sounds right - a constant frequency counter is a different > thing to a variable frequency counter. > > "Steady" implies unchanging, so I'd agree with `readfixedfreqtimer` or > similar. I think `steady` has sufficient context here, (i.e.

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -57,7 +57,7 @@ UNION(char[2], short) u2 = { .one = { 'a', 'b' } }; // ext-warning 3 {{'_Static_ typedef UNION(char, short) U3; // expected-error {{static assertion failed due to requirement 'sizeof(char) == sizeof(short)': type size mismatch}} \

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane commented: This would need a release note + I think it needs better testing. @AaronBallman might wish to take a look as well, this is his code ownership. https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits

[clang] [clang] Support `__is_trivially_copyable(int()&)==false` (PR #81298)

2024-02-12 Thread Erich Keane via cfe-commits
https://github.com/erichkeane edited https://github.com/llvm/llvm-project/pull/81298 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Jon Chesterfield via cfe-commits
JonChesterfield wrote: New intrinsic sounds right - a constant frequency counter is a different thing to a variable frequency counter. "Steady" implies unchanging, so I'd agree with `readfixedfreqtimer` or similar. We can't have a ratio between the two counters since one changes frequency and

[clang] Avoid printing overly large integer. (PR #75902)

2024-02-12 Thread Erich Keane via cfe-commits
=?utf-8?q?“Nhat?= , =?utf-8?q?“Nhat?= , =?utf-8?q?“Nhat?= , =?utf-8?q?“Nhat?= , =?utf-8?q?“Nhat?= ,Nhat Nguyen Message-ID: In-Reply-To: erichkeane wrote: Looks like all the tests disappeared? Only thing I see is the code change. Also, no release note is currently present.

[clang] 635dfd5 - [clang][Interp] Fix a designated initializer testcase

2024-02-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-12T15:36:07+01:00 New Revision: 635dfd5d69c6be52a8a2bb612f3483d9a1226cfa URL: https://github.com/llvm/llvm-project/commit/635dfd5d69c6be52a8a2bb612f3483d9a1226cfa DIFF: https://github.com/llvm/llvm-project/commit/635dfd5d69c6be52a8a2bb612f3483d9a1226cfa.diff

[clang] [Clang][Sema] fix crash in codegen stage when an lambda expression declared in an unevaluated context (PR #80802)

2024-02-12 Thread Qizhi Hu via cfe-commits
jcsxky wrote: @cor3ntin @erichkeane Could you please take another look at this PR? I think current version would be a reasonable fix since it transforms type only when it's needed. Or you have any other opinions? Thank you for guidance! https://github.com/llvm/llvm-project/pull/80802

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

2024-02-12 Thread Hirofumi Nakamura via cfe-commits
hnakamura5 wrote: Thank you very much! Currently I think this will be the largest part. I try to make so. Thank you again for this, and of course for the other parts. https://github.com/llvm/llvm-project/pull/80299 ___ cfe-commits mailing list

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-02-12 Thread Aaron Ballman via cfe-commits
@@ -2363,23 +2356,32 @@ void InitListChecker::CheckStructUnionTypes( } // Emit warnings for missing struct field initializers. - if (!VerifyOnly && InitializedSomething && CheckForMissingFields && - !RD->isUnion()) { -// It is possible we have one or more

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-02-12 Thread Aaron Ballman via cfe-commits
@@ -6165,6 +6165,10 @@ def ext_initializer_string_for_char_array_too_long : ExtWarn< def warn_missing_field_initializers : Warning< "missing field %0 initializer">, InGroup, DefaultIgnore; +// The same warning, but another group is needed to disable it separately. +def

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/81364 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add -Wmissing-designated-field-initializers (PR #81364)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this improvement! Please add a release note to `clang/docs/ReleaseNotes.rst` so users know about the new diagnostic group. https://github.com/llvm/llvm-project/pull/81364 ___ cfe-commits

[clang] [clang] Refactor `IdentifierInfo::ObjcOrBuiltinID` (PR #71709)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM! Precommit CI didn't run for Windows, but I tested the changes locally and all tests came back clean for me. https://github.com/llvm/llvm-project/pull/71709 ___ cfe-commits mailing list

[clang] ea8de6e - [clang][Interp][NFC] Make two local variables const

2024-02-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-12T15:36:07+01:00 New Revision: ea8de6e4336cf82aa541c6ad951b62585c3ea55c URL: https://github.com/llvm/llvm-project/commit/ea8de6e4336cf82aa541c6ad951b62585c3ea55c DIFF: https://github.com/llvm/llvm-project/commit/ea8de6e4336cf82aa541c6ad951b62585c3ea55c.diff

[clang] 15b0cc1 - [clang][Interp][NFC] Move a declaration into an if statement

2024-02-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-12T15:36:07+01:00 New Revision: 15b0cc1212701908400e8059c6581ffe85d8070f URL: https://github.com/llvm/llvm-project/commit/15b0cc1212701908400e8059c6581ffe85d8070f DIFF: https://github.com/llvm/llvm-project/commit/15b0cc1212701908400e8059c6581ffe85d8070f.diff

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -11445,11 +11452,16 @@ static void DiagnoseBadDeduction(Sema , NamedDecl *Found, Decl *Templated, (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()) || (ParamD = Param.dyn_cast()); - switch (DeductionFailure.Result) { - case Sema::TDK_Success: -

[clang] [clang][NFC] Refactor `Sema::TemplateDeductionResult` (PR #81398)

2024-02-12 Thread Erich Keane via cfe-commits
@@ -33,6 +33,7 @@ namespace clang { class Decl; struct DeducedPack; class Sema; +enum class TemplateDeductionResult; erichkeane wrote: should we specify the underlying type in all of these? I wonder if we can just specify it as `uint8_t`? Would mean not

[clang] [clang][analyzer] Remove 'alpha.core.CallAndMessageUnInitRefArg' from documentation (NFC). (PR #81138)

2024-02-12 Thread Balázs Kéri via cfe-commits
https://github.com/balazske closed https://github.com/llvm/llvm-project/pull/81138 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2b5e4ee - [clang][analyzer] Remove 'alpha.core.CallAndMessageUnInitRefArg' from documentation (NFC). (#81138)

2024-02-12 Thread via cfe-commits
Author: Balázs Kéri Date: 2024-02-12T15:30:58+01:00 New Revision: 2b5e4eeb26ce57a8d7c2835cffc80388f43f044a URL: https://github.com/llvm/llvm-project/commit/2b5e4eeb26ce57a8d7c2835cffc80388f43f044a DIFF: https://github.com/llvm/llvm-project/commit/2b5e4eeb26ce57a8d7c2835cffc80388f43f044a.diff

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

2024-02-12 Thread via cfe-commits
Author: Hirofumi Nakamura Date: 2024-02-12T23:27:09+09:00 New Revision: 6a471611a4b98396abb0680229aa0694ffe88a43 URL: https://github.com/llvm/llvm-project/commit/6a471611a4b98396abb0680229aa0694ffe88a43 DIFF:

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

2024-02-12 Thread Hirofumi Nakamura via cfe-commits
https://github.com/hnakamura5 closed https://github.com/llvm/llvm-project/pull/80299 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #80241)

2024-02-12 Thread Haojian Wu via cfe-commits
hokein wrote: I have reverted it in 50ed98f1cf2516c59de0351fa683639c937782ea, feel free to reland it with a fix. https://github.com/llvm/llvm-project/pull/80241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 50ed98f - Revert "Reland "[clang-format] Update FormatToken::isSimpleTypeSpecifier() (#80241)""

2024-02-12 Thread Haojian Wu via cfe-commits
Author: Haojian Wu Date: 2024-02-12T15:24:27+01:00 New Revision: 50ed98f1cf2516c59de0351fa683639c937782ea URL: https://github.com/llvm/llvm-project/commit/50ed98f1cf2516c59de0351fa683639c937782ea DIFF: https://github.com/llvm/llvm-project/commit/50ed98f1cf2516c59de0351fa683639c937782ea.diff

[clang] [Clang][C++23] Implement P1774R8: Portable assumptions (PR #81014)

2024-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > > > @Sirraide, would you be comfortable if you, @erichkeane, and I > > > co-authored an RFC to the community? > > > > > > Sure, I’d be happy to help with that as best I can. An RFC makes sense imo > > seeing as this really impacts more parts of LLVM than just Clang. >

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-12 Thread via cfe-commits
https://github.com/AtariDreams updated https://github.com/llvm/llvm-project/pull/81335 >From 6103fff6c5040e70fa28bd088f8eafbe479cbab1 Mon Sep 17 00:00:00 2001 From: Rose <83477269+ataridre...@users.noreply.github.com> Date: Fri, 9 Feb 2024 17:51:15 -0500 Subject: [PATCH 1/2] [ObjC] Add

[clang] f5fd0de - [LinkerWrapper][NFC] Rename 'all' to 'generic' for architecture agnostic IR

2024-02-12 Thread Joseph Huber via cfe-commits
Author: Joseph Huber Date: 2024-02-12T08:15:48-06:00 New Revision: f5fd0deb2371d0bae3bef2563f50e005a140fc6d URL: https://github.com/llvm/llvm-project/commit/f5fd0deb2371d0bae3bef2563f50e005a140fc6d DIFF: https://github.com/llvm/llvm-project/commit/f5fd0deb2371d0bae3bef2563f50e005a140fc6d.diff

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 Thread Jack Styles via cfe-commits
Stylie777 wrote: I think this can be one commit, the formatting changes can be squashed into the commit that makes the changes. Also make sure the commit message fits in with LLVM guidelines. See: https://llvm.org/docs/DeveloperPolicy.html#id18 https://github.com/llvm/llvm-project/pull/81466

[clang] [clang-format] Update FormatToken::isSimpleTypeSpecifier() (PR #80241)

2024-02-12 Thread Haojian Wu via cfe-commits
hokein wrote: This change introduced an asan crash when running the `QualifierFixerTest.IsQualifierType` unittest: ``` $ tools/clang/unittests/Format/FormatTests --gtest_filter="QualifierFixerTest.IsQualifierType" Note: Google Test filter = QualifierFixerTest.IsQualifierType [==]

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 updated https://github.com/llvm/llvm-project/pull/81331 >From 30341079e795c2668588b791f2c97b44006e7a04 Mon Sep 17 00:00:00 2001 From: Joseph Huber Date: Fri, 9 Feb 2024 16:13:42 -0600 Subject: [PATCH] [WIP][LLVM] Add `__builtin_readsteadycounter` intrinsic and

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][Sema] Fix for enums overflowing (#24667) (PR #78742)

2024-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @AaronBallman I am a little confused about what is the correct behavior for > one the the cases in the test file for c. > > ```c++ > enum PR4515 {PR4515a=1u,PR4515b=(PR4515a-2)/2}; > int CheckPR4515[PR4515b==0?1:-1]; > ``` > > At present since everything is ints this

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/80698 >From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 23 Jan 2024 20:18:25 + Subject: [PATCH 01/13] [misc-coroutine-hostile-raii] Use getOperand instead of

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Precommit CI found a valid failure on Windows: ``` FAIL: Clang :: Sema/attr-cleanup.c (15237 of 19292) TEST 'Clang :: Sema/attr-cleanup.c' FAILED Exit Code: 1 Command Output (stdout): -- # RUN: at line 1

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-12 Thread Aaron Ballman via cfe-commits
@@ -1,7 +1,7 @@ -// RUN: %clang_cc1 %s -verify -fsyntax-only +// RUN: %clang_cc1 -Wfree-nonheap-object -fsyntax-only -verify %s void c1(int *a); - +typedef unsigned long size_t; AaronBallman wrote: ```suggestion typedef __typeof__(sizeof(0)) size_t; ```

[clang] Diagnose misuse of the cleanup attribute (PR #80040)

2024-02-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman edited https://github.com/llvm/llvm-project/pull/80040 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [AArch64][SME2] Refactor arm_sme.td into multiclasses (PR #78169)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Matthew Devereau (MDevereau) Changes Create some multiclasses for FMLA/FMLS, MLAL and MLSL to reduce the size of arm_sme.td --- Patch is 36.16 KiB, truncated to 20.00 KiB below, full version:

[clang] [AArch64][SME2] Refactor arm_sme.td into multiclasses (PR #78169)

2024-02-12 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau ready_for_review https://github.com/llvm/llvm-project/pull/78169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
usx95 wrote: I updated the patch to work for all the initializations that were missing cleanups due to branch in an expression. https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Joseph Huber via cfe-commits
jhuber6 wrote: > Are we assuming any particular relationship to __builtin_readcyclecounter in > terms of scales etc? > > __builtin_readsteadycounter could be used to access x86 MPERF clock counters, > but to access the corresponding APERF clock we'd then need a >

[clang] [ObjC] Check entire chain of superclasses to see if class layout can be statically known (PR #81335)

2024-02-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @rjmccall Are these tests adequate? While we appreciate the enthusiasm, please only ping reviewers after about a week of not hearing from them on a review (https://llvm.org/docs/CodeReview.html#code-reviews-speed-and-reciprocity), thanks!

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Dominik Wójt (domin144) Changes The deduced "-march=" option always started with aarch64, which is not a valid value. There was also no way to distinguish between armv8-r and armv8-a. After this commit, the deduced "-march=" option will

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Dominik Wójt (domin144) Changes The deduced "-march=" option always started with aarch64, which is not a valid value. There was also no way to distinguish between armv8-r and armv8-a. After this commit, the deduced "-march="

[clang] [clang][AArch64] multilib: fix deduction of "-march=" option (PR #81474)

2024-02-12 Thread Dominik Wójt via cfe-commits
https://github.com/domin144 created https://github.com/llvm/llvm-project/pull/81474 The deduced "-march=" option always started with aarch64, which is not a valid value. There was also no way to distinguish between armv8-r and armv8-a. After this commit, the deduced "-march=" option will

[clang] [clang][dataflow] Add `Environment::initializeFieldsWithValues()`. (PR #81239)

2024-02-12 Thread via cfe-commits
martinboehme wrote: CI failure appears to be an infrastructure failure https://github.com/llvm/llvm-project/pull/81239 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/80698 >From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 23 Jan 2024 20:18:25 + Subject: [PATCH 01/12] [misc-coroutine-hostile-raii] Use getOperand instead of

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

2024-02-12 Thread Matt Arsenault via cfe-commits
arsenm wrote: Also should have follow up patch to propagate in AMDGPUAttributor, and another to lower to !range in AMDGPULowerKernelAttributes https://github.com/llvm/llvm-project/pull/79035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-02-12 Thread Matt Arsenault via cfe-commits
@@ -2031,6 +2031,13 @@ def AMDGPUNumVGPR : InheritableAttr { let Subjects = SubjectList<[Function], ErrorDiag, "kernel functions">; } +def AMDGPUNumWorkGroups : InheritableAttr { + let Spellings = [Clang<"amdgpu_num_work_groups", 0>]; arsenm wrote:

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

2024-02-12 Thread Matt Arsenault via cfe-commits
@@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr()) { +uint32_t X = Attr->getNumWorkGroupsX(); +uint32_t Y =

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

2024-02-12 Thread Matt Arsenault via cfe-commits
@@ -0,0 +1,84 @@ +; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx900 -verify-machineinstrs < %s | FileCheck %s arsenm wrote: Don't need -verify-machineinstrs https://github.com/llvm/llvm-project/pull/79035 ___

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

2024-02-12 Thread Matt Arsenault via cfe-commits
@@ -1108,3 +1108,8 @@ void GCNUserSGPRUsageInfo::allocKernargPreloadSGPRs(unsigned NumSGPRs) { unsigned GCNUserSGPRUsageInfo::getNumFreeUserSGPRs() { return AMDGPU::getMaxNumUserSGPRs(ST) - NumUsedUserSGPRs; } + +SmallVector arsenm wrote: std::array<3>?

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

2024-02-12 Thread Matt Arsenault via cfe-commits
@@ -356,6 +356,19 @@ void AMDGPUTargetCodeGenInfo::setFunctionDeclAttributes( if (NumVGPR != 0) F->addFnAttr("amdgpu-num-vgpr", llvm::utostr(NumVGPR)); } + + if (const auto *Attr = FD->getAttr()) { +uint32_t X = Attr->getNumWorkGroupsX(); +uint32_t Y =

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

2024-02-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm commented: Needs documentation in AMDGPUUsage. Should also clarify behavior of 0 https://github.com/llvm/llvm-project/pull/79035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2024-02-12 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm edited https://github.com/llvm/llvm-project/pull/79035 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-12 Thread Vinayak Dev via cfe-commits
vinayakdsci wrote: Sorry about the pings, I think I got a little ahead of myself there. But for C++11, we got to the conclusion that copy elision gives different behaviour for C++17 and later and thus different diagnostics? In case I made a mistake, I'd be very happy to fix it. Thanks P.S.

[clang] 268799c - [clang][Interp][NFC] Refactor Pointer::toAPValue()

2024-02-12 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-02-12T13:27:42+01:00 New Revision: 268799cc59ef7af237278d058c6e2ee2c8eb227d URL: https://github.com/llvm/llvm-project/commit/268799cc59ef7af237278d058c6e2ee2c8eb227d DIFF: https://github.com/llvm/llvm-project/commit/268799cc59ef7af237278d058c6e2ee2c8eb227d.diff

[clang] [clang-tools-extra] [codegen] Emit missing cleanups when an expression contains a branch (PR #80698)

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][RISCV] Add assumptions to vsetvli/vsetvlimax (PR #79975)

2024-02-12 Thread Yingwei Zheng via cfe-commits
dtcxzyw wrote: Can we implement this in `computeKnownBitsFromOperator/getRangeForIntrinsic`? https://github.com/llvm/llvm-project/blob/b21e3282864c9f7ad656c64bc375f5869ef76d19/llvm/lib/Analysis/ValueTracking.cpp#L1578-L1584 https://github.com/llvm/llvm-project/pull/79975

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-12 Thread via cfe-commits
cor3ntin wrote: We have a policy against more than one ping per week, thanks. FYI, if we are not going to fix the C++11 case, we should be very explicit about it. IE this PR is not a complete fix of https://github.com/llvm/llvm-project/issues/79518

[clang] [Clang][Sema]: Allow copy constructor side effects (PR #81127)

2024-02-12 Thread Vinayak Dev via cfe-commits
vinayakdsci wrote: @Endilll sorry for repeated pings, but I think @cor3ntin might be possibly busy. If this looks good, can we go ahead with this PR? Thanks! https://github.com/llvm/llvm-project/pull/81127 ___ cfe-commits mailing list

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 Thread James Westwood via cfe-commits
https://github.com/jwestwood921 updated https://github.com/llvm/llvm-project/pull/81466 >From 08628a75872266bdb1365ed39754512b1a400a70 Mon Sep 17 00:00:00 2001 From: James Westwood Date: Fri, 9 Feb 2024 19:06:20 + Subject: [PATCH 1/2] __ARM_ARCH macro definition fix Added functionality to

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

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/80698 >From 28d90711ff8e4924135d4bd4e5f252d96ac41b93 Mon Sep 17 00:00:00 2001 From: Utkarsh Saxena Date: Tue, 23 Jan 2024 20:18:25 + Subject: [PATCH 01/11] [misc-coroutine-hostile-raii] Use getOperand instead of

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 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 c609846155279090a4f9e659f63fb851e4946cb7 4b91b1be657dcf01d5c7f70d4c62a8ba60185efd --

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 Thread via cfe-commits
github-actions[bot] wrote: ⚠️ We detected that you are using a GitHub private e-mail address to contribute to the repo. Please turn off [Keep my email addresses private](https://github.com/settings/emails) setting in your account. See [LLVM

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: James Westwood (jwestwood921) Changes Added functionality to the ARMTargetParser to obtain the minor version of each architecture, and amended ARM.cpp and AArch64.cpp to define __ARM_ARCH correctly. In ACLE 5.4.1, __ARM_ARCH

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: James Westwood (jwestwood921) Changes Added functionality to the ARMTargetParser to obtain the minor version of each architecture, and amended ARM.cpp and AArch64.cpp to define __ARM_ARCH correctly. In ACLE 5.4.1, __ARM_ARCH is defined

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 Thread via cfe-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you,

[clang] [llvm] __ARM_ARCH macro fix (PR #81466)

2024-02-12 Thread James Westwood via cfe-commits
https://github.com/jwestwood921 created https://github.com/llvm/llvm-project/pull/81466 Added functionality to the ARMTargetParser to obtain the minor version of each architecture, and amended ARM.cpp and AArch64.cpp to define __ARM_ARCH correctly. In ACLE 5.4.1, __ARM_ARCH is defined as

[clang] [AArch64][SME2] Refactor arm_sme.td into multiclasses (PR #78169)

2024-02-12 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/78169 >From 79bf1ffc720d97e96bda477b445502d2cbe71369 Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Thu, 11 Jan 2024 17:21:10 + Subject: [PATCH] [AArch64][SME2] Refactor arm_sme.td into multiclasses Create

[clang] [AArch64][SME2] Refactor arm_sme.td into multiclasses (PR #78169)

2024-02-12 Thread Matthew Devereau via cfe-commits
https://github.com/MDevereau updated https://github.com/llvm/llvm-project/pull/78169 >From aa9b6e584e5f469d5ed5d8ceaa56c3b424a98b02 Mon Sep 17 00:00:00 2001 From: Matt Devereau Date: Thu, 11 Jan 2024 17:21:10 + Subject: [PATCH] [AArch64][SME2] Refactor arm_sme.td into multiclasses Create

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

2024-02-12 Thread Utkarsh Saxena via cfe-commits
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/80698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64] Add soft-float ABI (PR #74460)

2024-02-12 Thread via cfe-commits
ostannard wrote: Ping, the ABI specification change (https://github.com/ARM-software/abi-aa/pull/232) has now been merged. https://github.com/llvm/llvm-project/pull/74460 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang][analyzer] Reformat code of BoolAssignmentChecker (NFC). (PR #81461)

2024-02-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Balázs Kéri (balazske) Changes This is only a code reformatting and rename of variables to the newer format. --- Full diff: https://github.com/llvm/llvm-project/pull/81461.diff 1 Files Affected: - (modified)

[clang] [clang][analyzer] Reformat code of BoolAssignmentChecker (NFC). (PR #81461)

2024-02-12 Thread Balázs Kéri via cfe-commits
https://github.com/balazske created https://github.com/llvm/llvm-project/pull/81461 This is only a code reformatting and rename of variables to the newer format. From d1078be3394fc240de014f72116e18d6740b5773 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bal=C3=A1zs=20K=C3=A9ri?= Date: Mon, 12 Feb

[clang] [llvm] [LLVM] Add `__builtin_readsteadycounter` intrinsic and builtin for realtime clocks (PR #81331)

2024-02-12 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Are we assuming any particular relationship to __builtin_readcyclecounter in terms of scales etc? __builtin_readsteadycounter could be used to access x86 MPERF clock counters, but to access the corresponding APERF clock we'd then need a __builtin_readvariablecounter

[clang] [llvm] [MC/DC] Refactor: Introduce `MCDCTypes.h` for `coverage::mcdc` (PR #81459)

2024-02-12 Thread NAKAMURA Takumi via cfe-commits
https://github.com/chapuni updated https://github.com/llvm/llvm-project/pull/81459 >From 03bab9acf5aa3bf13c2223e92dbad040202d34bd Mon Sep 17 00:00:00 2001 From: NAKAMURA Takumi Date: Mon, 12 Feb 2024 18:43:56 +0900 Subject: [PATCH 1/2] [MC/DC] Refactor: Introduce `MCDCTypes.h` for the

[clang] Multilib support for libraries with exceptions (PR #75031)

2024-02-12 Thread Dominik Wójt via cfe-commits
https://github.com/domin144 approved this pull request. https://github.com/llvm/llvm-project/pull/75031 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   >