[clang] [llvm] [Clang] Match MSVC handling of duplicate header search paths in Microsoft compatibility modes. (PR #105738)

2024-11-04 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/105738 >From a9b1711372a5f1a2294ba5f8b437a6020023a810 Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Thu, 22 Aug 2024 09:44:56 -0700 Subject: [PATCH] [Clang] Match MSVC handling of duplicate header search paths

[clang] Add clang atomic control options and attribute (PR #114841)

2024-11-04 Thread Artem Belevich via cfe-commits
@@ -1093,6 +1097,169 @@ inline void FPOptions::applyChanges(FPOptionsOverride FPO) { *this = FPO.applyOverrides(*this); } +/// Atomic control options +class AtomicOptionsOverride; +class AtomicOptions { +public: + using storage_type = uint16_t; + + static constexpr unsign

[clang] [llvm] [HLSL][DXIL] Implement `asdouble` intrinsic (PR #114847)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic edited https://github.com/llvm/llvm-project/pull/114847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Matt Arsenault via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
https://github.com/joaosaffran ready_for_review https://github.com/llvm/llvm-project/pull/114588 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Matt Arsenault via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Matt Arsenault via cfe-commits
@@ -6,48 +7,78 @@ ; RUN: opt -O3 -S < %s | FileCheck -check-prefix=OPT %s ; RUN: opt -mtriple=amdgcn-- -O3 -S < %s | FileCheck -check-prefix=OPT %s -; RUN: opt -mtriple=amdgcn-- -O3 -mattr=+wavefrontsize32 -S < %s | FileCheck -check-prefix=OPT %s -; RUN: opt -mtriple=amdgcn--

[clang] [clang] Add maintainer for Recovery expressions. (PR #114859)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Haojian Wu (hokein) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114859.diff 1 Files Affected: - (modified) clang/Maintainers.rst (+6) ``diff diff --git a/clang/Maintainers.rst b/clang/Maintainers.rst ind

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread Farzon Lotfi via cfe-commits
@@ -99,6 +99,42 @@ static void initializeAlloca(CodeGenFunction &CGF, AllocaInst *AI, Value *Size, I->addAnnotationMetadata("auto-init"); } +static Value *handleHlslClip(const CallExpr *E, CodeGenFunction *CGF) { + Value *Op0 = CGF->EmitScalarExpr(E->getArg(0)); + + Const

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread Eli Friedman via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Akshay Deodhar via cfe-commits
@@ -1,8 +1,17 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, << NewFD; } -if (!Redeclaration && LangOpts.CUDA) +if (!Redeclaration && LangOpts.CUDA) { akshayrdeodhar wrote: This makes sense. Perhaps a wa

[clang] [clang] Add maintainer for Recovery expressions. (PR #114859)

2024-11-04 Thread Haojian Wu via cfe-commits
https://github.com/hokein created https://github.com/llvm/llvm-project/pull/114859 None >From 04254d2352a385df1ab57c855d6b5de6e668844d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 4 Nov 2024 21:01:32 +0100 Subject: [PATCH] [clang] Add maintainer for Recovery expressions. --- clang/Ma

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-hlsl @llvm/pr-subscribers-backend-directx @llvm/pr-subscribers-backend-x86 Author: None (joaosaffran) Changes Adding HLSL `clip` function. - adding llvm intrinsic - adding sema checks - adding dxil lowering - ading spirv lowering - adding sema tests

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Matt Arsenault via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] Revert "[HLSL] add IsTypedResourceElementCompatible type trait" (PR #114853)

2024-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 created https://github.com/llvm/llvm-project/pull/114853 Reverts llvm/llvm-project#113730 >From c110aaa2eb7862657df58c5f76e4231f27110450 Mon Sep 17 00:00:00 2001 From: Joshua Batista Date: Mon, 4 Nov 2024 11:11:46 -0800 Subject: [PATCH] Revert "[HLSL] add IsTypedRes

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Yaxun Liu via cfe-commits
@@ -1450,6 +1450,13 @@ def CUDAHost : InheritableAttr { } def : MutualExclusions<[CUDAGlobal, CUDAHost]>; +def CUDAGridConstant : InheritableAttr { + let Spellings = [GNU<"grid_constant">, Declspec<"__grid_constant__">]; + let Subjects = SubjectList<[ParmVar]>; + let LangOp

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx edited https://github.com/llvm/llvm-project/pull/114481 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114481 >From 3ba88ce598aaab269169f0a5db5981c9a9ac8603 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Thu, 31 Oct 2024 22:38:36 + Subject: [PATCH 1/9] Add pass to handle AMDGCN pseudo-intrinsics (abstract placehol

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-04 Thread via cfe-commits
@@ -318,6 +318,7 @@ TEST_F(TargetLibraryInfoTest, ValidProto) { "declare void @qsort(i8*, i64, i64, i32 (i8*, i8*)*)\n" "declare i64 @readlink(i8*, i8*, i64)\n" "declare i8* @realloc(i8*, i64)\n" + "declare i8* @reallocarray(i8*, i64, i64)\n"

[clang] Add Chris as the HLSL maintainer (PR #114863)

2024-11-04 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman created https://github.com/llvm/llvm-project/pull/114863 Chris has extensive knowledge of HLSL and a long track-record of quality reviews in Clang. >From c59ce9bdbf292f80b638c9583b0022b496d82f2b Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Mon, 4 Nov 2024

[clang] Add Chris as the HLSL maintainer (PR #114863)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Aaron Ballman (AaronBallman) Changes Chris has extensive knowledge of HLSL and a long track-record of quality reviews in Clang. --- Full diff: https://github.com/llvm/llvm-project/pull/114863.diff 1 Files Affected: - (modified) clang/M

[clang] [llvm] [HLSL][DXIL] Implement `asdouble` intrinsic (PR #114847)

2024-11-04 Thread Finn Plummer via cfe-commits
inbelic wrote: Please ignore the first commit when reviewing. It is separately reviewed here: #114849 https://github.com/llvm/llvm-project/pull/114847 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [llvm] [TLI] Add support for reallocarray (PR #114818)

2024-11-04 Thread Matt Arsenault via cfe-commits
@@ -318,6 +318,7 @@ TEST_F(TargetLibraryInfoTest, ValidProto) { "declare void @qsort(i8*, i64, i64, i32 (i8*, i8*)*)\n" "declare i64 @readlink(i8*, i8*, i64)\n" "declare i8* @realloc(i8*, i64)\n" + "declare i8* @reallocarray(i8*, i64, i64)\n"

[clang] Enable matrices in HLSL (PR #111415)

2024-11-04 Thread Greg Roth via cfe-commits
@@ -17,12 +17,12 @@ void add(sx10x10_t a, sx5x10_t b, sx10x5_t c) { // expected-error@-1 {{assigning to 'sx10x10_t' (aka 'float __attribute__((matrix_type(10, 10)))') from incompatible type 'sx5x10_t' (aka 'float __attribute__((matrix_type(5, 10)))')}} a = b + &c; - //

[clang] Enable matrices in HLSL (PR #111415)

2024-11-04 Thread Chris B via cfe-commits
@@ -1,7 +1,5 @@ // RUN: %clang_cc1 -O0 -fenable-matrix -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-passes -o - -std=c++11 | FileCheck --check-prefixes=CHECK,NOOPT %s // RUN: %clang_cc1 -O1 -fenable-matrix -triple x86_64-apple-darwin %s -emit-llvm -disable-llvm-pas

[clang] Add Chris as the HLSL maintainer (PR #114863)

2024-11-04 Thread Chris B via cfe-commits
https://github.com/llvm-beanz approved this pull request. Thank you for the vote of confidence :smile: https://github.com/llvm/llvm-project/pull/114863 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang-tools-extra] [clangd] Fix use-after-free issues in TidyProvider.cpp (PR #114808)

2024-11-04 Thread Haojian Wu via cfe-commits
hokein wrote: > can we instead change the function return types to be `TidyProvider` ? unless > there's something we get by making these static lambdas (which isn't obvious > to me). Sure, Done. https://github.com/llvm/llvm-project/pull/114808 ___

[clang] Revert "[HLSL] add IsTypedResourceElementCompatible type trait" (PR #114853)

2024-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 edited https://github.com/llvm/llvm-project/pull/114853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Akshay Deodhar via cfe-commits
akshayrdeodhar wrote: The LLVM-facing parts of this lgtm https://github.com/llvm/llvm-project/pull/114589 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert add builtin line vector compatible (PR #114852)

2024-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/114852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Akshay Deodhar via cfe-commits
@@ -1,8 +1,17 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, << NewFD; } -if (!Redeclaration && LangOpts.CUDA) +if (!Redeclaration && LangOpts.CUDA) { akshayrdeodhar wrote: Is it possible to add a check

[clang] Revert "[HLSL] add IsTypedResourceElementCompatible type trait" (PR #114853)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joshua Batista (bob80905) Changes Reverts llvm/llvm-project#113730 --- Full diff: https://github.com/llvm/llvm-project/pull/114853.diff 6 Files Affected: - (modified) clang/include/clang/Basic/TokenKinds.def (-1) - (modified) clang/inc

[clang] [llvm] [HLSL] implement elementwise firstbithigh hlsl builtin (PR #111082)

2024-11-04 Thread Sarah Spall via cfe-commits
spall wrote: Waiting on #114482 https://github.com/llvm/llvm-project/pull/111082 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Matt Arsenault via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Matt Arsenault via cfe-commits
@@ -1,3 +1,4 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 arsenm wrote: The tests for this should go in test/InstCombine/AMDGPU https://github.com/llvm/llvm-project/pull/114481

[clang] Revert "[HLSL] add IsTypedResourceElementCompatible type trait" (PR #114853)

2024-11-04 Thread Joshua Batista via cfe-commits
https://github.com/bob80905 closed https://github.com/llvm/llvm-project/pull/114853 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] prevent assertion failure from an invalid template instantiation pattern when adding instantiated params to the scope in friend functions with defaulted params (PR #113777)

2024-11-04 Thread Oleksandr T. via cfe-commits
@@ -3437,10 +3437,10 @@ bool Sema::SubstDefaultArgument( // template void f(T a, int = decltype(a)()); // void g() { f(0); } LIS = std::make_unique(*this); - FunctionDecl *PatternFD = FD->getTemplateInstantiationPattern( - /*ForDefinition*/ f

[clang] [HLSL] add IsTypedResourceElementCompatible type trait (PR #114864)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Joshua Batista (bob80905) Changes This PR implements a new type trait as a builtin, __builtin_hlsl_is_typed_resource_element_compatible This type traits verifies that the given input type is suitable as a typed resource element type. It c

[clang] [analyzer] Refine LCV handling in Store for better taint propagation (PR #114835)

2024-11-04 Thread Balazs Benics via cfe-commits
https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/114835 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Artem Belevich via cfe-commits
@@ -1,8 +1,17 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, << NewFD; } -if (!Redeclaration && LangOpts.CUDA) +if (!Redeclaration && LangOpts.CUDA) { Artem-B wrote: I deliberately decided *not* to do th

[clang] Don't redundantly specify the default template argument to `BumpPtrAllocatorImpl` (PR #114857)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Richard Smith (zygoloid) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114857.diff 2 Files Affected: - (modified) clang/lib/AST/ByteCode/DynamicAllocator.h (+1-1) - (modified) clang/lib/AST/ByteCode/Program.h (+1-1)

[clang] Don't redundantly specify the default template argument to `BumpPtrAllocatorImpl` (PR #114857)

2024-11-04 Thread Richard Smith via cfe-commits
https://github.com/zygoloid created https://github.com/llvm/llvm-project/pull/114857 None >From 25047a9f9b8b961451bef0d0c526944d17ffe9d7 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Mon, 4 Nov 2024 11:27:46 -0800 Subject: [PATCH 1/2] Don't redundantly specify the default template argumen

[clang] [clang-tools-extra] [analyzer] Remove alpha.core.IdenticalExpr Checker (PR #114715)

2024-11-04 Thread Balazs Benics via cfe-commits
steakhal wrote: I'm pretty sure last time I've compared this checker to the tidy implementation, I saw slight differences. Have you thoroughly compared the two? Have you seen discrepancies? Speaking of the tests, I'd also prefer migrating existing ones to uncover differences. Unfortunately, fr

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Alex Voicu via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [CUDA] Add support for __grid_constant__ attribute (PR #114589)

2024-11-04 Thread Artem Belevich via cfe-commits
@@ -1,8 +1,17 @@ bool Sema::CheckFunctionDeclaration(Scope *S, FunctionDecl *NewFD, << NewFD; } -if (!Redeclaration && LangOpts.CUDA) +if (!Redeclaration && LangOpts.CUDA) { Artem-B wrote: My mental model of whether we should

[clang] [clang] Add maintainer for Recovery expressions. (PR #114859)

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

[clang] [clang] Add maintainer for Recovery expressions. (PR #114859)

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

[clang] [clang] Add maintainer for Recovery expressions. (PR #114859)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -69,6 +69,12 @@ Sema | aeternalmail\@gmail.com (email), Sirraide (GitHub), Ætérnal (Discord), Sirraide (Discourse) +Recovery AST + +| Haojian Wu +| hokein.wu\@gmail.com (email), hokein (Phabricator), hokein (GitHub) AaronBallman wrote: If you

[clang] [clang] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Saleem Abdulrasool via cfe-commits
@@ -444,6 +454,16 @@ class ParamInfo : public VariableInfo { NoEscape = Value.value_or(false); } + std::optional isLifetimebound() const { +if (!LifetimeboundSpecified) + return std::nullopt; +return Lifetimebound; compnerd wrote: ```sugge

[clang] [clang] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Saleem Abdulrasool via cfe-commits
@@ -860,13 +868,12 @@ void Sema::ProcessAPINotes(Decl *D) { if (!D) return; + auto *DC = D->getDeclContext(); // Globals. - if (D->getDeclContext()->isFileContext() || - D->getDeclContext()->isNamespace() || - D->getDeclContext()->isExternCContext() || -

[clang] [clang] Add preliminary lifetimebound support to APINotes (PR #114830)

2024-11-04 Thread Saleem Abdulrasool via cfe-commits
https://github.com/compnerd approved this pull request. https://github.com/llvm/llvm-project/pull/114830 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 2c68227 - Revert "[HLSL] add IsTypedResourceElementCompatible type trait" (#114853)

2024-11-04 Thread via cfe-commits
Author: Joshua Batista Date: 2024-11-04T11:14:04-08:00 New Revision: 2c682272ae7b307ca6e803de1c74baae152ef44c URL: https://github.com/llvm/llvm-project/commit/2c682272ae7b307ca6e803de1c74baae152ef44c DIFF: https://github.com/llvm/llvm-project/commit/2c682272ae7b307ca6e803de1c74baae152ef44c.diff

[compiler-rt] [libunwind] [AArch64] Fix nofp regressions in compiler-rt and libunwind (PR #111235)

2024-11-04 Thread Alexander Richardson via cfe-commits
@@ -238,7 +236,8 @@ END_COMPILERRT_OUTLINE_FUNCTION(__arm_sc_memcpy) DEFINE_COMPILERRT_FUNCTION_ALIAS(__arm_sc_memmove, __arm_sc_memcpy) - +// This version uses FP registers. Use this only on targets with them +#if defined(__aarch64__) && __ARM_FP != 0 aricha

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Alex Voicu via cfe-commits
@@ -1024,6 +1024,15 @@ GCNTTIImpl::instCombineIntrinsic(InstCombiner &IC, IntrinsicInst &II) const { } break; } + case Intrinsic::amdgcn_wavefrontsize: { +// TODO: this is a workaround for the pseudo-generic target one gets with no +// specified mcpu, which

[clang] [llvm] [llvm][AMDGPU] Fold `llvm.amdgcn.wavefrontsize` early (PR #114481)

2024-11-04 Thread Alex Voicu via cfe-commits
@@ -6,48 +7,78 @@ ; RUN: opt -O3 -S < %s | FileCheck -check-prefix=OPT %s ; RUN: opt -mtriple=amdgcn-- -O3 -S < %s | FileCheck -check-prefix=OPT %s -; RUN: opt -mtriple=amdgcn-- -O3 -mattr=+wavefrontsize32 -S < %s | FileCheck -check-prefix=OPT %s -; RUN: opt -mtriple=amdgcn--

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/112792 >From 802764e879862541e205ba1a070824b71d2fef9a Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Thu, 17 Oct 2024 17:31:24 -0500 Subject: [PATCH 1/7] [emacs][clang-format] Add elisp API for clang-format on

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread via cfe-commits
https://github.com/goldsteinn updated https://github.com/llvm/llvm-project/pull/112792 >From 802764e879862541e205ba1a070824b71d2fef9a Mon Sep 17 00:00:00 2001 From: Noah Goldstein Date: Thu, 17 Oct 2024 17:31:24 -0500 Subject: [PATCH 1/8] [emacs][clang-format] Add elisp API for clang-format on

[clang] [emacs][clang-format] Add elisp API for clang-format on git diffs (PR #112792)

2024-11-04 Thread via cfe-commits
@@ -146,18 +146,118 @@ is a zero-based file offset, assuming ‘utf-8-unix’ coding." (lambda (byte &optional _quality _coding-system) (byte-to-position (1+ byte) -;;;###autoload -(defun clang-format-region (start end &optional style assume-file-name) - "Use clang

[clang] Enable matrices in HLSL (PR #111415)

2024-11-04 Thread Chris B via cfe-commits
@@ -852,34 +852,51 @@ void TypePrinter::printExtVectorAfter(const ExtVectorType *T, raw_ostream &OS) { void TypePrinter::printConstantMatrixBefore(const ConstantMatrixType *T, raw_ostream &OS) { + if (Policy.UseHLSLTypes) +OS <

[clang] [HLSL][SPIRV] Add HLSL type translation for spirv. (PR #114273)

2024-11-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota commented: LGTM! https://github.com/llvm/llvm-project/pull/114273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -0,0 +1,182 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O2 -emit-llvm -o - %s | FileCheck %s --check-prefix=X86_64 +// RUN: %clang_cc1 -triple i386-unknown-unknown

[clang] [llvm] [AMDGPU] modify named barrier builtins and intrinsics (PR #114550)

2024-11-04 Thread Gang Chen via cfe-commits
cmc-rep wrote: Also, I added the piece in AMDGPULowerModuleLDS during internal review because other reviewers want to see the functional completeness. https://github.com/llvm/llvm-project/pull/114550 ___ cfe-commits mailing list cfe-commits@lists.llvm

[clang] [WIP][-Wunsafe-buffer-usage] Add alloc_size knowledge to the 2-param span constructor warning (PR #114894)

2024-11-04 Thread Ziqing Luo via cfe-commits
https://github.com/ziqingluo-90 created https://github.com/llvm/llvm-project/pull/114894 We can take advantage of the attribute `alloc_size`. For example, ``` void * malloc(size_t size) __attribute__((alloc_size(1))); std::span{(char *)malloc(x), x}; // this is safe ``` rdar://136634730 >F

[clang] [WIP][-Wunsafe-buffer-usage] Add alloc_size knowledge to the 2-param span constructor warning (PR #114894)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Ziqing Luo (ziqingluo-90) Changes We can take advantage of the attribute `alloc_size`. For example, ``` void * malloc(size_t size) __attribute__((alloc_size(1))); std::span{(char *)malloc(x), x}; // this is safe ``` rdar://1366347

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Yeoul Na via cfe-commits
@@ -0,0 +1,182 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 +// RUN: %clang_cc1 -triple x86_64-unknown-unknown -O2 -emit-llvm -o - %s | FileCheck %s --check-prefix=X86_64 +// RUN: %clang_cc1 -triple i386-unknown-unknown

[clang] [HLSL] Add Append/ConsumeStructuredBuffer definitions to HLSLExternalSemaSource (PR #113643)

2024-11-04 Thread Helena Kotas via cfe-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/113643 >From 497d0f2c2d0c84603f3b3434aaee0e23722cd701 Mon Sep 17 00:00:00 2001 From: Helena Kotas Date: Thu, 24 Oct 2024 20:32:28 -0700 Subject: [PATCH 1/5] [HLSL] Add AppendStructuredBuffer and ConsumeStructuredBuffer

[clang] [WIP][-Wunsafe-buffer-usage] Add alloc_size knowledge to the 2-param span constructor warning (PR #114894)

2024-11-04 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 bb9ff32867d633787b5dd2572bc6e2fe5dade107 3f4032e61fc6a847293cb53e44c8fee63b647bdc --e

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Bill Wendling via cfe-commits
@@ -16,6 +16,8 @@ void test1(struct fam_struct *ptr, int size, int idx) { *__builtin_counted_by_ref(ptr->array) = size; // ok *__builtin_counted_by_ref(&ptr->array[idx]) = size; // ok + *__builtin_counted_by_ref(&ptr->array) = size;// ok

[clang] [Clang] Add __builtin_counted_by_ref builtin (PR #114495)

2024-11-04 Thread Yeoul Na via cfe-commits
@@ -16,6 +16,8 @@ void test1(struct fam_struct *ptr, int size, int idx) { *__builtin_counted_by_ref(ptr->array) = size; // ok *__builtin_counted_by_ref(&ptr->array[idx]) = size; // ok + *__builtin_counted_by_ref(&ptr->array) = size;// ok

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

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

[clang] [llvm] [HLSL] Adding HLSL `clip` function. (PR #114588)

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

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
@@ -0,0 +1,35 @@ +//===- QueryProfile.h - clang-query -*- C++ -*-===// +// +// 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: Apa

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/114806 >From dfd42c06d94f859ec78ec1e5c3386c0e4016386f Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 4 Nov 2024 22:37:51 +0800 Subject: [PATCH 1/4] [clang-query] add basic profiling on matching each ASTs Sample ou

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
@@ -0,0 +1,35 @@ +//===- QueryProfile.h - clang-query -*- C++ -*-===// +// +// 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: Apa

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic (PR #113623)

2024-11-04 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/113623 >From 81dfa26a941f7a0926a3126fe3ebbb4d2a67cec1 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 23 Oct 2024 22:59:15 + Subject: [PATCH 01/14] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
https://github.com/danix800 updated https://github.com/llvm/llvm-project/pull/114806 >From dfd42c06d94f859ec78ec1e5c3386c0e4016386f Mon Sep 17 00:00:00 2001 From: dingfei Date: Mon, 4 Nov 2024 22:37:51 +0800 Subject: [PATCH 1/6] [clang-query] add basic profiling on matching each ASTs Sample ou

[clang] [clang][bytecode] Fix discarding __builtin_bit_cast calls (PR #114926)

2024-11-04 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Timm Baeder (tbaederr) Changes Optionally prepare storage for the result and do the bitcast anyway, to get the right diagnostic output. --- Full diff: https://github.com/llvm/llvm-project/pull/114926.diff 2 Files Affected: - (modified)

[clang] [CGObjC] Use llvm::isKnownNonZero to determine if receiver can be null. (PR #114914)

2024-11-04 Thread Ellis Hoag via cfe-commits
ellishg wrote: Yeah it seems good to me, but we should have a test case too https://github.com/llvm/llvm-project/pull/114914 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [LoongArch] Support amcas[_db].{b/h/w/d} instructions. (PR #114189)

2024-11-04 Thread via cfe-commits
@@ -0,0 +1,5025 @@ +; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py +; RUN: llc --mtriple=loongarch64 -mattr=+d,-lamcas < %s | FileCheck %s --check-prefix=LA64 +; RUN: llc --mtriple=loongarch64 -mattr=+d,+lamcas < %s | FileCheck %s --check-prefix=LA

[clang] [ItaniumMangle] Fix `cp` versus `cl` call expression mangling for block scope (PR #114884)

2024-11-04 Thread John McCall via cfe-commits
rjmccall wrote: > > Can we find a way to re-use the code between this and the actual lookup > > code? Feels like we could have some sort of predicate like > > `doesLookupResultSuppressADL(NamedDecl*)`. Or are we forced to use slightly > > different predicates for some compatibility reason? >

[clang] bf43a13 - [clang] Initialize DeclaratorDecl.ExtInfo.TInfo to null (#114198)

2024-11-04 Thread via cfe-commits
Author: Boaz Brickner Date: 2024-11-05T08:57:52+01:00 New Revision: bf43a138f0a6220cd043a376200bd739cacb25e3 URL: https://github.com/llvm/llvm-project/commit/bf43a138f0a6220cd043a376200bd739cacb25e3 DIFF: https://github.com/llvm/llvm-project/commit/bf43a138f0a6220cd043a376200bd739cacb25e3.diff

[clang] [clang] Initialize DeclaratorDecl.ExtInfo.TInfo to null (PR #114198)

2024-11-04 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb closed https://github.com/llvm/llvm-project/pull/114198 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang-query] add basic profiling on matching each ASTs (PR #114806)

2024-11-04 Thread Ding Fei via cfe-commits
@@ -0,0 +1,35 @@ +//===- QueryProfile.h - clang-query -*- C++ -*-===// +// +// 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: Apa

[clang] [clang][bytecode] Fix discarding __builtin_bit_cast calls (PR #114926)

2024-11-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/114926 Optionally prepare storage for the result and do the bitcast anyway, to get the right diagnostic output. >From 76e549b6fab3021050148ee0555b7ac6ea20b7ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4de

[clang] [clang][bytecode] Support bitcasting into float fields (PR #114825)

2024-11-04 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr closed https://github.com/llvm/llvm-project/pull/114825 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [libunwind] [llvm] [cmake] Remove obsolete files, docs and CMake variables related to the standalone build (PR #112741)

2024-11-04 Thread Petr Hosek via cfe-commits
https://github.com/petrhosek commented: LGTM https://github.com/llvm/llvm-project/pull/112741 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Correctly initialize placeholder fields from their initializers (PR #114196)

2024-11-04 Thread via cfe-commits
https://github.com/cor3ntin updated https://github.com/llvm/llvm-project/pull/114196 >From a9e9ea542ec0ef8c72982e619c746a86971b8745 Mon Sep 17 00:00:00 2001 From: Corentin Jabot Date: Wed, 30 Oct 2024 10:25:42 +0100 Subject: [PATCH] [Clang] Correctly initialize placeholder fields from their in

[clang] 7767aa4 - [XRay][AArch64] Support -fxray-shared (#114431)

2024-11-04 Thread via cfe-commits
Author: Sebastian Kreutzer Date: 2024-11-04T23:05:05-08:00 New Revision: 7767aa45abf9706fa5ec9a2b182f3ccde92a93f0 URL: https://github.com/llvm/llvm-project/commit/7767aa45abf9706fa5ec9a2b182f3ccde92a93f0 DIFF: https://github.com/llvm/llvm-project/commit/7767aa45abf9706fa5ec9a2b182f3ccde92a93f0.

[clang] [RFC] Initial implementation of P2719 (PR #113510)

2024-11-04 Thread Oliver Hunt via cfe-commits
ojhunt wrote: Ok, so I've gone through all my GitHub settings, and am hoping for a comment or something, to see if GH will actually ping me this time :D https://github.com/llvm/llvm-project/pull/113510 ___ cfe-commits mailing list cfe-commits@lists.ll

[clang] [compiler-rt] [XRay][AArch64] Support -fxray-shared (PR #114431)

2024-11-04 Thread Fangrui Song via cfe-commits
https://github.com/MaskRay closed https://github.com/llvm/llvm-project/pull/114431 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clangd] Check for editsNearCursor client capability under experimental capabilities (PR #114699)

2024-11-04 Thread Nathan Ridge via cfe-commits
HighCommander4 wrote: > (No action required) – we have other extensions in clangd e.g. > `references.container` `offsetEncoding`. Do we plan to do the same thing for > them? Good question; I was initially thinking of doing it as needed / when someone asks for it. But maybe it would be better

[clang-tools-extra] [clangd] Check for editsNearCursor client capability under experimental capabilities (PR #114699)

2024-11-04 Thread Nathan Ridge via cfe-commits
https://github.com/HighCommander4 closed https://github.com/llvm/llvm-project/pull/114699 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] 7de1eff - [clangd] Check for editsNearCursor client capability under experimental capabilities (#114699)

2024-11-04 Thread via cfe-commits
Author: Nathan Ridge Date: 2024-11-05T02:13:21-05:00 New Revision: 7de1eff7cff35481e4a502858c5e3ff21502b186 URL: https://github.com/llvm/llvm-project/commit/7de1eff7cff35481e4a502858c5e3ff21502b186 DIFF: https://github.com/llvm/llvm-project/commit/7de1eff7cff35481e4a502858c5e3ff21502b186.diff

[clang] [llvm] [RISCV][VLS] Support RISCV VLS calling convention (PR #100346)

2024-11-04 Thread Craig Topper via cfe-commits
@@ -4887,10 +4906,19 @@ bool Sema::CheckCallingConvAttr(const ParsedAttr &Attrs, CallingConv &CC, return false; } - unsigned ReqArgs = Attrs.getKind() == ParsedAttr::AT_Pcs ? 1 : 0; - if (!Attrs.checkExactlyNumArgs(*this, ReqArgs)) { -Attrs.setInvalid(); -retu

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-11-04 Thread Lu Weining via cfe-commits
https://github.com/SixWeining approved this pull request. LGTM. Thanks. https://github.com/llvm/llvm-project/pull/114513 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] e28d7f7 - [libclc] Format clc_tan.cl. NFC

2024-11-04 Thread Fraser Cormack via cfe-commits
Author: Fraser Cormack Date: 2024-11-04T10:52:46Z New Revision: e28d7f713471cf33908a0fe5223f480dfd9b06f0 URL: https://github.com/llvm/llvm-project/commit/e28d7f713471cf33908a0fe5223f480dfd9b06f0 DIFF: https://github.com/llvm/llvm-project/commit/e28d7f713471cf33908a0fe5223f480dfd9b06f0.diff LOG

[libclc] [libclc] Move ceil/fabs/floor/rint/trunc to CLC library (PR #114774)

2024-11-04 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 e28d7f713471cf33908a0fe5223f480dfd9b06f0 8dd4fb41f272daa48ac5d2b52a61f5bb740a3ff4 --e

[libclc] [libclc] Move ceil/fabs/floor/rint/trunc to CLC library (PR #114774)

2024-11-04 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/114774 >From 625b491279f81dc9b55e80bf422d0e15f44f02bb Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Thu, 31 Oct 2024 13:11:00 + Subject: [PATCH] [libclc] Move ceil/fabs/floor/rint/trunc to CLC library Th

[clang] Add Shafik and hstk30 as maintainers for issue triage (PR #114781)

2024-11-04 Thread via cfe-commits
hstk30-hw wrote: LGTM, I'm willing to do this. https://github.com/llvm/llvm-project/pull/114781 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    1   2   3   4   5   6   >