[libclc] [libclc][NFC] Remove unused intrinsics helpers (PR #128708)

2025-02-25 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck created https://github.com/llvm/llvm-project/pull/128708 We want to move away from using asm declarations to define builtins. >From 76d6da267c5991374579031d402be33da88ed43f Mon Sep 17 00:00:00 2001 From: Fraser Cormack Date: Tue, 25 Feb 2025 12:48:27 + Subjec

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Haojian Wu via cfe-commits
hokein wrote: > (We should have been doing this wrong prior to 20, but it didn't crash > because it called Decl::getTemplateDepth(), which returns 0 for the > transformed template parameter declaration) I think you're right. The depth is already incorrect in clang19 etc. https://godbolt.org/z

[clang] Generalize creduce-clang-crash.py script to look for cvise (PR #128592)

2025-02-25 Thread Lucile Rose Nihlen via cfe-commits
https://github.com/lnihlen approved this pull request. https://github.com/llvm/llvm-project/pull/128592 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary created https://github.com/llvm/llvm-project/pull/128731 Xqccmp is a new spec by Qualcomm that makes a vendor-specific effort to solve the push/pop + frame pointers issue. Broadly, it takes the Zcmp instructions and reverse the order they push/pop registers in, which

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
lenary wrote: I realise this extension will generate questions about what we do for CodeGen support for this extension. I have been thinking about this, and I do think it will be possible to extend the current codegen (prolog epilog inserter mostly) to support this, fairly easily. I can put up

[clang] f10e0f7 - [MergeFuncs] Don't introduce calls to (linkonce,weak)_odr functions. (#125050)

2025-02-25 Thread via cfe-commits
Author: Florian Hahn Date: 2025-02-25T15:55:25Z New Revision: f10e0f7321b34693697a0bf895d440f82b32ba54 URL: https://github.com/llvm/llvm-project/commit/f10e0f7321b34693697a0bf895d440f82b32ba54 DIFF: https://github.com/llvm/llvm-project/commit/f10e0f7321b34693697a0bf895d440f82b32ba54.diff LOG:

[clang] [llvm] [MergeFuncs] Don't introduce calls to (linkonce,weak)_odr functions. (PR #125050)

2025-02-25 Thread Florian Hahn via cfe-commits
https://github.com/fhahn closed https://github.com/llvm/llvm-project/pull/125050 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-backend-risc-v @llvm/pr-subscribers-clang-driver @llvm/pr-subscribers-clang Author: Sam Elliott (lenary) Changes Xqccmp is a new spec by Qualcomm that makes a vendor-specific effort to solve the push/pop + frame pointers issue. Broadly, it takes the Zcm

[clang] [llvm] [RISCV] Mark {vl, vtype} as clobber in inline assembly (PR #128636)

2025-02-25 Thread Philip Reames via cfe-commits
preames wrote: > But the purpose we add vl/vtype dependencies is to prevent the Post-RA > scheduler moving vsetvl instruction across inline assembly. I'm not sure if > there's better approach to solve this problem. Maybe have RISCVInsertVSETVLI add implicit use operands to the inline assembly

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 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 f58fde585775a7c25dc673076db914f8d1866081 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d --e

[clang] [clang] Improve diagnostics for vector builtins (PR #125673)

2025-02-25 Thread Fraser Cormack via cfe-commits
@@ -2266,8 +2266,10 @@ bool SemaHLSL::CheckBuiltinFunctionCall(unsigned BuiltinID, CallExpr *TheCall) { if (CheckVectorElementCallArgs(&SemaRef, TheCall)) return true; if (SemaRef.BuiltinElementwiseTernaryMath( -TheCall, /*CheckForFloatArgs*/ -

[clang] 70de57e - [clang] Add alternative email for steakhal (#128558)

2025-02-25 Thread via cfe-commits
Author: Balazs Benics Date: 2025-02-25T13:07:48+01:00 New Revision: 70de57edcad0055d962e9fe899b347b16a6efaa3 URL: https://github.com/llvm/llvm-project/commit/70de57edcad0055d962e9fe899b347b16a6efaa3 DIFF: https://github.com/llvm/llvm-project/commit/70de57edcad0055d962e9fe899b347b16a6efaa3.diff

[clang] [clang] Add alternative email for steakhal (PR #128558)

2025-02-25 Thread Balazs Benics via cfe-commits
https://github.com/steakhal closed https://github.com/llvm/llvm-project/pull/128558 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-25 Thread via cfe-commits
@@ -1826,6 +1827,12 @@ The following type trait primitives are supported by Clang. Those traits marked functionally equivalent to copying the underlying bytes and then dropping the source object on the floor. This is true of trivial types and types which were made trivia

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Haojian Wu via cfe-commits
https://github.com/hokein commented: Thanks for the quick fix! https://github.com/llvm/llvm-project/pull/128704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Haojian Wu via cfe-commits
https://github.com/hokein edited https://github.com/llvm/llvm-project/pull/128704 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Haojian Wu via cfe-commits
@@ -377,8 +377,12 @@ struct ConvertConstructorToDeductionGuideTransform { if (NestedPattern) Args.addOuterRetainedLevels(NestedPattern->getTemplateDepth()); auto [Depth, Index] = getDepthAndIndex(Param); +assert(Depth || + cast(FT

[clang] [CodeGen][ObjCGNU] Replace PointerType::getUnqual(Type) with opaque pointer version (NFC) (PR #128715)

2025-02-25 Thread Mats Jun Larsen via cfe-commits
https://github.com/junlarsen edited https://github.com/llvm/llvm-project/pull/128715 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CodeGen][ObjCGNU] Replace PointerType::getUnqual(Type) with opaque pointer version (NFC) (PR #128715)

2025-02-25 Thread Mats Jun Larsen via cfe-commits
https://github.com/junlarsen updated https://github.com/llvm/llvm-project/pull/128715 >From e993b0d23cbb018a090f49f1f4f63c0dd0a89a66 Mon Sep 17 00:00:00 2001 From: Mats Jun Larsen Date: Tue, 25 Feb 2025 14:40:11 +0100 Subject: [PATCH] [CodeGen][ObjCGNU] Replace PointerType::getUnqual(Type) with

[clang] [CodeGen][ObjCGNU] Replace PointerType::getUnqual(Type) with opaque pointer version (NFC) (PR #128715)

2025-02-25 Thread Mats Jun Larsen via cfe-commits
@@ -2284,10 +2284,12 @@ CGObjCGNU::CGObjCGNU(CodeGenModule &cgm, unsigned runtimeABIVersion, BoolTy = CGM.getTypes().ConvertType(CGM.getContext().BoolTy); Int8Ty = llvm::Type::getInt8Ty(VMContext); + + PtrTy = llvm::PointerType::getUnqual(cgm.getLLVMContext()); -

[libclc] b57e63b - libclc: Stop using asm declarations for r600 on amdgcn for get_global_size (#128692)

2025-02-25 Thread via cfe-commits
Author: Matt Arsenault Date: 2025-02-25T18:23:04+07:00 New Revision: b57e63b07a7b70ebfb5f794648e2102b7c1bd3a3 URL: https://github.com/llvm/llvm-project/commit/b57e63b07a7b70ebfb5f794648e2102b7c1bd3a3 DIFF: https://github.com/llvm/llvm-project/commit/b57e63b07a7b70ebfb5f794648e2102b7c1bd3a3.diff

[libclc] libclc: Stop using asm declarations for r600 on amdgcn for get_global_size (PR #128692)

2025-02-25 Thread Matt Arsenault via cfe-commits
https://github.com/arsenm closed https://github.com/llvm/llvm-project/pull/128692 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Wunsafe-buffer-usage] Turn off unsafe-buffer warning for methods annotated with clang::unsafe_buffer_usage attribute (PR #125671)

2025-02-25 Thread David Tarditi via cfe-commits
https://github.com/dtarditi approved this pull request. Looks good - thank you for adding the tests. https://github.com/llvm/llvm-project/pull/125671 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[libclc] 1e0e416 - [libclc][NFC] Remove unused intrinsics helpers (#128708)

2025-02-25 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-02-25T14:29:35Z New Revision: 1e0e4169dd00bf8a37cef8d74d0add7861982c4e URL: https://github.com/llvm/llvm-project/commit/1e0e4169dd00bf8a37cef8d74d0add7861982c4e DIFF: https://github.com/llvm/llvm-project/commit/1e0e4169dd00bf8a37cef8d74d0add7861982c4e.diff LOG

[clang] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the implementation of it is known (PR #85465)

2025-02-25 Thread via cfe-commits
https://github.com/AZero13 updated https://github.com/llvm/llvm-project/pull/85465 >From 0572dd0d673cbb1b34ddf80c4ea11449826e18f8 Mon Sep 17 00:00:00 2001 From: Rose Date: Fri, 15 Mar 2024 16:43:10 -0400 Subject: [PATCH] [ObjC] Expand isClassLayoutKnownStatically to base classes as long as the

[clang] [Clang] Implement the core language parts of P2786 - Trivial relocation (PR #127636)

2025-02-25 Thread Erich Keane via cfe-commits
@@ -624,6 +624,20 @@ class ASTContext : public RefCountedBase { using ParameterIndexTable = llvm::DenseMap; ParameterIndexTable ParamIndices; +public: + struct CXXRecordDeclRelocationInfo { +unsigned IsRelocatable; +unsigned IsReplaceable; + }; + std::optional +

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Farzon Lotfi via cfe-commits
@@ -738,6 +739,16 @@ def UMin : DXILOp<40, binary> { let attributes = [Attributes]; } +def UAddc : DXILOp<44, binaryWithCarryOrBorrow > { + let Doc = "Unsigned 32-bit integer arithmetic add with carry. uaddc(a,b) = (a+b, a+b overflowed ? 1 : 0)"; + let intrinsics = [Intri

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Younan Zhang via cfe-commits
@@ -377,8 +377,12 @@ struct ConvertConstructorToDeductionGuideTransform { if (NestedPattern) Args.addOuterRetainedLevels(NestedPattern->getTemplateDepth()); auto [Depth, Index] = getDepthAndIndex(Param); +assert(Depth || + cast(FT

[clang] [llvm] [HLSL] [DXIL] Implement the AddUint64 HLSL function and the UAddc DXIL op (PR #127137)

2025-02-25 Thread Farzon Lotfi via cfe-commits
https://github.com/farzonl edited https://github.com/llvm/llvm-project/pull/127137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libclc] f8948d3 - [libclc] Move log/log2/log10 to CLC library (#128540)

2025-02-25 Thread via cfe-commits
Author: Fraser Cormack Date: 2025-02-25T11:44:59Z New Revision: f8948d3c4754e06cdd3e2903bfbfe74438f6b463 URL: https://github.com/llvm/llvm-project/commit/f8948d3c4754e06cdd3e2903bfbfe74438f6b463 DIFF: https://github.com/llvm/llvm-project/commit/f8948d3c4754e06cdd3e2903bfbfe74438f6b463.diff LOG

[libclc] [libclc] Move log/log2/log10 to CLC library (PR #128540)

2025-02-25 Thread Fraser Cormack via cfe-commits
https://github.com/frasercrmck closed https://github.com/llvm/llvm-project/pull/128540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Fix an integer overflow issue in computing CTAD's parameter depth (PR #128704)

2025-02-25 Thread Younan Zhang via cfe-commits
https://github.com/zyn0217 created https://github.com/llvm/llvm-project/pull/128704 There were some cases where we computed incorrect template parameter depths for synthesized CTAD, invalid as they might be, we still shouldn't crash anyway. Fixes https://github.com/llvm/llvm-project/issues/128

[clang] [llvm] [RISCV] Add Xqccmp Assembly Support (PR #128731)

2025-02-25 Thread Sam Elliott via cfe-commits
https://github.com/lenary updated https://github.com/llvm/llvm-project/pull/128731 >From 6f8c6d152033505db6f6b1f8a424c01fcfc05c0d Mon Sep 17 00:00:00 2001 From: Sam Elliott Date: Mon, 24 Feb 2025 23:07:05 -0800 Subject: [PATCH 1/2] [RISCV] Add Xqccmp Assembly Support Xqccmp is a new spec by Qu

[clang] [clang][bytecode] Check dtor instance pointers for active-ness (PR #128732)

2025-02-25 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/128732 And diagnose if we're trying to destroy an inactive member of a union. >From 87209d26acf78f2566a7d1e9fd6dee7f455b4e57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timm=20B=C3=A4der?= Date: Tue, 25 Feb 2025 17:14:3

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Ilya Biryukov via cfe-commits
@@ -143,6 +143,11 @@ Improvements to Clang's diagnostics - A statement attribute applied to a ``case`` label no longer suppresses 'bypassing variable initialization' diagnostics (#84072). +- The :doc:`ThreadSafetyAnalysis` now supports ``-Wthread-safety-pointer`` ---

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov commented: I only have a few comments about documenting the caveats (no alias analysis). The actual code changes look very simple and this looks like a clear improvement that would catch many useful cases. I don't have much experience with this code and would s

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Ilya Biryukov via cfe-commits
https://github.com/ilya-biryukov edited https://github.com/llvm/llvm-project/pull/127396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Thread Safety Analysis: Improved pointer handling (PR #127396)

2025-02-25 Thread Ilya Biryukov via cfe-commits
@@ -6087,9 +6215,37 @@ class Return { const Foo &returns_constref_shared_locks_required() SHARED_LOCKS_REQUIRED(mu) { return foo; } + + Foo *returns_ptr_exclusive_locks_required() EXCLUSIVE_LOCKS_REQUIRED(mu) { +return &foo; + } + + Foo *returns_pt_ptr_exclusive

<    1   2   3   4   5