[clang-tools-extra] 77c842f - [clang-apply-replacements] Avoid repeated hash lookups (NFC) (#111783)

2024-10-10 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-10T08:15:48-07:00 New Revision: 77c842f44cc06951975fd4a85761e0bc830d185a URL: https://github.com/llvm/llvm-project/commit/77c842f44cc06951975fd4a85761e0bc830d185a DIFF: https://github.com/llvm/llvm-project/commit/77c842f44cc06951975fd4a85761e0bc830d185a.diff L

[clang-tools-extra] [clang-change-namespace] Avoid repeated hash lookups (NFC) (PR #111784)

2024-10-10 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/111784 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] d2a96d1 - [clang-change-namespace] Avoid repeated hash lookups (NFC) (#111784)

2024-10-10 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-10T08:16:51-07:00 New Revision: d2a96d170a4faa0a6c42fe5f23c073891d6118b8 URL: https://github.com/llvm/llvm-project/commit/d2a96d170a4faa0a6c42fe5f23c073891d6118b8 DIFF: https://github.com/llvm/llvm-project/commit/d2a96d170a4faa0a6c42fe5f23c073891d6118b8.diff L

[clang-tools-extra] 670a461 - [clang-tidy] Avoid repeated hash lookups (NFC) (#111785)

2024-10-10 Thread via cfe-commits
Author: Kazu Hirata Date: 2024-10-10T08:17:25-07:00 New Revision: 670a4613fc5f29036f23fe357b0dbf017d019717 URL: https://github.com/llvm/llvm-project/commit/670a4613fc5f29036f23fe357b0dbf017d019717 DIFF: https://github.com/llvm/llvm-project/commit/670a4613fc5f29036f23fe357b0dbf017d019717.diff L

[clang-tools-extra] [clang-tidy] Avoid repeated hash lookups (NFC) (PR #111785)

2024-10-10 Thread Kazu Hirata via cfe-commits
https://github.com/kazutakahirata closed https://github.com/llvm/llvm-project/pull/111785 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] When checking for covariant return types, make sure the poiners or references are to *classes* (PR #111856)

2024-10-10 Thread Boaz Brickner via cfe-commits
https://github.com/bricknerb created https://github.com/llvm/llvm-project/pull/111856 https://eel.is/c++draft/class.virtual#8.1 This prevents overriding methods with non class return types that have less cv-qualification. Fixes: #111742 >From 786d31e2657964e578cd1fdf2006b0fb3b19fab6 Mon Sep

[clang] [clang] When checking for covariant return types, make sure the poiners or references are to *classes* (PR #111856)

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

[clang] [clang] When checking for covariant return types, make sure the poiners or references are to *classes* (PR #111856)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Boaz Brickner (bricknerb) Changes https://eel.is/c++draft/class.virtual#8.1 This prevents overriding methods with non class return types that have less cv-qualification. Fixes: #111742 --- Full diff: https://github.com/llvm/llvm-projec

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

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

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-10-10 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] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-10-10 Thread Helena Kotas via cfe-commits
@@ -4493,28 +4493,34 @@ void CXXNameMangler::mangleType(const ArrayParameterType *T) { } void CXXNameMangler::mangleType(const HLSLAttributedResourceType *T) { - mangleType(T->getWrappedType()); + llvm::SmallString<64> Str("_Res"); const HLSLAttributedResourceType::Attri

[clang] [HLSL] Make HLSLAttributedResourceType canonical and add code paths to convert HLSL types to DirectX target types (PR #110327)

2024-10-10 Thread Helena Kotas via cfe-commits
@@ -11533,6 +11539,18 @@ QualType ASTContext::mergeTypes(QualType LHS, QualType RHS, bool OfBlockPointer, return {}; return LHS; } + case Type::HLSLAttributedResource: { +const HLSLAttributedResourceType *LHSTy = +LHS->castAs(); +const HLSLAttribut

[libclc] [libclc] Create an internal 'clc' builtins library (PR #109985)

2024-10-10 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck updated https://github.com/llvm/llvm-project/pull/109985 >From 454110573c6fcb472f5a87d3de31d2a0addd546d Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Mon, 23 Sep 2024 12:54:02 +0100 Subject: [PATCH 1/2] [libclc] Split off library build system into helpers T

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-10 Thread Matt Arsenault via cfe-commits
@@ -683,6 +706,59 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { return !A.checkForAllCallLikeInstructions(DoesNotRetrieve, *this, UsedAssumedInformation); } + + // Returns true if FlatScratchInit is needed, i.e

[clang] [llvm] [RISCV] Add Smdbltrp and Ssdbltrp extension (PR #111837)

2024-10-10 Thread Craig Topper via cfe-commits
topperc wrote: > > > Personally I don't like to add a privileged extension if it doesn't > > > introduce new CSRs/instructions. > > > > > > I'd actually put that on the > > [agenda](https://docs.google.com/document/d/1G3ocHm2zE6AYTS2N3_3w2UxFnSEyKkcF57siLWe-NVs/edit?tab=t.0) > > for today's

[clang] [llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

2024-10-10 Thread Matt Arsenault via cfe-commits
@@ -439,6 +439,26 @@ struct AAAMDAttributesFunction : public AAAMDAttributes { indicatePessimisticFixpoint(); return; } + +SmallPtrSet VisitedConsts; + +for (Instruction &I : instructions(F)) { arsenm wrote: Should use checkForAllInstru

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -48,11 +48,13 @@ define <4 x i32> @load_static_array_of_vec_test(i32 %index) { } ; CHECK-LABEL: multid_load_test -define <4 x i32> @multid_load_test() { +define <4 x i32> @multid_load_test() #0 { ; CHECK-COUNT-8: load i32, ptr addrspace(3) {{(.*@groushared2dArrayofVec

[clang] [llvm] [RISCV] Add Smrnmi extension (PR #111668)

2024-10-10 Thread Craig Topper via cfe-commits
@@ -931,6 +931,10 @@ def FeatureStdExtSmepmp : RISCVExtension<"smepmp", 1, 0, "'Smepmp' (Enhanced Physical Memory Protection)">; +def FeatureStdExtSmrnmi +: RISCVExtension<"smrnmi", 1, 0, + "'Smrnmi' (Extension for Resumable Non

[clang] [clang] When checking for covariant return types, make sure the poiners or references are to *classes* (PR #111856)

2024-10-10 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 55d51dd9dca8220ffaf9260d56dae9f5c34b7120 786d31e2657964e578cd1fdf2006b0fb3b19fab6 --e

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-10 Thread Louis Dionne via cfe-commits
ldionne wrote: @ilovepi Some things that *could* be going wrong: The `cxx_shared` target is now defined when it wasn't before, and something in your CMake has e.g. `if (TARGET cxx_shared)` and does something it shouldn't based on that. Otherwise, it's also possible that `libc++.so` doesn't get

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-10 Thread Matheus Izvekov via cfe-commits
@@ -860,6 +860,16 @@ class RedeclarableTemplateDecl : public TemplateDecl, /// \endcode bool isMemberSpecialization() const { return Common.getInt(); } + /// Determines whether any redeclaration of this template was + /// a specialization of a member template. + bool ha

[clang] Reapply "[Clang][Sema] Refactor collection of multi-level template argument lists (#106585, #111173)" (PR #111852)

2024-10-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov approved this pull request. https://github.com/llvm/llvm-project/pull/111852 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [clang-tidy] bugprone-implicit-widening ignores unsigned consts (PR #101073)

2024-10-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman commented: Thank you for this, I think the clang-tidy portions make a lot of sense. However, I do have concerns about the changes to Clang. I don't think we want constant expression evaluation to fail based on an input parameter. For one, it's a bit odd because

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-10 Thread Brad Richardson via cfe-commits
everythingfunctional wrote: @klausler , can you point me specifically at the failure messages? The failures I've seen so far from the merge did not look related to my (admittedly untrained) eye. I ran the tests in the repo and they passed locally. Are there other tests somewhere that need to b

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-10 Thread Peter Klausler via cfe-commits
klausler wrote: > @klausler , can you point me specifically at the failure messages? The > failures I've seen so far from the merge did not look related to my > (admittedly untrained) eye. I ran the tests in the repo and they passed > locally. Are there other tests somewhere that need to be up

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-10 Thread Chris B via cfe-commits
https://github.com/llvm-beanz edited https://github.com/llvm/llvm-project/pull/111010 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [HLSL] Implement `WaveReadLaneAt` intrinsic (PR #111010)

2024-10-10 Thread Chris B via cfe-commits
@@ -1956,6 +1956,26 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { return true; break; } + case Builtin::BI__builtin_hlsl_wave_read_lane_at: { +if (SemaRef.checkArgCount(TheCall, 2)) + return true; + +// Ensure ind

[clang] [llvm] [clang][aarch64] Add support for the MSVC qualifiers __ptr32, __ptr64, __sptr, __uptr for AArch64 (PR #111879)

2024-10-10 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello created https://github.com/llvm/llvm-project/pull/111879 MSVC has a set of qualifiers to allow using 32-bit signed/unsigned pointers when building 64-bit targets. This is useful for WoW code (i.e., the part of Windows that handles running 32-bit application on a 6

[clang] [llvm] [clang][aarch64] Add support for the MSVC qualifiers __ptr32, __ptr64, __sptr, __uptr for AArch64 (PR #111879)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Daniel Paoliello (dpaoliello) Changes MSVC has a set of qualifiers to allow using 32-bit signed/unsigned pointers when building 64-bit targets. This is useful for WoW code (i.e., the part of Windows that handles running 32-bit application

[clang] [Cuda] Handle -fcuda-short-ptr even with -nocudalib (PR #111682)

2024-10-10 Thread Artem Belevich via cfe-commits
Artem-B wrote: > I'm not sure why the option isn't enabled by default, personally While it does indeed help with generating better code, using this option while compiling CUDA code may be problematic. Front-end is not aware of address spaces and all pointers are generic, so `sizeof(any pointer

[clang] Reland: [clang] Finish implementation of P0522 (PR #111711)

2024-10-10 Thread via cfe-commits
zmodem wrote: > No difference at all. It's just that the PR which will take care of the > problem is not small, so I want to keep them separate and merge them all in > one go. To make it easier to find, that PR is #111457 and it landed soon after. https://github.com/llvm/llvm-project/pull/111

[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Hana Dusíková via cfe-commits
hanickadot wrote: > Is there some explanation of the set of builtins you chose somewhere? How is > "masking" a pointer different from the existing > __builtin_align_down/__builtin_align_up? Intention is to allow to use any bits in pointer for tagging and give freedom. To do so. I'm not propos

[clang] [llvm] [clang][aarch64] Add support for the MSVC qualifiers __ptr32, __ptr64, __sptr, __uptr for AArch64 (PR #111879)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Daniel Paoliello (dpaoliello) Changes MSVC has a set of qualifiers to allow using 32-bit signed/unsigned pointers when building 64-bit targets. This is useful for WoW code (i.e., the part of Windows that handles running 32-bit a

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-10-10 Thread Neil Henning via cfe-commits
sheredom wrote: Ok by specifying `-resource-dir=Z:/resource` and adding it a VFS made that work. But we are seeing a single stray original path in the source files that we think is related to the working directory. We tried setting `-working-directory=Z:/working`, but the VFS requires that thi

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-10 Thread Peter Klausler via cfe-commits
klausler wrote: There are multiple weird failures in llvm-test-suite where clang++ complains about unknown options that look like they're slang-only options. Did you run llvm-test-suite before merging? Please check. These failures are going to cause build bot failures shortly in the clang-*

[clang] [llvm] [clang][aarch64] Add support for the MSVC qualifiers __ptr32, __ptr64, __sptr, __uptr for AArch64 (PR #111879)

2024-10-10 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 9459d729d22b7bfedad9d3a4237162077c6984a4 3daa49652dd1f0c0bb2b42748cee717236c32ce7 --e

[clang] [analyzer] Modernize FuchsiaHandleChecker (PR #111588)

2024-10-10 Thread Pavel Skripkin via cfe-commits
https://github.com/pskrgag updated https://github.com/llvm/llvm-project/pull/111588 >From a3805292ea37cf06d1cf227768034b30a42a685f Mon Sep 17 00:00:00 2001 From: Pavel Skripkin Date: Mon, 7 Oct 2024 23:01:24 +0300 Subject: [PATCH 1/6] wip: initial versio --- .../Checkers/FuchsiaHandleChecker.

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-10 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: The 2 stage buildbot (https://lab.llvm.org/buildbot/#/builders/41) with the Fortran tests passed after this merge. Its latest run is also a pass. https://github.com/llvm/llvm-project/pull/110023 ___ cfe-commits mailing list cf

[clang] Make PCH's respect any VFS specified. (PR #106577)

2024-10-10 Thread Henrik Karlsson via cfe-commits
honkstar1 wrote: Adding to @sheredom ... the precompiled headers are actually portable now (hurray!).. the single last non-virtual path we see is in the object files (.o). And it is related to the working dir as mentioned. https://github.com/llvm/llvm-project/pull/106577 _

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-10 Thread Kiran Chandramohan via cfe-commits
kiranchandramohan wrote: @everythingfunctional Following are the steps to run the testsuite. Please check and confirm if you did not run it before. ``` git clone https://github.com/llvm/llvm-test-suite.git cd llvm-test-suite mkdir build cd build cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPI

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-10 Thread Brad Richardson via cfe-commits
everythingfunctional wrote: > @everythingfunctional Following are the steps to run the testsuite. Please > check and confirm if you did not run it before. > > ``` > git clone https://github.com/llvm/llvm-test-suite.git > cd llvm-test-suite > mkdir build > cd build > cmake -DCMAKE_BUILD_TYPE=Rel

[clang] [llvm] [HLSL] Implement the `degrees` intrinsic (PR #111209)

2024-10-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/111209 >From 398dcb5c1a354c12d4d43af152f6d3e14f001274 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 2 Oct 2024 13:30:33 -0700 Subject: [PATCH 1/2] [HLSL] Implementation the `degrees` intrinsic - add degre

[clang] [flang] [llvm] [openmp] [flang][driver] rename flang-new to flang (PR #110023)

2024-10-10 Thread Peter Klausler via cfe-commits
klausler wrote: > Which I don't think the rename is at fault for. If you rebase to current llvm-project/main, that test will (or should) work; it got broken yesterday and was fixed later. https://github.com/llvm/llvm-project/pull/110023 ___ cfe-commi

[clang] [llvm] [clang][aarch64] Add support for the MSVC qualifiers __ptr32, __ptr64, __sptr, __uptr for AArch64 (PR #111879)

2024-10-10 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/111879 >From ec2b533ef344f58f61fc59fe5a9c55043eef8718 Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Wed, 9 Oct 2024 16:47:57 -0700 Subject: [PATCH] [clang][aarch64] Add support for the MS qualifie

[clang] Add isTrivial() and isTriviallyCopyable() AST matchers (PR #90634)

2024-10-10 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > I remember back in the day that adding new matchers was a problem because it > grew the size of the files beyond some supported compiler's limit. > > Could @AaronBallman or someone else knowledgable about this(cc @kadircet) > take a look and confirm adding matchers is fin

[clang] [llvm] [clang][aarch64] Add support for the MSVC qualifiers __ptr32, __ptr64, __sptr, __uptr for AArch64 (PR #111879)

2024-10-10 Thread Daniel Paoliello via cfe-commits
@@ -32,6 +58,8 @@ class LLVM_LIBRARY_VISIBILITY AArch64TargetInfo : public TargetInfo { SveMode = (1 << 2), }; + enum AddrSpace { ptr32_sptr = 270, ptr32_uptr = 271, ptr64 = 272 }; dpaoliello wrote: Definitely prefer that - this whole thing has **way*

[clang] [llvm] [HLSL] Implement the `degrees` intrinsic (PR #111209)

2024-10-10 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 d36cef0b173329fa1f94ff3a92da6a50da4aff9e ef0bcaf5528ca3bc7597ae0114618a4c4bb25e09 --e

[clang] [clang] Remove the deprecated flag `-frelaxed-template-template-args`. (PR #111894)

2024-10-10 Thread Matheus Izvekov via cfe-commits
https://github.com/mizvekov created https://github.com/llvm/llvm-project/pull/111894 This flag has been deprecated since Clang 19, having been the default since then. It has remained because its negation was still useful to work around backwards compatibility breaking changes from P0522. How

[clang] [clang] Remove the deprecated flag `-frelaxed-template-template-args`. (PR #111894)

2024-10-10 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Matheus Izvekov (mizvekov) Changes This flag has been deprecated since Clang 19, having been the default since then. It has remained because its negation was still useful to work around backwards compati

[clang] [clang] Remove the deprecated flag `-frelaxed-template-template-args`. (PR #111894)

2024-10-10 Thread Erich Keane via cfe-commits
erichkeane wrote: I THINK I'd still prefer to keep this flag for 1 more release. Our mitigations /P3310 haven't been in a release cycle yet, so I'd prefer we wait until after the 20 release to flip this switch. https://github.com/llvm/llvm-project/pull/111894 __

[clang] [llvm] [HLSL] Implement the `degrees` intrinsic (PR #111209)

2024-10-10 Thread Finn Plummer via cfe-commits
https://github.com/inbelic updated https://github.com/llvm/llvm-project/pull/111209 >From 398dcb5c1a354c12d4d43af152f6d3e14f001274 Mon Sep 17 00:00:00 2001 From: Finn Plummer Date: Wed, 2 Oct 2024 13:30:33 -0700 Subject: [PATCH 1/3] [HLSL] Implementation the `degrees` intrinsic - add degre

[clang] Switch DirectX Target to use the Itanium ABI (PR #111632)

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

[clang] [-Wunsafe-buffer-usage] Add user documentation. (PR #111624)

2024-10-10 Thread Artem Dergachev via cfe-commits
https://github.com/haoNoQ updated https://github.com/llvm/llvm-project/pull/111624 >From b5c9082e36efcc7be2cabc73c985749f2fd41725 Mon Sep 17 00:00:00 2001 From: Artem Dergachev Date: Tue, 8 Oct 2024 20:24:00 -0700 Subject: [PATCH 1/3] [-Wunsafe-buffer-usage] Add user documentation. --- clang/

[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: unnamed_addr doesn't allow cloning; there's no way to make it work in a reasonable way even if we wanted it. See, for example, https://github.com/llvm/llvm-project/issues/32127 . https://github.com/llvm/llvm-project/pull/111343

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -0,0 +1,47 @@ +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -S -o - %s | FileCheck %s +// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -S -o - %s | FileCheck %s + +// Verify that internal linkage unused functions are removed + +RWBuffer buf; + +// Never

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -19,20 +19,20 @@ using namespace llvm; static bool finalizeLinkage(Module &M) { - SmallPtrSet EntriesAndExports; + SmallPtrSet Funcs; // Find all entry points and export functions for (Function &EF : M.functions()) { -if (!EF.hasFnAttribute("hlsl.shader") && !

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -0,0 +1,80 @@ +; RUN: opt -S -dxil-finalize-linkage -mtriple=dxil-unknown-shadermodel6.5-compute %s | FileCheck %s +; RUN: llc %s --filetype=asm -o - | FileCheck %s + +target triple = "dxilv1.5-pc-shadermodel6.5-compute" + +; Confirm that DXILFinalizeLinkage will remove functi

[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Hana Dusíková via cfe-commits
https://github.com/hanickadot updated https://github.com/llvm/llvm-project/pull/111861 From e1c8d5e689fe8d3d0338eb64220aaf6371aed48a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hana=20Dusi=CC=81kova=CC=81?= Date: Thu, 10 Oct 2024 21:05:55 +0200 Subject: [PATCH] [clang & libcxx] constexpr pointer t

[clang] Reland "[HIP] Use original file path for CUID" (#108771) (PR #111885)

2024-10-10 Thread Artem Belevich via cfe-commits
@@ -1,13 +1,15 @@ // Check CUID generated by hash. // The same CUID is generated for the same file with the same options. +// RUN: cd %S + // RUN: %clang -### -x hip --target=x86_64-unknown-linux-gnu --no-offload-new-driver \ // RUN: --offload-arch=gfx906 -c -nogpuinc -no

[clang] [Clang] fix overload resolution for object parameters with top-level cv-qualifiers in member functions (PR #110435)

2024-10-10 Thread Oleksandr T. via cfe-commits
https://github.com/a-tarasyuk updated https://github.com/llvm/llvm-project/pull/110435 >From c52634882631a71fad956a70179b480abf13006a Mon Sep 17 00:00:00 2001 From: Oleksandr T Date: Sun, 29 Sep 2024 22:01:38 +0300 Subject: [PATCH 1/3] [Clang] fix overload resolution for object parameters with

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-10 Thread Paul Walker via cfe-commits
@@ -526,6 +526,11 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) { } case BuiltinType::SveCount: return llvm::TargetExtType::get(getLLVMContext(), "aarch64.svcount"); +case BuiltinType::ArmMFloat8: + ResultType = + llvm::VectorType::get(l

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-10 Thread Paul Walker via cfe-commits
@@ -5828,6 +5832,7 @@ bool Parser::isKnownToBeTypeSpecifier(const Token &Tok) const { case tok::kw__ExtInt: case tok::kw__BitInt: case tok::kw___bf16: + case tok::kw___mfp8: paulwalker-arm wrote: Do you know why this and the similar changes are needed?

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-10 Thread Paul Walker via cfe-commits
@@ -2218,6 +2219,11 @@ TypeInfo ASTContext::getTypeInfoImpl(const Type *T) const { Width = 0; \ Align = 16; \ break; +#define AARCH64_SC

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-10 Thread Paul Walker via cfe-commits
@@ -1391,7 +1391,8 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, } if (Target.hasAArch64SVETypes() || - (AuxTarget && AuxTarget->hasAArch64SVETypes())) { + (AuxTarget && AuxTarget->hasAArch64SVETypes()) || + Target.hasArmMFloat8Type()) { --

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-10 Thread Paul Walker via cfe-commits
@@ -3437,8 +3445,8 @@ StringRef BuiltinType::getName(const PrintingPolicy &Policy) const { case Id: \ return #ExtType; #include "clang/Basic/OpenCLExtensionTypes.def" -#define SVE_TYPE(Name, Id, SingletonId) \ - case Id: \ +#define SVE_TYPE(Name, Id, SingletonId)

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-10 Thread Paul Walker via cfe-commits
@@ -700,6 +701,9 @@ class TargetInfo : public TransferrableTargetInfo, return HasBFloat16 || HasFullBFloat16; } + /// Determine whether the _mfp8 type is supported on this target. + virtual bool hasArmMFloat8Type() const { return HasMFloat8; } paulwalk

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-10 Thread Paul Walker via cfe-commits
@@ -476,7 +476,6 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) { Context.getFloatTypeSemantics(T), /* UseNativeHalf = */ false); break; - paulwalker-arm wrote: Unnecessary whi

[clang] [CLANG][AArch64] Add the modal 8 bit floating-point scalar type (PR #97277)

2024-10-10 Thread Paul Walker via cfe-commits
@@ -4302,6 +4308,7 @@ ASTContext::getBuiltinVectorTypeInfo(const BuiltinType *Ty) const { case BuiltinType::Id: \ return {BoolTy, llvm::ElementCount::getScalable(NumEls), NF}; #define SVE_OPAQUE_TYPE(Name, MangledNa

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

2024-10-10 Thread Chris B via cfe-commits
@@ -1381,7 +1381,7 @@ void ASTContext::InitBuiltinTypes(const TargetInfo &Target, if (LangOpts.OpenACC && !LangOpts.OpenMP) { InitBuiltinType(ArraySectionTy, BuiltinType::ArraySection); } - if (LangOpts.MatrixTypes) + if (LangOpts.MatrixTypes || LangOpts.HLSL) --

[libcxx] [libcxxabi] [libunwind] [runtimes] Always define cxx_shared, cxx_static & other targets (PR #80007)

2024-10-10 Thread Louis Dionne via cfe-commits
ldionne wrote: Also, this is another reminder that we would benefit from having Fuchsia builders in the pre-commit CI. We've asked before and we'll keep asking until we get them: Fuchsia is amongst the last platform that frequently reports errors but doesn't provide us with any pre-commit visi

[clang] [llvm] [mlir] [polly] [NFC] Rename `Intrinsic::getDeclaration` to `getOrInsertDeclaration` (PR #111752)

2024-10-10 Thread Justin Bogner via cfe-commits
https://github.com/bogner approved this pull request. https://github.com/llvm/llvm-project/pull/111752 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][HLSL] Add radians intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
https://github.com/adam-yang created https://github.com/llvm/llvm-project/pull/111883 partially fixes #70103 ### Changes * Implemented `GroupMemoryBarrierWithGroupSync` clang builtin * Linked `GroupMemoryBarrierWithGroupSync` clang builtin with `hlsl_intrinsics.h` * Added sema checks for `Gro

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 Thread Adam Yang via cfe-commits
https://github.com/adam-yang edited https://github.com/llvm/llvm-project/pull/111883 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [clang][aarch64] Add support for the MSVC qualifiers __ptr32, __ptr64, __sptr, __uptr for AArch64 (PR #111879)

2024-10-10 Thread Daniel Paoliello via cfe-commits
https://github.com/dpaoliello updated https://github.com/llvm/llvm-project/pull/111879 >From 281a05c90b1b7df7e75743012d93efeb484901fd Mon Sep 17 00:00:00 2001 From: "Daniel Paoliello (HE/HIM)" Date: Wed, 9 Oct 2024 16:47:57 -0700 Subject: [PATCH] [clang][aarch64] Add support for the MS qualifie

[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid edited https://github.com/llvm/llvm-project/pull/111343 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Richard Smith via cfe-commits
https://github.com/zygoloid commented: Hmm. Looking at https://reviews.llvm.org/D20348 it seems like `unnamed_addr` and `local_unnamed_addr` don't just permit merging, but also cloning of the global (so that the same global could have different addresses in different modules). Cloning wouldn't

[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Richard Smith via cfe-commits
@@ -4097,6 +4096,7 @@ llvm::Constant *ItaniumRTTIBuilder::BuildTypeInfo( // And the name. llvm::GlobalVariable *TypeName = GetAddrOfTypeName(Ty, Linkage); llvm::Constant *TypeNameField; + llvm::GlobalValue::UnnamedAddr Scope; zygoloid wrote: `Scope` isn

[clang] [clang][HLSL] Add GroupMemoryBarrierWithGroupSync intrinsic (PR #111883)

2024-10-10 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 fabe7e39df624c09d399f5f61d5450c2021c2357 628e7d8991f3e8114bb1afbb28bf3eebba622be8 --e

[clang] [llvm] [DirectX] Remove trivially dead functions at linkage finalize (PR #106146)

2024-10-10 Thread Greg Roth via cfe-commits
@@ -19,20 +19,20 @@ using namespace llvm; static bool finalizeLinkage(Module &M) { - SmallPtrSet EntriesAndExports; + SmallPtrSet Funcs; // Find all entry points and export functions pow2clk wrote: Updated https://github.com/llvm/llvm-project/pull/106

[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Eli Friedman via cfe-commits
efriedma-quic wrote: > Intention is to allow to use any bits in pointer for tagging and give freedom Hmm, so needs to somehow allow accessing bits that aren't low bits? As a general comment not specific to this patch, I'd prefer to build around llvm.ptrmask and geps as much as possible, as opp

[clang] [ItaniumCXXABI] Mark RTTI type name as global unnamed_addr (PR #111343)

2024-10-10 Thread Richard Smith via cfe-commits
zygoloid wrote: > unnamed_addr doesn't allow cloning; there's no way to make it work in a > reasonable way even if we wanted it. See, for example, #32127 . OK. The LangRef is very vague on its semantics, would be nice to get that clarified by someone who knows the intent. Is the same true for

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Aaron Ballman via cfe-commits
@@ -503,17 +503,16 @@ bool Sema::checkLiteralOperatorId(const CXXScopeSpec &SS, const IdentifierInfo *II = Name.Identifier; ReservedIdentifierStatus Status = II->isReserved(PP.getLangOpts()); SourceLocation Loc = Name.getEndLoc(); -if (!PP.getSourceManager().isI

[clang] [libcxx] [clang & libcxx] constexpr pointer tagging (DO NOT MERGE) (PR #111861)

2024-10-10 Thread Hana Dusíková via cfe-commits
hanickadot wrote: > Hmm, so needs to somehow allow accessing bits that aren't low bits? yes, for example upper byte on aarch64 > As a general comment not specific to this patch, I'd prefer to build around > llvm.ptrmask and geps as much as possible, as opposed to relying on ptrtoint. I 100% a

[clang] Turn `-Wdeprecated-literal-operator` on by default (PR #111027)

2024-10-10 Thread Aaron Ballman via cfe-commits
https://github.com/AaronBallman approved this pull request. LGTM, please keep an eye out for fallout in the wild though. It may be interesting to see how many instances of `-Wno-deprecated-literal-operator` exist now and do a search again before release to see how many new instances show up.

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: https://github.com/steakhal requested changes to this pull request. I'm sharing my unfinished review as I have it now to leave you a feedback. In the LLVM community we

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: https://github.com/steakhal edited https://github.com/llvm/llvm-project/pull/109636 ___ cfe-commits mailing list cfe-commit

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,244 @@ +//===--- MutexModelingAPI.h - API for modeling mutexes ===// +// +// Part of the LLVM Project, under the Apache

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,169 @@ +//===--- MutexModelingGDM.h - Modeling of mutexes in GDM --===// +// +// Part of the LLVM Project, under the Apache

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,773 @@ +//===--- MutexModeling.cpp - Modeling of mutexes --===// +// +// Part of the LLVM Project, under the Apache

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,244 @@ +//===--- MutexModelingAPI.h - API for modeling mutexes ===// +// +// Part of the LLVM Project, under the Apache

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,169 @@ +//===--- MutexModelingGDM.h - Modeling of mutexes in GDM --===// +// +// Part of the LLVM Project, under the Apache

[clang] [clang] CWG2398: improve overload resolution backwards compat (PR #107350)

2024-10-10 Thread LLVM Continuous Integration via cfe-commits
llvm-ci wrote: LLVM Buildbot has detected a new failure on builder `lldb-x86_64-debian` running on `lldb-x86_64-debian` while building `clang` at step 6 "test". Full details are available at: https://lab.llvm.org/buildbot/#/builders/162/builds/8122 Here is the relevant piece of the build log

[clang] [C++20][Modules] Allow import for a header unit after #pragma (PR #111662)

2024-10-10 Thread Chuanqi Xu via cfe-commits
https://github.com/ChuanqiXu9 approved this pull request. LGTM now https://github.com/llvm/llvm-project/pull/111662 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,244 @@ +//===--- MutexModelingAPI.h - API for modeling mutexes ===// +// +// Part of the LLVM Project, under the Apache

[clang] [clang][analyzer] Introduce modeling for threading related checkers (PR #109636)

2024-10-10 Thread Balazs Benics via cfe-commits
Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= , Endre =?utf-8?q?Fülöp?= Message-ID: In-Reply-To: @@ -0,0 +1,169 @@ +//===--- MutexModelingGDM.h - Modeling of mutexes in GDM --===// +// +// Part of the LLVM Project, under the Apache

[clang] [llvm] [AArch64] Introduce new armv9.6 features (PR #111677)

2024-10-10 Thread via cfe-commits
@@ -522,6 +522,39 @@ def FeatureTLBIW : ExtensionWithMArch<"tlbiw", "TLBIW", "FEAT_TLBIW", // Armv9.6 Architecture Extensions //===--===// +def FeatureCMPBR : ExtensionWithMArch<"cmpbr", "CMPBR", "FEAT_CMPB

[clang] [llvm] [AArch64] Introduce new armv9.6 features (PR #111677)

2024-10-10 Thread via cfe-commits
@@ -522,6 +522,39 @@ def FeatureTLBIW : ExtensionWithMArch<"tlbiw", "TLBIW", "FEAT_TLBIW", // Armv9.6 Architecture Extensions //===--===// +def FeatureCMPBR : ExtensionWithMArch<"cmpbr", "CMPBR", "FEAT_CMPB

[clang] [CUDA/HIP] fix propagate -cuid to a host-only compilation. (PR #111650)

2024-10-10 Thread Pankaj Dwivedi via cfe-commits
PankajDwivedi-25 wrote: > This does not seem to be the right fix. I tends to think the test > https://github.com/ROCm/hip-tests/tree/amd-staging/samples/2_Cookbook/16_assembly_to_executable > needs fix. Since it does not expect host-only compilation to use CUID, it > should add `-fuse-cuid=non

[clang] 1fa3c85 - [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (#107786)

2024-10-10 Thread via cfe-commits
Author: Oleksandr T. Date: 2024-10-10T10:02:21+02:00 New Revision: 1fa3c857f011bfbca788d481680229accbf6e350 URL: https://github.com/llvm/llvm-project/commit/1fa3c857f011bfbca788d481680229accbf6e350 DIFF: https://github.com/llvm/llvm-project/commit/1fa3c857f011bfbca788d481680229accbf6e350.diff

[clang] [Clang] prevent recovery call expression from proceeding with explicit attributes and undeclared templates (PR #107786)

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

<    1   2   3   4   5   >