[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

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

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-11-01 Thread Lu Weining via cfe-commits
@@ -357,7 +357,7 @@ TARGET_BUILTIN(__builtin_lasx_xvmskltz_w, "V8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskltz_d, "V4LLiV4LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskgez_b, "V32ScV32Sc", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmsknz_b, "V16sV16

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE (PR #113532)

2024-11-01 Thread Phoebe Wang via cfe-commits
phoebewang wrote: > Looks like this causes a significant compile-time regression, but only for > ReleaseLTO-g: > https://llvm-compile-time-tracker.com/compare.php?from=1e19f0f9d92b5e9c43d53893e387341835d3d96b&to=c72a751dabff4260dcc309e48008941d51b31d21&stat=instructions:u > > I wouldn't really

[clang-tools-extra] [clang-tidy] fix crash in altera-id-dependent-backward-branch (PR #113833)

2024-11-01 Thread Piotr Zegar via cfe-commits
https://github.com/PiotrZSL approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/113833 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [C++20] [Modules] Convert '-fexperimental-modules-reduced-bmi' to '-fmodules-reduced-bmi' (PR #114382)

2024-11-01 Thread via cfe-commits
@@ -691,7 +691,7 @@ ensure it is reachable, e.g. ``using N::g;``. Support for Reduced BMIs is still experimental, but it may become the default in the future. The expected roadmap for Reduced BMIs as of Clang 19.x is: h-vetinari wrote: ```suggestion in the futu

[clang] [clang-format] Don't re-annotate CaseLabelColon as ConditionalExpr (PR #114639)

2024-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-format Author: Owen Pan (owenca) Changes Fixes #114627. --- Full diff: https://github.com/llvm/llvm-project/pull/114639.diff 2 Files Affected: - (modified) clang/lib/Format/TokenAnnotator.cpp (+1-1) - (modified) clang/unittests/Format/FormatTe

[clang] [clang-format] Don't re-annotate CaseLabelColon as ConditionalExpr (PR #114639)

2024-11-01 Thread Owen Pan via cfe-commits
https://github.com/owenca created https://github.com/llvm/llvm-project/pull/114639 Fixes #114627. >From 146969dc5c1b3fd02c783118664e9cdb74aabbdf Mon Sep 17 00:00:00 2001 From: Owen Pan Date: Fri, 1 Nov 2024 21:18:03 -0700 Subject: [PATCH] [clang-format] Don't re-annotate CaseLabelColon as Con

[clang] Update clang static analyzers per rename of member functions in CanMakeCheckedPtr. (PR #114636)

2024-11-01 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa updated https://github.com/llvm/llvm-project/pull/114636 >From 5675106782f0226297ea3e53fe7bca9137f710c4 Mon Sep 17 00:00:00 2001 From: Ryosuke Niwa Date: Fri, 1 Nov 2024 20:39:10 -0700 Subject: [PATCH 1/2] Update clang static analyzers per rename of member functions in

[clang] [clang][docs] Revise documentation for `__builtin_reduce_(max|min)`. (PR #114637)

2024-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (c8ef) Changes --- Full diff: https://github.com/llvm/llvm-project/pull/114637.diff 1 Files Affected: - (modified) clang/docs/LanguageExtensions.rst (+2-6) ``diff diff --git a/clang/docs/LanguageExtensions.rst b/clang/

[clang] [clang][docs] Revise documentation for `__builtin_reduce_(max|min)`. (PR #114637)

2024-11-01 Thread via cfe-commits
https://github.com/c8ef edited https://github.com/llvm/llvm-project/pull/114637 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Revise documentation for `__builtin_reduce_(max|min)`. (PR #114637)

2024-11-01 Thread via cfe-commits
https://github.com/c8ef created https://github.com/llvm/llvm-project/pull/114637 None >From 13d9d0771b666c5ba2262004f45dcbe34e6fd893 Mon Sep 17 00:00:00 2001 From: c8ef Date: Sat, 2 Nov 2024 11:53:54 +0800 Subject: [PATCH] Update LanguageExtensions.rst --- clang/docs/LanguageExtensions.rst |

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-11-01 Thread Lu Weining via cfe-commits
@@ -357,7 +357,7 @@ TARGET_BUILTIN(__builtin_lasx_xvmskltz_w, "V8iV8i", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskltz_d, "V4LLiV4LLi", "nc", "lasx") TARGET_BUILTIN(__builtin_lasx_xvmskgez_b, "V32ScV32Sc", "nc", "lasx") -TARGET_BUILTIN(__builtin_lasx_xvmsknz_b, "V16sV16

[clang] Update clang static analyzers per rename of member functions in CanMakeCheckedPtr. (PR #114636)

2024-11-01 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 0cfcd387f968f2c9de0648673b5db9e221e5c84e 5675106782f0226297ea3e53fe7bca9137f710c4 --e

[clang] Update clang static analyzers per rename of member functions in CanMakeCheckedPtr. (PR #114636)

2024-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang @llvm/pr-subscribers-clang-static-analyzer-1 Author: Ryosuke Niwa (rniwa) Changes The member functions that define CheckedPtr capable type is incrementCheckedPtrCount and decrementCheckedPtrCount after the rename. --- Full diff: https://github.co

[clang] Update clang static analyzers per rename of member functions in CanMakeCheckedPtr. (PR #114636)

2024-11-01 Thread Ryosuke Niwa via cfe-commits
https://github.com/rniwa created https://github.com/llvm/llvm-project/pull/114636 The member functions that define CheckedPtr capable type is incrementCheckedPtrCount and decrementCheckedPtrCount after the rename. >From 5675106782f0226297ea3e53fe7bca9137f710c4 Mon Sep 17 00:00:00 2001 From: Ry

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Justin Stitt via cfe-commits
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl( return CanonTTP; } +/// Check if a type can have its sanitizer instrumentation elided. +/// Determine this by its presence in a SCL alongside its specified categories. +/// For example: +/// ignorelist.tx

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Justin Stitt via cfe-commits
@@ -48,6 +48,64 @@ Example $ clang -fsanitize=address -fsanitize-ignorelist=ignorelist.txt foo.c ; ./a.out # No error report here. +Usage with UndefinedBehaviorSanitizer += + +The arithmetic overflow sanitizers ``unsigned-integer-overfl

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt updated https://github.com/llvm/llvm-project/pull/107332 >From 548efc6414503f8ae005f1bd9ef2c7f15ad16241 Mon Sep 17 00:00:00 2001 From: Justin Stitt Date: Tue, 3 Sep 2024 18:28:53 -0700 Subject: [PATCH 01/13] hook up sscl categories with overflow/truncation saniti

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-01 Thread Matt Arsenault via cfe-commits
@@ -1672,10 +1672,11 @@ CodeGenTypes::GetFunctionType(const CGFunctionInfo &FI) { // Add type for sret argument. if (IRFunctionArgs.hasSRetArg()) { -QualType Ret = FI.getReturnType(); -unsigned AddressSpace = CGM.getTypes().getTargetAddressSpace(Ret); +auto Ad

[clang] 6ca816f - [clang-format] Fix a regression in parsing `switch` in macro call (#114506)

2024-11-01 Thread via cfe-commits
Author: Owen Pan Date: 2024-11-01T18:47:50-07:00 New Revision: 6ca816f88d5f0f2032d1610207023133eaf40a1e URL: https://github.com/llvm/llvm-project/commit/6ca816f88d5f0f2032d1610207023133eaf40a1e DIFF: https://github.com/llvm/llvm-project/commit/6ca816f88d5f0f2032d1610207023133eaf40a1e.diff LOG:

[clang] [clang-format] Fix a regression in parsing `switch` in macro call (PR #114506)

2024-11-01 Thread Owen Pan via cfe-commits
https://github.com/owenca closed https://github.com/llvm/llvm-project/pull/114506 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-01 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/10] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic

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

2024-11-01 Thread Finn Plummer via cfe-commits
@@ -2527,6 +2640,11 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, case Intrinsic::spv_udot: case Intrinsic::spv_sdot: return selectIntegerDot(ResVReg, ResType, I); + case Intrinsic::spv_dot4add_i8packed: +if (STI.canUseExtension(SPIRV::Extens

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-01 Thread Alex Voicu via cfe-commits
@@ -23,8 +25,10 @@ X Test() // sret argument. // CHECK-CXX98: call void @_ZN1XC1ERKS_( // CHECK-CXX11: call void @_ZN1XC1EOS_( + // CHECK-CXX11-NONZEROALLOCAAS: call void @_ZN1XC1EOS_( AlexVlx wrote: Made an attempt to. https://github.com/llvm/llvm-pro

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-01 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 1/5] `sret` args should always point to the `alloca` AS, so we can

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-11-01 Thread Julian Schmidt via cfe-commits
@@ -196,9 +196,10 @@ Any occurrence of the moved variable that is not a reinitialization (see below) is considered to be a use. An exception to this are objects of type ``std::unique_ptr``, -``std::shared_ptr`` and ``std::weak_ptr``, which have defined move behavior -(objects

[clang] c2a892f - Revert "[clang][bytecode] Implement bitcasts to floating-point values (#114485)"

2024-11-01 Thread Timm Bäder via cfe-commits
Author: Timm Bäder Date: 2024-11-02T01:54:38+01:00 New Revision: c2a892f49ae0603949db88aacab7bbc7aa52 URL: https://github.com/llvm/llvm-project/commit/c2a892f49ae0603949db88aacab7bbc7aa52 DIFF: https://github.com/llvm/llvm-project/commit/c2a892f49ae0603949db88aacab7bbc7aa52.diff LO

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-11-01 Thread Julian Schmidt via cfe-commits
https://github.com/5chmidti requested changes to this pull request. https://github.com/llvm/llvm-project/pull/114255 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] Extend bugprone-use-after-move check to handle std::optional::reset() and std::any::reset() (PR #114255)

2024-11-01 Thread Julian Schmidt via cfe-commits
@@ -279,7 +281,7 @@ void UseAfterMoveFinder::getDeclRefs( if (DeclRef && BlockMap->blockContainingStmt(DeclRef) == Block) { // Ignore uses of a standard smart pointer that don't dereference the // pointer. - if (Operator || !isStandardSmartP

[clang] [llvm] Intrinsics/clip (PR #114588)

2024-11-01 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From 996405ae7454a13a01a8d249a8cf85cf4a29eee6 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/4] adding llvm intrinsic --- clang/include/clang/Basic/Bui

[clang] [clang][CodeGen] `sret` args should always point to the `alloca` AS, so use that (PR #114062)

2024-11-01 Thread Alex Voicu via cfe-commits
https://github.com/AlexVlx updated https://github.com/llvm/llvm-project/pull/114062 >From d2d2d3d5db3f639aab178f9ca9a20db2842d2b65 Mon Sep 17 00:00:00 2001 From: Alex Voicu Date: Tue, 29 Oct 2024 14:20:44 + Subject: [PATCH 1/4] `sret` args should always point to the `alloca` AS, so we can

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

2024-11-01 Thread Timm Baeder via cfe-commits
tbaederr wrote: Sorry, reverted. https://github.com/llvm/llvm-project/pull/114485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Intrinsics/clip (PR #114588)

2024-11-01 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From 996405ae7454a13a01a8d249a8cf85cf4a29eee6 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/4] adding llvm intrinsic --- clang/include/clang/Basic/Bui

[clang] [clang] SemaFunctionEffects: When verifying a function, ignore any trailing 'requires' clause. (PR #114266)

2024-11-01 Thread Doug Wyatt via cfe-commits
dougsonos wrote: I spent a bit more time trying to extract a reduction from libc++ today but failed. Here are the diagnostics that (fortunately) were enough to devise the fix in this PR: ```c++ ./nonblocking-wip.cpp:54:30: warning: function with 'nonblocking' attribute must not call non-'

[clang] [clang-repl][CMake][MSVC] Wrap /EXPORT linker option for ICX (PR #112867)

2024-11-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-s390x-linux-multistage` running on `systemz-1` while building `clang` at step 11 "ninja check 2". Full details are available at: https://lab.llvm.org/buildbot/#/builders/98/builds/577 Here is the relevant piece of the

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-11-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota edited https://github.com/llvm/llvm-project/pull/112400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-11-01 Thread Helena Kotas via cfe-commits
https://github.com/hekota approved this pull request. LGTM! https://github.com/llvm/llvm-project/pull/112400 ___ 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-01 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/113777 >From 78019b9d9dc138f38bb5b32576b621351ae6427c Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 27 Oct 2024 01:07:57 +0300 Subject: [PATCH 1/2] [Clang] prevent assertion failure from an invalid template

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-11-01 Thread Tom Honermann via cfe-commits
tahonermann wrote: @erichkeane, I believe all of the concerns you raised have been resolved with the exception of the `constexpr` question for which you asked @keryell to weigh in. I hope we're close to consensus on no need for a change for that one. Please re-review when time permits. https:

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > Right, while I want to go full instrumentation, it's just not going to happen > in the Linux kernel. We're going to need both options so that we can slowly > overlap coverage until we've squeezed out all the unexpected wrap-around. That was just my 2c. Linux decision about

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-11-01 Thread Tom Honermann via cfe-commits
@@ -1155,6 +1155,15 @@ void ASTDeclReader::VisitFunctionDecl(FunctionDecl *FD) { for (unsigned I = 0; I != NumParams; ++I) Params.push_back(readDeclAs()); FD->setParams(Reader.getContext(), Params); + + // If the declaration is a SYCL kernel entry point function as ind

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-11-01 Thread Tom Honermann via cfe-commits
@@ -14296,6 +14296,31 @@ void ASTContext::getFunctionFeatureMap(llvm::StringMap &FeatureMap, } } +static SYCLKernelInfo BuildSYCLKernelInfo(ASTContext &Context, + CanQualType KernelNameType, +

[clang] [SYCL] The sycl_kernel_entry_point attribute. (PR #111389)

2024-11-01 Thread Tom Honermann via cfe-commits
https://github.com/tahonermann updated https://github.com/llvm/llvm-project/pull/111389 >From 3c4a2b8a52d3f1c730df88a308dece21a67834ef Mon Sep 17 00:00:00 2001 From: Tom Honermann Date: Fri, 4 Oct 2024 11:10:32 -0700 Subject: [PATCH 1/8] [SYCL] The sycl_kernel_entry_point attribute. The `sycl_

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

2024-11-01 Thread Bill Wendling via cfe-commits
bwendling wrote: @AaronBallman @rapidsna -- I think I covered all of the comments you made on the other PR (stupid git!). PTAL. https://github.com/llvm/llvm-project/pull/114495 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Vitaly Buka via cfe-commits
@@ -48,6 +48,64 @@ Example $ clang -fsanitize=address -fsanitize-ignorelist=ignorelist.txt foo.c ; ./a.out # No error report here. +Usage with UndefinedBehaviorSanitizer += + +The arithmetic overflow sanitizers ``unsigned-integer-overfl

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Kees Cook via cfe-commits
kees wrote: > Thankfully, this PR and my other PR (WIP) leave the door open. You can ignore > all types and then mark a few as `no_wraps` or you can sanitize all types > (the default) and mark a few as `wraps`. Right, while I want to go full instrumentation, it's just not going to happen in t

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-01 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ commented: Nice nice nice!! https://github.com/llvm/llvm-project/pull/114606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-01 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ edited https://github.com/llvm/llvm-project/pull/114606 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-01 Thread Artem Dergachev via cfe-commits
@@ -0,0 +1,86 @@ +//===- MemoryUnsafeCastChecker.cpp -*- 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: Apache

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-11-01 Thread Joseph Huber via cfe-commits
https://github.com/jhuber6 approved this pull request. I guess this is good for now, but we really need to work with how to actually handle multiple toolchains at once. https://github.com/llvm/llvm-project/pull/113509 ___ cfe-commits mailing list cfe-

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-01 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,86 @@ +//===- MemoryUnsafeCastChecker.cpp -*- 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: Apache

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-01 Thread Ryosuke Niwa via cfe-commits
@@ -0,0 +1,151 @@ +// RUN: %clang_analyze_cc1 -analyzer-checker=alpha.webkit.MemoryUnsafeCastChecker -verify %s + +class Base { }; +class Derived : public Base { }; + +void test_pointers(Base *base) { + Derived *derived_static = static_cast(base); + // expected-warning@-1{{Memo

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Justin Stitt via cfe-commits
JustinStitt wrote: > My intuition is that @kees approach could be more efficient to get things > done :) Maintaining a list of types can be annoying. We discussed this at [Linux Plumbers '24](https://lpc.events/) and also on [lkml](https://lore.kernel.org/all/202404291502.612E0A10@keescook/) w

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

2024-11-01 Thread David Olsen via cfe-commits
@@ -53,6 +53,7 @@ class CIRGenerator : public clang::ASTConsumer { ~CIRGenerator() override; void Initialize(clang::ASTContext &astCtx) override; bool HandleTopLevelDecl(clang::DeclGroupRef group) override; + mlir::ModuleOp getModule(); dkolsen-pgi wrote

[clang] [compiler-rt] [llvm] [openmp] [PGO][Offload] Add GPU profiling flags to driver (PR #94268)

2024-11-01 Thread Ethan Luis McDonough via cfe-commits
EthanLuisMcDonough wrote: > For some codes, I get the following error for a gfx906: > > ``` > LLVM ERROR: Relocation for CG Profile could not be created: unknown > relocation name > ``` > > I see it for OpenMC, but the following is a simpler example: > > ``` > $ cat test.c > #include > #inc

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

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

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

2024-11-01 Thread David Olsen via cfe-commits
@@ -31,9 +34,14 @@ void CIRGenerator::Initialize(ASTContext &astCtx) { this->astCtx = &astCtx; - cgm = std::make_unique(*mlirCtx, astCtx, codeGenOpts, diags); + mlirCtx = std::make_unique(); + mlirCtx->getOrLoadDialect(); dkolsen-pgi wrote: Fixed. Chan

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

2024-11-01 Thread David Olsen via cfe-commits
https://github.com/dkolsen-pgi updated https://github.com/llvm/llvm-project/pull/113483 >From fd38921f9899e3e5ae538a94f123433119919731 Mon Sep 17 00:00:00 2001 From: David Olsen Date: Wed, 23 Oct 2024 11:01:40 -0700 Subject: [PATCH 1/4] [CIR] Call code gen; create empty cir.func op Finish hook

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

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

[clang] [clang][Driver][HIP] Add support for mixing AMDGCNSPIRV & concrete `offload-arch`s. (PR #113509)

2024-11-01 Thread Alex Voicu via cfe-commits
AlexVlx wrote: Gentle ping. https://github.com/llvm/llvm-project/pull/113509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-11-01 Thread Greg Roth via cfe-commits
@@ -2527,6 +2640,11 @@ bool SPIRVInstructionSelector::selectIntrinsic(Register ResVReg, case Intrinsic::spv_udot: case Intrinsic::spv_sdot: return selectIntegerDot(ResVReg, ResType, I); + case Intrinsic::spv_dot4add_i8packed: +if (STI.canUseExtension(SPIRV::Extens

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

2024-11-01 Thread Greg Roth via cfe-commits
@@ -0,0 +1,17 @@ +// RUN: %clang_cc1 -std=hlsl2021 -finclude-default-header -triple \ pow2clk wrote: 202x is the default. Is there a reason this requires 2021? https://github.com/llvm/llvm-project/pull/113623 ___ cfe-c

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

2024-11-01 Thread Greg Roth via cfe-commits
https://github.com/pow2clk approved this pull request. Looks good! I learned a couple things about SPIR-V by verifying this. Just one quibble about the language version and a suggested followup. https://github.com/llvm/llvm-project/pull/113623 ___ cf

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

2024-11-01 Thread Greg Roth via cfe-commits
https://github.com/pow2clk edited https://github.com/llvm/llvm-project/pull/113623 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Intrinsics/clip (PR #114588)

2024-11-01 Thread via cfe-commits
https://github.com/joaosaffran updated https://github.com/llvm/llvm-project/pull/114588 >From 996405ae7454a13a01a8d249a8cf85cf4a29eee6 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/4] adding llvm intrinsic --- clang/include/clang/Basic/Bui

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/107332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Vitaly Buka via cfe-commits
https://github.com/vitalybuka edited https://github.com/llvm/llvm-project/pull/107332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Vitaly Buka via cfe-commits
vitalybuka wrote: > I know @kees feels strongly that this should be the other way around: > Instrument _everything_ by default (which would eliminate the need for > filterlist integration entirely) and exclude things from instrumentation with > `wraps`. My intuition is that @kees approach cou

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Vitaly Buka via cfe-commits
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl( return CanonTTP; } +/// Check if a type can have its sanitizer instrumentation elided. +/// Determine this by its presence in a SCL alongside its specified categories. +/// For example: +/// ignorelist.tx

[clang] [AArch64] Implement FP8 floating-point mode helper intrinsics (PR #100608)

2024-11-01 Thread Jon Roelofs via cfe-commits
jroelofs wrote: Are you also planning to do the feature test macros, e.g. `__ARM_FEATURE_FP8`? https://github.com/llvm/llvm-project/pull/100608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Vitaly Buka via cfe-commits
@@ -831,6 +831,28 @@ ASTContext::getCanonicalTemplateTemplateParmDecl( return CanonTTP; } +/// Check if a type can have its sanitizer instrumentation elided. +/// Determine this by its presence in a SCL alongside its specified categories. +/// For example: +/// ignorelist.tx

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Justin Stitt via cfe-commits
https://github.com/JustinStitt deleted https://github.com/llvm/llvm-project/pull/107332 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement labelled type filtering for overflow/truncation sanitizers w/ SSCLs (PR #107332)

2024-11-01 Thread Justin Stitt via cfe-commits
@@ -15,8 +15,9 @@ file at compile-time. Goal and usage == -Users of sanitizer tools, such as :doc:`AddressSanitizer`, :doc:`ThreadSanitizer` -or :doc:`MemorySanitizer` may want to disable or alter some checks for +Users of sanitizer tools, such as :doc:`AddressSan

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Rashmi Mudduluru (t-rasmud) Changes This PR introduces a new checker `[alpha.webkit.MemoryUnsafeCastChecker]` that warns all downcasts from a base type to a derived type. rdar://137766829 --- Full diff: https://github.c

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Rashmi Mudduluru (t-rasmud) Changes This PR introduces a new checker `[alpha.webkit.MemoryUnsafeCastChecker]` that warns all downcasts from a base type to a derived type. rdar://137766829 --- Full diff: https://github.com/llvm/llvm-proje

[clang] [Webkit Checkers] Introduce a Webkit checker for memory unsafe casts (PR #114606)

2024-11-01 Thread Rashmi Mudduluru via cfe-commits
https://github.com/t-rasmud created https://github.com/llvm/llvm-project/pull/114606 This PR introduces a new checker `[alpha.webkit.MemoryUnsafeCastChecker]` that warns all downcasts from a base type to a derived type. rdar://137766829 >From cc19550fdbaca4b77e90de57c472a31a8c3f8293 Mon Sep 1

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-11-01 Thread Finn Plummer via cfe-commits
@@ -85,6 +85,8 @@ def int_dx_umad : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, LLV def int_dx_normalize : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>; def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0

[clang] [llvm] [X86][AMX] Support AMX-TRANSPOSE (PR #113532)

2024-11-01 Thread Nikita Popov via cfe-commits
nikic wrote: Looks like this causes a significant compile-time regression, but only for ReleaseLTO-g: https://llvm-compile-time-tracker.com/compare.php?from=1e19f0f9d92b5e9c43d53893e387341835d3d96b&to=c72a751dabff4260dcc309e48008941d51b31d21&stat=instructions:u I wouldn't really expect this ch

[clang] [clang] Support --sysroot= for ${arch}-windows-msvc targets (PR #96417)

2024-11-01 Thread via cfe-commits
https://github.com/trcrsired updated https://github.com/llvm/llvm-project/pull/96417 >From 014fc73adfccac9f0fc3c29b22c6b7105098182b Mon Sep 17 00:00:00 2001 From: trcrsired Date: Sun, 23 Jun 2024 00:07:19 -0400 Subject: [PATCH 1/2] Support --sysroot= for ${arch}-windows-msvc targets I think it

[clang] Reapply "[Clang][Sema] Always use latest redeclaration of primary template" (PR #114569)

2024-11-01 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `clang-m68k-linux-cross` running on `suse-gary-m68k-cross` while building `clang` at step 4 "build stage 1". Full details are available at: https://lab.llvm.org/buildbot/#/builders/27/builds/1384 Here is the relevant piece o

[clang] b24650e - Reapply "[Clang][Sema] Always use latest redeclaration of primary template" (#114569)

2024-11-01 Thread via cfe-commits
Author: Krystian Stasiowski Date: 2024-11-01T16:15:33-04:00 New Revision: b24650e814e55d90acfc40acf045456c98f32b9c URL: https://github.com/llvm/llvm-project/commit/b24650e814e55d90acfc40acf045456c98f32b9c DIFF: https://github.com/llvm/llvm-project/commit/b24650e814e55d90acfc40acf045456c98f32b9c

[clang] Reapply "[Clang][Sema] Always use latest redeclaration of primary template" (PR #114569)

2024-11-01 Thread Krystian Stasiowski via cfe-commits
https://github.com/sdkrystian closed https://github.com/llvm/llvm-project/pull/114569 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libcxx] [libcxxabi] [Fuchsia][cmake] Allow using FatLTO when building runtimes (PR #112277)

2024-11-01 Thread Daniel Thornburgh via cfe-commits
mysterymath wrote: The rule established in LLD is that all input files to the link must be known before LTO begins. This is because a set of properties computed from the input files is used as input to LTO codegen, and the results of codegen are not necessarily valid if those properties were t

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

2024-11-01 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 1/9] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-11-01 Thread Sarah Spall via cfe-commits
@@ -85,6 +85,8 @@ def int_dx_umad : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, LLV def int_dx_normalize : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>; def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: PassBuilder changes LGTM https://github.com/llvm/llvm-project/pull/114547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-11-01 Thread Sarah Spall via cfe-commits
https://github.com/spall deleted https://github.com/llvm/llvm-project/pull/112400 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL][SPIRV][DXIL] Implement `WaveActiveSum` intrinsic (PR #112400)

2024-11-01 Thread Sarah Spall via cfe-commits
@@ -85,6 +85,8 @@ def int_dx_umad : DefaultAttrsIntrinsic<[llvm_anyint_ty], [LLVMMatchType<0>, LLV def int_dx_normalize : DefaultAttrsIntrinsic<[LLVMMatchType<0>], [llvm_anyfloat_ty], [IntrNoMem]>; def int_dx_rsqrt : DefaultAttrsIntrinsic<[llvm_anyfloat_ty], [LLVMMatchType<0

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

2024-11-01 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 1/9] [HLSL][SPIRV][DXIL] Implement `dot4add_i8packed` intrinsic

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-01 Thread Chris B via cfe-commits
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder { return Builder; } }; + +// Builder for methods of builtin types. Allows adding methods to builtin types +// using the builder pattern like this: +// +// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName

[clang] [llvm] [HLSL] Add `Increment`/`DecrementCounter` methods to structured buffers (PR #114148)

2024-11-01 Thread Chris B via cfe-commits
@@ -359,6 +356,176 @@ struct TemplateParameterListBuilder { return Builder; } }; + +// Builder for methods of builtin types. Allows adding methods to builtin types +// using the builder pattern like this: +// +// BuiltinTypeMethodBuilder(Sema, RecordBuilder, "MethodName

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian updated https://github.com/llvm/llvm-project/pull/114547 >From 56d807b8e73fca6f507056d2670dc4f4682bc921 Mon Sep 17 00:00:00 2001 From: Shilei Tian Date: Fri, 1 Nov 2024 10:51:20 -0400 Subject: [PATCH] [PassBuilder] Add `LTOPreLink` to early simplication EP call back

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

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

[clang] [llvm] [PassBuilder] Add `ThinOrFullLTOPhase` to early simplication EP call backs (PR #114547)

2024-11-01 Thread Shilei Tian via cfe-commits
https://github.com/shiltian edited https://github.com/llvm/llvm-project/pull/114547 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Intrinsics/clip (PR #114588)

2024-11-01 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 5c1752e368585e55c0335a7d7651fe43d42af282 72e1698e7197673fca2812519b3f07aac77e8172 --e

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

2024-11-01 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen @llvm/pr-subscribers-clang Author: Artem Belevich (Artem-B) Changes LLVM support for the attribute has been implemented already, so it just plumbs it through to the CUDA front-end. One notable difference from NVCC is that the attribute ca

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

2024-11-01 Thread Artem Belevich via cfe-commits
https://github.com/Artem-B created https://github.com/llvm/llvm-project/pull/114589 LLVM support for the attribute has been implemented already, so it just plumbs it through to the CUDA front-end. One notable difference from NVCC is that the attribute can be used regardless of the targeted GP

[clang] [clang][bytecode] Implement bitcasts to floating-point values (PR #114485)

2024-11-01 Thread Rainer Orth via cfe-commits
rorth wrote: This broke the [Solaris/sparcv9 bot](https://lab.llvm.org/buildbot/#/builders/13/builds/3268). https://github.com/llvm/llvm-project/pull/114485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang] [llvm] Intrinsics/clip (PR #114588)

2024-11-01 Thread via cfe-commits
https://github.com/joaosaffran created https://github.com/llvm/llvm-project/pull/114588 None >From 996405ae7454a13a01a8d249a8cf85cf4a29eee6 Mon Sep 17 00:00:00 2001 From: Joao Saffran Date: Tue, 29 Oct 2024 19:39:31 + Subject: [PATCH 1/4] adding llvm intrinsic --- clang/include/clang/Bas

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

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

  1   2   3   4   >