[clang] [llvm] [X86][AVX10.2] Support saturated converts (PR #102592)

2024-08-12 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,302 @@ +/*===- avx10_2_512satcvtdsintrin.h - AVX10_2_512SATCVTDS intrinsics === + * + * 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: Apac

[clang] [llvm] [X86][AVX10.2] Support saturated converts (PR #102592)

2024-08-12 Thread Phoebe Wang via cfe-commits
@@ -324,7 +324,14 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM, } } - if (Subtarget.hasSSE2()) { + if (Subtarget.hasAVX10_2() || Subtarget.hasAVX10_2_512()) { phoebewang wrote: Check `Subtarget.hasAVX10_2()` is enough. https://

[clang] [llvm] [X86][AVX10.2] Support saturated converts (PR #102592)

2024-08-12 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,453 @@ +/*===--- avx10_2satcvtdsintrin.h - AVX512SATCVTDS intrinsics === + * + * 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: Ap

[clang] [llvm] [X86][AVX10.2] Support saturated converts (PR #102592)

2024-08-12 Thread Phoebe Wang via cfe-commits
@@ -0,0 +1,115 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc < %s -mtriple=i686-linux -mattr=+avx10.2-256 | FileCheck %s --check-prefix=X86 +; RUN: llc < %s -mtriple=x86_64-linux -mattr=+avx10.2-256 | FileCheck %s --check-prefix=X6

[clang] [libclang/python] Fix bug in `SourceRange.__contains__`, add tests (PR #101802)

2024-08-12 Thread Aaron Ballman via cfe-commits
@@ -386,6 +386,10 @@ def __contains__(self, other): # same file, in between lines if self.start.line < other.line < self.end.line: return True +# between columns in one-liner range +elif self.start.line == other.line == self.end.line:

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -18528,37 +18520,38 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *Op1 = EmitScalarExpr(E->getArg(1)); llvm::Type *T0 = Op0->getType(); llvm::Type *T1 = Op1->getType(); + +// If the arguments are scalars, just emit a multiply

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -18528,37 +18520,38 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *Op1 = EmitScalarExpr(E->getArg(1)); llvm::Type *T0 = Op0->getType(); llvm::Type *T1 = Op1->getType(); + +// If the arguments are scalars, just emit a multiply

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

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

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

2024-08-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver Author: Qiongsi Wu (qiongsiwu) Changes https://github.com/llvm/llvm-project/pull/99888 added a specific diagnostic for `#pragma mc_func` on AIX. There are some disagreements on: 1. If the check should be on by default. Leaving the check of

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

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

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

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

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-12 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/102683 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -18584,6 +18584,29 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, CGM.getHLSLRuntime().getLengthIntrinsic(), ArrayRef{X}, nullptr, "hlsl.length"); } + case Builtin::BI__builtin_hlsl_normalize: { +Value *X = EmitScalarExpr(E->getArg

[clang] [clang-format] Correctly handle C# attribute on auto property (PR #102921)

2024-08-12 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/102921 Fixes #101487. >From 5fd35e3d2b9775867a259457879fc7030c901724 Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Mon, 12 Aug 2024 08:24:12 -0700 Subject: [PATCH] [clang-format] Correctly handle C# attribute on auto p

[clang] [clang-format] Correctly handle C# attribute on auto property (PR #102921)

2024-08-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #101487. --- Full diff: https://github.com/llvm/llvm-project/pull/102921.diff 2 Files Affected: - (modified) clang/lib/Format/UnwrappedLineParser.cpp (+9-5) - (modified) clang/unittests/Format/For

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -18470,22 +18470,14 @@ llvm::Value *CodeGenFunction::EmitScalarOrConstFoldImmArg(unsigned ICEArguments, return Arg; } -Intrinsic::ID getDotProductIntrinsic(QualType QT, int elementCount) { - if (QT->hasFloatingRepresentation()) { -switch (elementCount) { -case 2

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -18470,22 +18470,14 @@ llvm::Value *CodeGenFunction::EmitScalarOrConstFoldImmArg(unsigned ICEArguments, return Arg; } -Intrinsic::ID getDotProductIntrinsic(QualType QT, int elementCount) { - if (QT->hasFloatingRepresentation()) { -switch (elementCount) { -case 2

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -18528,37 +18520,38 @@ Value *CodeGenFunction::EmitHLSLBuiltinExpr(unsigned BuiltinID, Value *Op1 = EmitScalarExpr(E->getArg(1)); llvm::Type *T0 = Op0->getType(); llvm::Type *T1 = Op1->getType(); + +// If the arguments are scalars, just emit a multiply

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -7,155 +7,155 @@ // RUN: -o - | FileCheck %s --check-prefixes=CHECK,NO_HALF #ifdef __HLSL_ENABLE_16_BIT -// NATIVE_HALF: %dx.dot = mul i16 %0, %1 -// NATIVE_HALF: ret i16 %dx.dot +// NATIVE_HALF: %dot = mul i16 %0, %1 +// NATIVE_HALF: ret i16 %dot int16_t test_dot_short(

[clang] [Clang][NFCI] Refactor getTemplateInstantiationArgs() (PR #102922)

2024-08-12 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/102922 `getTemplateInstantiationArgs()` takes two parameters `ND` and `DC` to determine the starting point of a traversal. Previously, `DC` would be ignored in the presence of `ND`, and the next declaration context wo

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-12 Thread Chris Apple via cfe-commits
https://github.com/cjappl updated https://github.com/llvm/llvm-project/pull/102622 >From 9d3d49fa755c28b21c3b4771faae65cf418dec5a Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Wed, 24 Jul 2024 14:25:44 -0700 Subject: [PATCH 1/6] [clang][rtsan] Introduce realtime sanitizer codegen and driver

[clang] [clang][PowerPC] Add flag to enable compatibility with GNU for complex arguments (PR #77732)

2024-08-12 Thread Kishan Parmar via cfe-commits
Long5hot wrote: @AaronBallman, Yes you are right. I will work on it! https://github.com/llvm/llvm-project/pull/77732 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][OMPX] Add the code generation for multi-dim `thread_limit` clause (PR #102717)

2024-08-12 Thread Shilei Tian via cfe-commits
shiltian wrote: The BB failures look unrelated to the PR. https://github.com/llvm/llvm-project/pull/102717 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-08-12 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, thank you! https://github.com/llvm/llvm-project/pull/102919 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -1045,6 +1045,15 @@ let IntrProperties = [IntrNoMem, IntrSpeculatable, IntrWillReturn] in { def int_nearbyint : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; def int_round : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0>]>; def int_roun

[clang] [clang] Stop adjusting the module cache path (PR #102540)

2024-08-12 Thread Jan Svoboda via cfe-commits
jansvoboda11 wrote: > > This enables more efficient implementation of the caching VFS in #88800. > > Thanks @jansvoboda11 for working on this, I appreciate. One question, what do > you mean by "more efficient"? Sorry, I should've clarified. I think that without this patch, #88800 would need t

[clang] [clang][rtsan] Introduce realtime sanitizer codegen and driver (PR #102622)

2024-08-12 Thread Chris Apple via cfe-commits
https://github.com/cjappl updated https://github.com/llvm/llvm-project/pull/102622 >From 9d3d49fa755c28b21c3b4771faae65cf418dec5a Mon Sep 17 00:00:00 2001 From: Chris Apple Date: Wed, 24 Jul 2024 14:25:44 -0700 Subject: [PATCH 1/3] [clang][rtsan] Introduce realtime sanitizer codegen and driver

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -70,31 +71,57 @@ static bool expandAbs(CallInst *Orig) { return true; } -static bool expandIntegerDot(CallInst *Orig, Intrinsic::ID DotIntrinsic) { - assert(DotIntrinsic == Intrinsic::dx_sdot || - DotIntrinsic == Intrinsic::dx_udot); - Intrinsic::ID MadIntrinsic

[clang] [lld] [llvm] [mlir] [NFC][IWYU] Update Support library with IWYU. (PR #102707)

2024-08-12 Thread Mehdi Amini via cfe-commits
joker-eph wrote: > The motivation is as usual IWYU and similar refactoring - to reduce build > time and probablility of non-related source(s) recompile. I'm confused: as far as I know IWYU achieves the opposite of what you're describing actually: it adds more includes than strictly necessary.

[clang] [CUDA] Emit used function list in deterministic order. (PR #102661)

2024-08-12 Thread Yaxun Liu via cfe-commits
https://github.com/yxsamliu approved this pull request. LGTM. Thanks https://github.com/llvm/llvm-project/pull/102661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -1366,6 +1383,67 @@ bool SPIRVInstructionSelector::selectRsqrt(Register ResVReg, .constrainAllUses(TII, TRI, RBI); } +// Since there is no integer dot implementation, expand by piecewise multiplying farzonl wrote: actually I see a `OpSDot`, `OpUDot

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/102872 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Rajkumar Ananthu via cfe-commits
rajkumarananthu wrote: I see there are some tests failing, I ran check-llvm, but I think it is the wrong one, I will fix them, meanwhile please proceed with the source code-review. Thanks Rajkumar Ananthu. https://github.com/llvm/llvm-project/pull/102894 __

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-12 Thread Donát Nagy via cfe-commits
@@ -50,6 +101,44 @@ class BuiltinFunctionChecker : public Checker { } // namespace +void BuiltinFunctionChecker::HandleOverflowBuiltin(const CallEvent &Call, + CheckerContext &C, +

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-12 Thread Donát Nagy via cfe-commits
https://github.com/NagyDonat edited https://github.com/llvm/llvm-project/pull/102602 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread David Green via cfe-commits
davemgreen wrote: AArch64 has a udot and sdot instruction (and a usdot instruction). They perform a "partial" reduction though, producing a v4i32 from two v16i8 inputs. We would like to use those from the vectorizer and have recently added a partial-reduction intrinsic, but doing it with a hig

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #102364)

2024-08-12 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: The last time I followed this attempt was https://reviews.llvm.org/D150226, where there was objection because it was ignored in system headers, so effectively impossible to discover how widespread this is. When did this become unignored in system headers? I remember fixing al

[clang] [analyzer] Model overflow builtins (PR #102602)

2024-08-12 Thread Pavel Skripkin via cfe-commits
@@ -50,6 +101,44 @@ class BuiltinFunctionChecker : public Checker { } // namespace +void BuiltinFunctionChecker::HandleOverflowBuiltin(const CallEvent &Call, + CheckerContext &C, +

[clang-tools-extra] [clang-tidy] use upper case letters for bool conversion suffix (PR #102831)

2024-08-12 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: > Is it possible to check whether is other check enable? It might be technically possible, but it's undesirable as it makes the whole infrastructure more complex and doubles the amount of testing. Checks should be independent of each other. https://github.com/llvm/llvm-pr

[clang] [llvm] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload (PR #94549)

2024-08-12 Thread Johannes Doerfert via cfe-commits
https://github.com/jdoerfert updated https://github.com/llvm/llvm-project/pull/94549 >From 5f90e77c96348d33e4d4204206288a0164f24092 Mon Sep 17 00:00:00 2001 From: Johannes Doerfert Date: Mon, 3 Jun 2024 19:52:12 -0700 Subject: [PATCH] [Offload][CUDA] Allow CUDA kernels to use LLVM/Offload MIME-

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
farzonl wrote: > AArch64 has a udot and sdot instruction (and a usdot instruction). They > perform a "partial" reduction though, producing a v4i32 from two v16i8 > inputs. We would like to use those from the vectorizer and have recently > added a partial-reduction intrinsic, but doing it with

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #102364)

2024-08-12 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > The last time I followed this attempt was https://reviews.llvm.org/D150226, > where there was objection because it was ignored in system headers, so > effectively impossible to discover how widespread this is. When did this > become unignored in system headers? https://g

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Farzon Lotfi via cfe-commits
@@ -18470,22 +18470,14 @@ llvm::Value *CodeGenFunction::EmitScalarOrConstFoldImmArg(unsigned ICEArguments, return Arg; } -Intrinsic::ID getDotProductIntrinsic(QualType QT, int elementCount) { - if (QT->hasFloatingRepresentation()) { -switch (elementCount) { -case 2

[clang] c4724f6 - Fix assertion failure during conversion function overload resolution. (#98671)

2024-08-12 Thread via cfe-commits
Author: Daniel M. Katz Date: 2024-08-12T13:11:21-04:00 New Revision: c4724f60384917ef0f0e8cc32702fe02c3b3b1c9 URL: https://github.com/llvm/llvm-project/commit/c4724f60384917ef0f0e8cc32702fe02c3b3b1c9 DIFF: https://github.com/llvm/llvm-project/commit/c4724f60384917ef0f0e8cc32702fe02c3b3b1c9.diff

[clang] Fix assertion failure during conversion function overload resolution. (PR #98671)

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

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-12 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl demilestoned https://github.com/llvm/llvm-project/pull/102417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-12 Thread Anton Korobeynikov via cfe-commits
asl wrote: /cherry-pick https://github.com/llvm/llvm-project/commit/d179acd0484bac30c5ebbbed4d29a4734d92ac93 https://github.com/llvm/llvm-project/pull/102417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailma

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-12 Thread Anton Korobeynikov via cfe-commits
https://github.com/asl milestoned https://github.com/llvm/llvm-project/pull/102417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Document AddressSanitizer security considerations (PR #100937)

2024-08-12 Thread Evgenii Stepanov via cfe-commits
https://github.com/eugenis approved this pull request. https://github.com/llvm/llvm-project/pull/100937 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Implement -fptrauth-auth-traps. (PR #102417)

2024-08-12 Thread via cfe-commits
llvmbot wrote: /pull-request llvm/llvm-project#102938 https://github.com/llvm/llvm-project/pull/102417 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [sanitizer] Document AddressSanitizer security considerations (PR #100937)

2024-08-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 Discourse](https://discourse.llvm.org/t/hidden-email

[clang] 5629249 - [CUDA] Emit used function list in deterministic order. (#102661)

2024-08-12 Thread via cfe-commits
Author: Artem Belevich Date: 2024-08-12T10:21:23-07:00 New Revision: 5629249575f56f6135fb63e2f0d4ca9a7375167c URL: https://github.com/llvm/llvm-project/commit/5629249575f56f6135fb63e2f0d4ca9a7375167c DIFF: https://github.com/llvm/llvm-project/commit/5629249575f56f6135fb63e2f0d4ca9a7375167c.diff

[clang] [CUDA] Emit used function list in deterministic order. (PR #102661)

2024-08-12 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B closed https://github.com/llvm/llvm-project/pull/102661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #102364)

2024-08-12 Thread Jordan Rupprecht via cfe-commits
rupprecht wrote: > > The last time I followed this attempt was https://reviews.llvm.org/D150226, > > where there was objection because it was ignored in system headers, so > > effectively impossible to discover how widespread this is. When did this > > become unignored in system headers? > >

[clang] [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (PR #102414)

2024-08-12 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 updated https://github.com/llvm/llvm-project/pull/102414 >From c35e4ec3f8ea27eedc0658921d8d9055451acd91 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Wed, 7 Aug 2024 19:34:54 -0700 Subject: [PATCH 1/4] split out ROV from resource attr --- clang/include/clang/

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-12 Thread Eli Friedman via cfe-commits
@@ -3124,26 +3124,76 @@ RValue X86_64ABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, CGF.Builder.CreateStore(V, CGF.Builder.CreateStructGEP(Tmp, 1)); RegAddr = Tmp.withElementType(LTy); - } else if (neededInt) { -RegAddr = Address(CGF.Builder.CreateG

[clang] [sanitizer] Document AddressSanitizer security considerations (PR #100937)

2024-08-12 Thread Florian Mayer via cfe-commits
fmayer 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 > Discourse](https://discourse.llvm.org/t/hidden-emails-o

[clang] [Clang] handle both gnu and cpp11 attributes to ensure correct parsing inside extern block (PR #102864)

2024-08-12 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/102864 >From b0e53b1c8a687165fa28bd21200f83bf1b1a9234 Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Mon, 12 Aug 2024 13:56:30 +0300 Subject: [PATCH] [Clang] handle both gnu and cpp11 attributes to ensure correct

[clang] [Clang] handle both gnu and cpp11 attributes to ensure correct parsing inside extern block (PR #102864)

2024-08-12 Thread Oleksandr T. via cfe-commits
a-tarasyuk wrote: @AaronBallman could you review this PR? thanks https://github.com/llvm/llvm-project/pull/102864 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Replace bool <= bool comparison (PR #102948)

2024-08-12 Thread Mital Ashok via cfe-commits
https://github.com/MitalAshok created https://github.com/llvm/llvm-project/pull/102948 Closes #102912 >From fea4def3e66e7934718bab9d288094f7cbc5e4b7 Mon Sep 17 00:00:00 2001 From: Mital Ashok Date: Mon, 12 Aug 2024 19:03:53 +0100 Subject: [PATCH] [NFC] Replace bool <= bool --- clang/lib/Sema

[clang] [NFC] Replace bool <= bool comparison (PR #102948)

2024-08-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Mital Ashok (MitalAshok) Changes Closes #102912 --- Full diff: https://github.com/llvm/llvm-project/pull/102948.diff 1 Files Affected: - (modified) clang/lib/Sema/SemaOverload.cpp (+2-2) ``diff diff --git a/clang/lib/Sema/Sem

[clang] [NFC] Replace bool <= bool comparison (PR #102948)

2024-08-12 Thread Mital Ashok via cfe-commits
@@ -542,7 +542,7 @@ NarrowingKind StandardConversionSequence::getNarrowingKind( // If the bit-field width was dependent, it might end up being small // enough to fit in the target type (unless the target type is unsigned // and the source type is signed, in wh

[clang] [NFC] Deduplicate clang::AccessKinds to diagnostic strings (PR #102030)

2024-08-12 Thread Mital Ashok via cfe-commits
MitalAshok wrote: @cor3ntin Could you please merge this for me? Thanks https://github.com/llvm/llvm-project/pull/102030 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] c642816 - [NFC] Deduplicate clang::AccessKinds to diagnostic strings (#102030)

2024-08-12 Thread via cfe-commits
Author: Mital Ashok Date: 2024-08-12T20:30:40+02:00 New Revision: c6428162c13b330b26b1916a9d6c45ee41ff4a1e URL: https://github.com/llvm/llvm-project/commit/c6428162c13b330b26b1916a9d6c45ee41ff4a1e DIFF: https://github.com/llvm/llvm-project/commit/c6428162c13b330b26b1916a9d6c45ee41ff4a1e.diff L

[clang] [NFC] Deduplicate clang::AccessKinds to diagnostic strings (PR #102030)

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

[clang] [Clang] Overflow Pattern Exclusions (PR #100272)

2024-08-12 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/100272 >From 154d3505ab13275086b3dffed67bcdcac52f79a3 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 23 Jul 2024 20:21:49 + Subject: [PATCH 1/9] implement idiom exclusions Add flag `-fno-sanitize-overf

[clang] [Clang] Overflow Pattern Exclusions (PR #100272)

2024-08-12 Thread Justin Stitt via cfe-commits
@@ -4759,6 +4759,55 @@ ParenListExpr *ParenListExpr::CreateEmpty(const ASTContext &Ctx, return new (Mem) ParenListExpr(EmptyShell(), NumExprs); } +namespace { JustinStitt wrote: resolved by https://github.com/llvm/llvm-project/pull/100272/commits/2e3d4795

[clang] [HLSL] Split out the ROV attribute from the resource attribute, make it a new spellable attribute. (PR #102414)

2024-08-12 Thread Justin Bogner via cfe-commits
@@ -116,12 +116,17 @@ struct BuiltinTypeDeclBuilder { QualType(TTD->getTypeForDecl(), 0)); } // add handle member -llvm::SmallVector Attrs; Attr *ResourceClassAttr = HLSLResourceClassAttr::CreateImplicit(Record->getASTContext(), RC); A

[clang] [Clang][Sema] fix noexecpt mismatch of friend declaration (PR #102267)

2024-08-12 Thread Krystian Stasiowski via cfe-commits
sdkrystian wrote: I don't think this is the right approach. What I think we _should_ be doing is to compare the operands of the _noexcept-specifier_ the same way we compare constraints (i.e. substitute so all references to template parameters have the correct depth and _then_ check whether the

[clang] [llvm] [DataLayout] Remove constructor accepting a pointer to Module (PR #102841)

2024-08-12 Thread Sergei Barannikov via cfe-commits
https://github.com/s-barannikov updated https://github.com/llvm/llvm-project/pull/102841 >From 8382e3ed0a5546fff4ed662a7abbaa39e2f0c22a Mon Sep 17 00:00:00 2001 From: Sergei Barannikov Date: Mon, 12 Aug 2024 04:08:54 +0300 Subject: [PATCH] [DataLayout] Remove constructor accepting a pointer to

[clang] [X86_64] Fix empty field error in vaarg of C++. (PR #101639)

2024-08-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/101639 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Adjust requires clause wrapping (#101550) (PR #102078)

2024-08-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/102078 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CUDA] Add a pseudo GPU sm_next which allows overriding for SM/PTX version. (PR #100247)

2024-08-12 Thread Artem Belevich via cfe-commits
Artem-B wrote: OK, I've reworked the patch, and it appears to correctly propagate arbitrary SM/PTX versions from clang, down to the LLVM and generated PTX, and to ptxas and fatbinary command line options. PTAL. https://github.com/llvm/llvm-project/pull/100247

[clang] [llvm] Add normalize builtins and normalize HLSL function to DirectX and SPIR-V backend (PR #102683)

2024-08-12 Thread Joshua Batista via cfe-commits
@@ -4725,6 +4725,12 @@ def HLSLMad : LangBuiltin<"HLSL_LANG"> { let Prototype = "void(...)"; } +def HLSLNormalize : LangBuiltin<"HLSL_LANG"> { + let Spellings = ["__builtin_hlsl_normalize"]; bob80905 wrote: I don't believe normalize is an elementwise opera

[clang] [llvm] [CUDA] Add a pseudo GPU sm_next which allows overriding for SM/PTX version. (PR #100247)

2024-08-12 Thread Joseph Huber via cfe-commits
@@ -553,9 +562,23 @@ void NVPTX::FatBinary::ConstructJob(Compilation &C, const JobAction &JA, continue; // We need to pass an Arch of the form "sm_XX" for cubin files and // "compute_XX" for ptx. -const char *Arch = (II.getType() == types::TY_PP_Asm) -

[clang] [llvm] [CUDA] Add a pseudo GPU sm_next which allows overriding for SM/PTX version. (PR #100247)

2024-08-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. LG in general https://github.com/llvm/llvm-project/pull/100247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [CUDA] Add a pseudo GPU sm_next which allows overriding for SM/PTX version. (PR #100247)

2024-08-12 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 edited https://github.com/llvm/llvm-project/pull/100247 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks edited https://github.com/llvm/llvm-project/pull/102894 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
@@ -47,8 +47,7 @@ void printLine(llvm::raw_ostream &OS, const UnwrappedLine &Line, OS << Prefix; NewLine = false; } -OS << I->Tok->Tok.getName() << "[" - << "T=" << (unsigned)I->Tok->getType() +OS << I->Tok->Tok.getName() << "[" << "T=" << (unsign

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
@@ -346,6 +345,35 @@ bool UnwrappedLineParser::precededByCommentOrPPDirective() const { (Previous->IsMultiline || Previous->NewlinesBefore > 0); } +void UnwrappedLineParser::parseStmt(bool keepIndentation) { + bool levelsAreAdded = (Line->Level == DeclarationScopeSt

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks requested changes to this pull request. First of all you need a better title for your change, beginning with "[clang-format]" Second of all, could you please split this in multiple reviews? Third of all, you need to add tests. https://github.com/llvm/llvm

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
@@ -465,6 +493,9 @@ bool UnwrappedLineParser::parseLevel(const FormatToken *OpeningBrace, SwitchLabelEncountered = true; parseStructuralElement(); break; +case tok::kw_using: + parseStmt(Style.IndentUsingDeclarations); HazardyKnusper

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
@@ -5104,6 +5144,9 @@ struct FormatStyle { IndentCaseBlocks == R.IndentCaseBlocks && IndentCaseLabels == R.IndentCaseLabels && IndentExternBlock == R.IndentExternBlock && + IndentNamespaceAliases == R.IndentNamespaceAliases && +

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
@@ -2822,6 +2822,46 @@ struct FormatStyle { /// \version 11 IndentExternBlockStyle IndentExternBlock; + /// IndentNamespaceAliases is the type of indenting of namespace aliases + /// irrespective of NamespaceIndentation. + bool IndentNamespaceAliases; H

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
@@ -346,6 +345,35 @@ bool UnwrappedLineParser::precededByCommentOrPPDirective() const { (Previous->IsMultiline || Previous->NewlinesBefore > 0); } +void UnwrappedLineParser::parseStmt(bool keepIndentation) { + bool levelsAreAdded = (Line->Level == DeclarationScopeSt

[clang] Fixes and closes issues, #53390 and #58710. Added new controls to IndentNamespaceAliases, IndentUsingDeclarations and DecorateReflowedComments. (PR #102894)

2024-08-12 Thread Björn Schäpers via cfe-commits
@@ -2822,6 +2822,46 @@ struct FormatStyle { /// \version 11 IndentExternBlockStyle IndentExternBlock; + /// IndentNamespaceAliases is the type of indenting of namespace aliases + /// irrespective of NamespaceIndentation. + bool IndentNamespaceAliases; + + /// IndentUsi

[clang] [clang-format] Correctly handle C# attribute on auto property (PR #102921)

2024-08-12 Thread Björn Schäpers via cfe-commits
https://github.com/HazardyKnusperkeks approved this pull request. https://github.com/llvm/llvm-project/pull/102921 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Safe Buffers] Fix a small bug recently found (PR #102953)

2024-08-12 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/102953 `QualType::isConstantArrayType()` checks canonical type. So a following cast should be applied to canonical type as well: ``` if (Ty->isConstantArrayType()) cast(Ty.getCanonicalType()); // cast(Ty) is

[clang] [Safe Buffers] Fix a small bug recently found (PR #102953)

2024-08-12 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-analysis Author: Ziqing Luo (ziqingluo-90) Changes `QualType::isConstantArrayType()` checks canonical type. So a following cast should be applied to canonical type as well: ``` if (Ty->isConstantArrayType()) cast(Ty.getCanoni

[clang] [clang] Turn -Wenum-constexpr-conversion into a hard error (PR #102364)

2024-08-12 Thread Carlos Galvez via cfe-commits
carlosgalvezp wrote: Since boost/mpl is at the core of issues and many projects depend directly or transitively on it, I think it might be good to wait until version 1.86 is released, so people can bump to a release version instead of trunk. It should be around the corner, [AFAICS](https://ww

[clang-tools-extra] b4bc7b1 - [clang-doc] add support for comments for members in HTML output (#101255)

2024-08-12 Thread via cfe-commits
Author: PeterChou1 Date: 2024-08-12T15:08:30-04:00 New Revision: b4bc7b182c696c540f40bc887d7d20a95a0a5cde URL: https://github.com/llvm/llvm-project/commit/b4bc7b182c696c540f40bc887d7d20a95a0a5cde DIFF: https://github.com/llvm/llvm-project/commit/b4bc7b182c696c540f40bc887d7d20a95a0a5cde.diff LO

[clang-tools-extra] [clang-doc] add support for comments for members in HTML output (PR #101255)

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

[clang] [llvm] [HLSL][DXIL][SPIRV] Create llvm dot intrinsic and use for HLSL (PR #102872)

2024-08-12 Thread Greg Roth via cfe-commits
@@ -1366,6 +1383,67 @@ bool SPIRVInstructionSelector::selectRsqrt(Register ResVReg, .constrainAllUses(TII, TRI, RBI); } +// Since there is no integer dot implementation, expand by piecewise multiplying pow2clk wrote: Those are fairly recent SPIRV exte

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-12 Thread Eli Friedman via cfe-commits
@@ -67,33 +327,85 @@ declare i32 @e3(ptr nocapture byval(%struct.LargeStruct) align 16 %in) nounwind ; We can't do tail call since address of s is passed to the callee and part of ; s is in caller's local frame. efriedma-quic wrote: Pretty sure this comment is

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic commented: Please also add a testcase for something like: ``` struct Large { int x[60]; }; void f(long long a, long long b, Large c, Large d); void g(long long a, long long b, Large c, Large d) { [[clang::musttail]] return f(a,b,d,c); } ``` https://github.com/l

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-12 Thread Eli Friedman via cfe-commits
https://github.com/efriedma-quic edited https://github.com/llvm/llvm-project/pull/102896 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-12 Thread Eli Friedman via cfe-commits
@@ -540,6 +540,8 @@ class CCState { }); } + void dump() const; efriedma-quic wrote: `#ifndef NDEBUG`? https://github.com/llvm/llvm-project/pull/102896 ___ cfe-commits mailing list cfe-commits@list

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-12 Thread Eli Friedman via cfe-commits
@@ -5085,7 +5085,7 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo, RawAddress SRetAlloca = RawAddress::invalid(); llvm::Value *UnusedReturnSizePtr = nullptr; if (RetAI.isIndirect() || RetAI.isInAlloca() || RetAI.isCoerceAndExpand()) { -if (IsVirtu

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-12 Thread Eli Friedman via cfe-commits
@@ -1,3 +1,4 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 5 ; RUN: llc -mtriple armv7 -target-abi aapcs -float-abi soft -O0 -o - < %s \ ; RUN: | FileCheck %s -check-prefix CHECK-SOFT -check-prefix CHECK

[clang] [llvm] [ARM] musttail fixes (PR #102896)

2024-08-12 Thread Eli Friedman via cfe-commits
@@ -3088,70 +3057,44 @@ bool ARMTargetLowering::IsEligibleForTailCallOptimization( getEffectiveCallingConv(CalleeCC, isVarArg), getEffectiveCallingConv(CallerCC, CallerF.isVarArg()), MF, C, Ins, CCAssignFnForReturn(CalleeCC, isVarArg), -

<    1   2   3   4   5   >