[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -441,6 +445,254 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(Function &F) const { return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M =

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -7538,6 +7538,14 @@ static bool IsEligibleForTrivialRelocation(Sema &SemaRef, if (!SemaRef.IsCXXTriviallyRelocatableType(Field->getType())) return false; } + + // FIXME: PFP should not affect trivial relocatability, instead it should + // affect the implementat

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -2268,13 +2293,22 @@ CodeGenFunction::EmitNullInitialization(Address DestPtr, QualType Ty) { // Get and call the appropriate llvm.memcpy overload. Builder.CreateMemCpy(DestPtr, SrcPtr, SizeVal, false); -return; + } else { +// Otherwise, just memset the who

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -1319,14 +1319,66 @@ static llvm::Value *CoerceIntOrPtrToIntOrPtr(llvm::Value *Val, llvm::Type *Ty, /// This safely handles the case when the src type is smaller than the /// destination type; in this situation the values of bits which not /// present in the src are undefin

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -544,6 +544,7 @@ TYPE_TRAIT_2(__is_pointer_interconvertible_base_of, IsPointerInterconvertibleBas #include "clang/Basic/TransformTypeTraits.def" // Clang-only C++ Type Traits +TYPE_TRAIT_1(__has_non_relocatable_fields, HasNonRelocatableFields, KEYCXX) ojhu

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
https://github.com/pcc commented: Hi Oliver, thanks for your comments! I'll address them below. > Thoughts: > > This should be opt-in on a field or struct granularity, not just a global > behavior. This would certainly be easier if it were an opt-in behavior, as it would allow avoiding a sub

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -2201,6 +2215,22 @@ void CodeGenFunction::EmitCXXConstructorCall( EmitTypeCheck(CodeGenFunction::TCK_ConstructorCall, Loc, This, getContext().getRecordType(ClassDecl), CharUnits::Zero()); + // When initializing an object that has pointer field protect

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -928,6 +936,11 @@ namespace { if (PointerAuthQualifier Q = F->getType().getPointerAuth(); Q && Q.isAddressDiscriminated()) return false; + // Non-trivially-copyable fields with pointer field protection need to be pcc wrote: We c

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
https://github.com/pcc edited https://github.com/llvm/llvm-project/pull/133538 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -2268,13 +2293,22 @@ CodeGenFunction::EmitNullInitialization(Address DestPtr, QualType Ty) { // Get and call the appropriate llvm.memcpy overload. Builder.CreateMemCpy(DestPtr, SrcPtr, SizeVal, false); -return; + } else { +// Otherwise, just memset the who

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -2976,7 +3006,15 @@ void CodeGenFunction::EmitForwardingCallToLambda( QualType resultType = FPT->getReturnType(); ReturnValueSlot returnSlot; if (!resultType->isVoidType() && - calleeFnInfo->getReturnInfo().getKind() == ABIArgInfo::Indirect && + (calleeFnInfo

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -544,6 +544,7 @@ TYPE_TRAIT_2(__is_pointer_interconvertible_base_of, IsPointerInterconvertibleBas #include "clang/Basic/TransformTypeTraits.def" // Clang-only C++ Type Traits +TYPE_TRAIT_1(__has_non_relocatable_fields, HasNonRelocatableFields, KEYCXX) pcc

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -7756,6 +7756,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, Args.addOptInFlag(CmdArgs, options::OPT_funique_source_file_names, options::OPT_fno_unique_source_file_names); + if (!IsCudaDevice) pcc wrote: With CU

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -7538,6 +7538,14 @@ static bool IsEligibleForTrivialRelocation(Sema &SemaRef, if (!SemaRef.IsCXXTriviallyRelocatableType(Field->getType())) return false; } + + // FIXME: PFP should not affect trivial relocatability, instead it should + // affect the implementat

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -2513,6 +2513,12 @@ def CountedByOrNull : DeclOrTypeAttr { let LangOpts = [COnly]; } +def NoPointerFieldProtection : DeclOrTypeAttr { pcc wrote: There are numerous circumstances where the C++ ABI is distinct from the platform ABI and is allowed to chang

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -441,6 +445,254 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(Function &F) const { return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M =

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -1415,6 +1469,52 @@ void CodeGenFunction::CreateCoercedStore(llvm::Value *Src, Address Dst, } } + // Coercion directly through memory does not work if the structure has pointer + // field protection because the struct passed by value has a different bit + // patt

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Peter Collingbourne via llvm-branch-commits
@@ -3011,6 +3011,12 @@ defm experimental_omit_vtable_rtti : BoolFOption<"experimental-omit-vtable-rtti" NegFlag, BothFlags<[], [CC1Option], " the RTTI component from virtual tables">>; +def experimental_pointer_field_protection_EQ : Joined<["-"], "fexperimental-pointer-f

[llvm-branch-commits] [llvm] [llvm][EmbedBitcodePass] Prevent modifying the module with ThinLTO (PR #139999)

2025-05-14 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-transforms Author: Paul Kirth (ilovepi) Changes Since ThinLTOBitcodeWriterPass handles many things for CFI and WPD, like updating vtable linkage, we need to prevent those changes from persisting in the non-LTO object code we will compile under FatLT

[llvm-branch-commits] [llvm] [llvm][EmbedBitcodePass] Prevent modifying the module with ThinLTO (PR #139999)

2025-05-14 Thread Paul Kirth via llvm-branch-commits
https://github.com/ilovepi created https://github.com/llvm/llvm-project/pull/13 Since ThinLTOBitcodeWriterPass handles many things for CFI and WPD, like updating vtable linkage, we need to prevent those changes from persisting in the non-LTO object code we will compile under FatLTO. The onl

[llvm-branch-commits] [llvm] [llvm][EmbedBitcodePass] Prevent modifying the module with ThinLTO (PR #139999)

2025-05-14 Thread Paul Kirth via llvm-branch-commits
ilovepi wrote: > [!WARNING] > This pull request is not mergeable via GitHub because a downstack PR is > open. Once all requirements are satisfied, merge this PR as a stack href="https://app.graphite.dev/github/pr/llvm/llvm-project/13?utm_source=stack-comment-downstack-mergeability-warning";

[llvm-branch-commits] [llvm] [StaticDataLayout][PGO]Implement reader and writer change for data access profiles (PR #139997)

2025-05-14 Thread Mingming Liu via llvm-branch-commits
https://github.com/mingmingl-llvm created https://github.com/llvm/llvm-project/pull/139997 None >From 75878647c2c36cca00e9d003dc84bf4597e19187 Mon Sep 17 00:00:00 2001 From: mingmingl Date: Tue, 13 May 2025 22:54:59 -0700 Subject: [PATCH] [StaticDataLayout][PGO]Implement reader and writer chan

[llvm-branch-commits] [llvm] [RISCV][MC] Add Q support for Zfa (PR #139508)

2025-05-14 Thread Iris Shi via llvm-branch-commits
el-ev wrote: ### Merge activity * **May 14, 10:50 PM EDT**: A user started a stack merge that includes this pull request via [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/139508). https://github.com/llvm/llvm-project/pull/139508 _

[llvm-branch-commits] [clang] 1399d28 - Revert "[clang][modules] Timestamp-less validation API (#138983)"

2025-05-14 Thread via llvm-branch-commits
Author: Qinkun Bao Date: 2025-05-14T21:02:29-04:00 New Revision: 1399d288c999ae0fad0b7fd6c030bc336af2c4e8 URL: https://github.com/llvm/llvm-project/commit/1399d288c999ae0fad0b7fd6c030bc336af2c4e8 DIFF: https://github.com/llvm/llvm-project/commit/1399d288c999ae0fad0b7fd6c030bc336af2c4e8.diff LO

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -544,6 +544,7 @@ TYPE_TRAIT_2(__is_pointer_interconvertible_base_of, IsPointerInterconvertibleBas #include "clang/Basic/TransformTypeTraits.def" // Clang-only C++ Type Traits +TYPE_TRAIT_1(__has_non_relocatable_fields, HasNonRelocatableFields, KEYCXX) ojhu

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -1415,6 +1469,52 @@ void CodeGenFunction::CreateCoercedStore(llvm::Value *Src, Address Dst, } } + // Coercion directly through memory does not work if the structure has pointer + // field protection because the struct passed by value has a different bit + // patt

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -441,6 +445,254 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses(Function &F) const { return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M =

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/133538 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
https://github.com/ojhunt commented: unfortunately I really don't know enough about actual backend codegen to comment on the actual codegen implementation here, but I think there's some design issues with having the backend determine the discriminators rather than having those selected in the

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -2201,6 +2215,22 @@ void CodeGenFunction::EmitCXXConstructorCall( EmitTypeCheck(CodeGenFunction::TCK_ConstructorCall, Loc, This, getContext().getRecordType(ClassDecl), CharUnits::Zero()); + // When initializing an object that has pointer field protect

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -2268,13 +2293,22 @@ CodeGenFunction::EmitNullInitialization(Address DestPtr, QualType Ty) { // Get and call the appropriate llvm.memcpy overload. Builder.CreateMemCpy(DestPtr, SrcPtr, SizeVal, false); -return; + } else { +// Otherwise, just memset the who

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -928,6 +936,11 @@ namespace { if (PointerAuthQualifier Q = F->getType().getPointerAuth(); Q && Q.isAddressDiscriminated()) return false; + // Non-trivially-copyable fields with pointer field protection need to be ojhunt wrote: T

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -362,6 +362,17 @@ class LangOptionsBase { BKey }; + enum class PointerFieldProtectionKind { ojhunt wrote: I'm not sure I like this being solely a global decision - it makes custom allocators much harder, and it makes it hard for allocators that hav

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -2513,6 +2513,12 @@ def CountedByOrNull : DeclOrTypeAttr { let LangOpts = [COnly]; } +def NoPointerFieldProtection : DeclOrTypeAttr { ojhunt wrote: This an ABI break so I don't think it can reasonably an on by default for all structs - we can already se

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -3011,6 +3011,12 @@ defm experimental_omit_vtable_rtti : BoolFOption<"experimental-omit-vtable-rtti" NegFlag, BothFlags<[], [CC1Option], " the RTTI component from virtual tables">>; +def experimental_pointer_field_protection_EQ : Joined<["-"], "fexperimental-pointer-f

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -2976,7 +3006,15 @@ void CodeGenFunction::EmitForwardingCallToLambda( QualType resultType = FPT->getReturnType(); ReturnValueSlot returnSlot; if (!resultType->isVoidType() && - calleeFnInfo->getReturnInfo().getKind() == ABIArgInfo::Indirect && + (calleeFnInfo

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
https://github.com/ojhunt requested changes to this pull request. Thoughts: This should be opt-in on a field or struct granularity, not just a global behavior. In the RFC I think you mentioned not applying PFP to C types, but I'm unsure how you're deciding what is a C type? There are a lot o

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -1319,14 +1319,66 @@ static llvm::Value *CoerceIntOrPtrToIntOrPtr(llvm::Value *Val, llvm::Type *Ty, /// This safely handles the case when the src type is smaller than the /// destination type; in this situation the values of bits which not /// present in the src are undefin

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
@@ -7538,6 +7538,14 @@ static bool IsEligibleForTrivialRelocation(Sema &SemaRef, if (!SemaRef.IsCXXTriviallyRelocatableType(Field->getType())) return false; } + + // FIXME: PFP should not affect trivial relocatability, instead it should + // affect the implementat

[llvm-branch-commits] Add pointer field protection feature. (PR #133538)

2025-05-14 Thread Oliver Hunt via llvm-branch-commits
https://github.com/ojhunt edited https://github.com/llvm/llvm-project/pull/133538 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [RISCV][Scheduler] Add scheduler definitions for the Q extension (PR #139495)

2025-05-14 Thread Craig Topper via llvm-branch-commits
https://github.com/topperc approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/139495 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [HLSL] Implicit resource binding for cbuffers (PR #139022)

2025-05-14 Thread Helena Kotas via llvm-branch-commits
https://github.com/hekota updated https://github.com/llvm/llvm-project/pull/139022 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[llvm-branch-commits] [llvm] [DirectX] Adding support for static samples is yaml2obj/obj2yaml (PR #139963)

2025-05-14 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-llvm-binary-utilities @llvm/pr-subscribers-backend-directx Author: None (joaosaffran) Changes - Adds support for static samplers ins dxcontainer binary format. - Adds writing logic to mcdxbc - adds reading logic to Object - adds tests Closes: [126636](ht

[llvm-branch-commits] [llvm] [DirectX] Adding support for static samples is yaml2obj/obj2yaml (PR #139963)

2025-05-14 Thread via llvm-branch-commits
https://github.com/joaosaffran created https://github.com/llvm/llvm-project/pull/139963 - Adds support for static samplers ins dxcontainer binary format. - Adds writing logic to mcdxbc - adds reading logic to Object - adds tests Closes: [126636](https://github.com/llvm/llvm-project/issues/126636

[llvm-branch-commits] [clang] [clang][OpenMP] Improve handling of non-C/C++ directives (PR #139961)

2025-05-14 Thread Alexey Bataev via llvm-branch-commits
https://github.com/alexey-bataev approved this pull request. https://github.com/llvm/llvm-project/pull/139961 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang][OpenMP] Improve handling of non-C/C++ directives (PR #139961)

2025-05-14 Thread Krzysztof Parzyszek via llvm-branch-commits
kparzysz wrote: Previous PR: https://github.com/llvm/llvm-project/pull/139960 https://github.com/llvm/llvm-project/pull/139961 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-

[llvm-branch-commits] [llvm] [llvm][OpenMP] Add "SourceLanguages" property to Directive (PR #139960)

2025-05-14 Thread Krzysztof Parzyszek via llvm-branch-commits
kparzysz wrote: Previous PR: https://github.com/llvm/llvm-project/pull/139958 Next PR: https://github.com/llvm/llvm-project/pull/139961 https://github.com/llvm/llvm-project/pull/139960 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm

[llvm-branch-commits] [clang] [clang][OpenMP] Improve handling of non-C/C++ directives (PR #139961)

2025-05-14 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Krzysztof Parzyszek (kparzysz) Changes The PR139793 added handling of the Fortran-only "workshare" directive, however there are more such directives, e.g. "allocators". Use the genDirectiveLanguages function to detect non-C/C++ directives

[llvm-branch-commits] [clang] [clang][OpenMP] Improve handling of non-C/C++ directives (PR #139961)

2025-05-14 Thread Krzysztof Parzyszek via llvm-branch-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/139961 The PR139793 added handling of the Fortran-only "workshare" directive, however there are more such directives, e.g. "allocators". Use the genDirectiveLanguages function to detect non-C/C++ directives instead o

[llvm-branch-commits] [llvm] [llvm][OpenMP] Add "SourceLanguages" property to Directive (PR #139960)

2025-05-14 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-flang-openmp Author: Krzysztof Parzyszek (kparzysz) Changes The official languages that OpenMP recognizes are C/C++ and Fortran. Some OpenMP directives are language-specific, some are C/C++-only, some are Fortran-only. Add a property to the TableGen d

[llvm-branch-commits] [llvm] [llvm][OpenMP] Add "SourceLanguages" property to Directive (PR #139960)

2025-05-14 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-tablegen Author: Krzysztof Parzyszek (kparzysz) Changes The official languages that OpenMP recognizes are C/C++ and Fortran. Some OpenMP directives are language-specific, some are C/C++-only, some are Fortran-only. Add a property to the TableGen defin

[llvm-branch-commits] [llvm] [llvm][OpenMP] Add "SourceLanguages" property to Directive (PR #139960)

2025-05-14 Thread Krzysztof Parzyszek via llvm-branch-commits
https://github.com/kparzysz created https://github.com/llvm/llvm-project/pull/139960 The official languages that OpenMP recognizes are C/C++ and Fortran. Some OpenMP directives are language-specific, some are C/C++-only, some are Fortran-only. Add a property to the TableGen definition of Dire

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: detect untrusted LR before tail call (PR #137224)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
atrosinenko wrote: As this PR improved the handling of leaf functions without CFG information, a few more test cases can be cleaned up - updated in 1377286872187ed191b02bd9632842f4db6dc367. https://github.com/llvm/llvm-project/pull/137224 ___ llvm-br

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: account for BRK when searching for auth oracles (PR #137975)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/137975 >From 5b6f6d0e0ab5e9353c7082f44d4107e21dc84cf5 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Wed, 30 Apr 2025 16:08:10 +0300 Subject: [PATCH] [BOLT] Gadget scanner: account for BRK when searching f

[llvm-branch-commits] [llvm] [BOLT] Factor out MCInstReference from gadget scanner (NFC) (PR #138655)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138655 >From a7a2eea52cb63453c261499288fec46f9e1d3613 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Mon, 28 Apr 2025 18:35:48 +0300 Subject: [PATCH] [BOLT] Factor out MCInstReference from gadget scanner (

[llvm-branch-commits] [llvm] [BOLT] Factor out MCInstReference from gadget scanner (NFC) (PR #138655)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138655 >From a7a2eea52cb63453c261499288fec46f9e1d3613 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Mon, 28 Apr 2025 18:35:48 +0300 Subject: [PATCH] [BOLT] Factor out MCInstReference from gadget scanner (

[llvm-branch-commits] [llvm] [BOLT] Introduce helpers to match `MCInst`s one at a time (NFC) (PR #138883)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138883 >From 4bd8dd9334c8ad810e7fc593331cd6d4e2fdbbad Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Wed, 7 May 2025 16:42:00 +0300 Subject: [PATCH] [BOLT] Introduce helpers to match `MCInst`s one at a tim

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: optionally assume auth traps on failure (PR #139778)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/139778 >From 8f997500a97b5ad7acc9dea416cca6b2f7bb615d Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 13 May 2025 19:50:41 +0300 Subject: [PATCH] [BOLT] Gadget scanner: optionally assume auth traps on

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: detect untrusted LR before tail call (PR #137224)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/137224 >From d20efbedd0be34942e8e28cc91eefeb28d1b8108 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 22 Apr 2025 21:43:14 +0300 Subject: [PATCH 1/2] [BOLT] Gadget scanner: detect untrusted LR before t

[llvm-branch-commits] [llvm] [BOLT] Introduce helpers to match `MCInst`s one at a time (NFC) (PR #138883)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138883 >From 4bd8dd9334c8ad810e7fc593331cd6d4e2fdbbad Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Wed, 7 May 2025 16:42:00 +0300 Subject: [PATCH] [BOLT] Introduce helpers to match `MCInst`s one at a tim

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: optionally assume auth traps on failure (PR #139778)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/139778 >From 8f997500a97b5ad7acc9dea416cca6b2f7bb615d Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 13 May 2025 19:50:41 +0300 Subject: [PATCH] [BOLT] Gadget scanner: optionally assume auth traps on

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: prevent false positives due to jump tables (PR #138884)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138884 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sa

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: prevent false positives due to jump tables (PR #138884)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138884 >From cdc385aac7abe960340e26b2427ac9215e0a54fd Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 6 May 2025 11:31:03 +0300 Subject: [PATCH] [BOLT] Gadget scanner: prevent false positives due to ju

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: account for BRK when searching for auth oracles (PR #137975)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/137975 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sa

[llvm-branch-commits] [llvm] IR: Remove redundant UseList check in addUse (PR #138676)

2025-05-14 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/138676 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] IR: Remove redundant UseList check in addUse (PR #138676)

2025-05-14 Thread Nikita Popov via llvm-branch-commits
nikic wrote: I think this may have been noise. I reran this and there are no differences over the significance threshold: https://llvm-compile-time-tracker.com/compare.php?from=6c1bb48cc45396894597c8cb897c31205d1bdeb6&to=1837fe71fcfb4363fd2b66cdb9ff6a82b3f380fb&stat=instructions:u https://gith

[llvm-branch-commits] [llvm] [BOLT][test] Fix callcont-fallthru.s after #129481 (PR #135867)

2025-05-14 Thread Amir Ayupov via llvm-branch-commits
aaupov wrote: This approach doesn't solve the problem in case nm is symlinked to llvm-nm which doesn't have the flag. Abandon in favor of #139953. https://github.com/llvm/llvm-project/pull/135867 ___ llvm-branch-commits mailing list llvm-branch-commit

[llvm-branch-commits] [llvm] [BOLT][test] Fix callcont-fallthru.s after #129481 (PR #135867)

2025-05-14 Thread Amir Ayupov via llvm-branch-commits
https://github.com/aaupov closed https://github.com/llvm/llvm-project/pull/135867 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr (PR #139909)

2025-05-14 Thread Fangyi Zhou via llvm-branch-commits
fangyi-zhou wrote: I think you probably want to cherry-pick https://github.com/llvm/llvm-project/pull/136041/commits/5dc9d55eb04d94c01dba0364b51a509f975e542a which addresses reviewer comments and fixes the tests. https://github.com/llvm/llvm-project/pull/139909

[llvm-branch-commits] [mlir] [MLIR][ArmSVE] Add initial lowering of vector.contract to SVE `*MMLA` instructions (PR #135636)

2025-05-14 Thread Momchil Velikov via llvm-branch-commits
@@ -0,0 +1,304 @@ +//===- LowerContractionToSMMLAPattern.cpp - Contract to SMMLA ---*- 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: Ap

[llvm-branch-commits] [llvm] [ObjC] Support objc_claimAutoreleasedReturnValue (PR #138696)

2025-05-14 Thread via llvm-branch-commits
AZero13 wrote: What did you mean by // FIXME: do this on ARCRuntimeEntryPoints, and do the todo above ARCInstKind Like you want to do the same check there? How can I help? https://github.com/llvm/llvm-project/pull/138696 ___ llvm-branch-commits maili

[llvm-branch-commits] [mlir] [MLIR][ArmSVE] Add an ArmSVE dialect operation which maps to svusmmla (PR #135634)

2025-05-14 Thread Momchil Velikov via llvm-branch-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/135634 >From 528237309c0bfd7bbb51a8fea37b54e07f21ad1d Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Thu, 10 Apr 2025 14:38:27 + Subject: [PATCH] [MLIR][ArmSVE] Add an ArmSVE dialect operation which m

[llvm-branch-commits] [mlir] [MLIR][ArmSVE] Add initial lowering of vector.contract to SVE `*MMLA` instructions (PR #135636)

2025-05-14 Thread Momchil Velikov via llvm-branch-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/135636 >From f397467bc167d94a28a919a45c009a8f08b6351b Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Tue, 8 Apr 2025 14:43:54 + Subject: [PATCH 1/2] [MLIR][ArmSVE] Add initial lowering of `vector.cont

[llvm-branch-commits] [mlir] [MLIR][ArmSVE] Add initial lowering of vector.contract to SVE `*MMLA` instructions (PR #135636)

2025-05-14 Thread Momchil Velikov via llvm-branch-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/135636 >From f397467bc167d94a28a919a45c009a8f08b6351b Mon Sep 17 00:00:00 2001 From: Momchil Velikov Date: Tue, 8 Apr 2025 14:43:54 + Subject: [PATCH 1/2] [MLIR][ArmSVE] Add initial lowering of `vector.cont

[llvm-branch-commits] [mlir] [MLIR][ArmSVE] Add an ArmSVE dialect operation which maps to svusmmla (PR #135634)

2025-05-14 Thread Momchil Velikov via llvm-branch-commits
https://github.com/momchil-velikov updated https://github.com/llvm/llvm-project/pull/135634 Rate limit · GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Aria

[llvm-branch-commits] [mlir] [MLIR][ArmSVE] Add initial lowering of vector.contract to SVE `*MMLA` instructions (PR #135636)

2025-05-14 Thread Momchil Velikov via llvm-branch-commits
@@ -0,0 +1,304 @@ +//===- LowerContractionToSMMLAPattern.cpp - Contract to SMMLA ---*- 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: Ap

[llvm-branch-commits] [mlir] [MLIR][ArmSVE] Add initial lowering of vector.contract to SVE `*MMLA` instructions (PR #135636)

2025-05-14 Thread Momchil Velikov via llvm-branch-commits
@@ -0,0 +1,304 @@ +//===- LowerContractionToSMMLAPattern.cpp - Contract to SMMLA ---*- 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: Ap

[llvm-branch-commits] [clang] [clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr (PR #139909)

2025-05-14 Thread Gábor Horváth via llvm-branch-commits
https://github.com/Xazax-hun approved this pull request. https://github.com/llvm/llvm-project/pull/139909 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libcxx] [libc++] Implements the new FTM documentation generator. (PR #139774)

2025-05-14 Thread Louis Dionne via llvm-branch-commits
https://github.com/ldionne edited https://github.com/llvm/llvm-project/pull/139774 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libcxx] [libc++] Implements the new FTM documentation generator. (PR #139774)

2025-05-14 Thread Louis Dionne via llvm-branch-commits
https://github.com/ldionne approved this pull request. I am really excited for this change! This looks really good, with a few comments. https://github.com/llvm/llvm-project/pull/139774 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.ll

[llvm-branch-commits] [libcxx] [libc++] Implements the new FTM documentation generator. (PR #139774)

2025-05-14 Thread Louis Dionne via llvm-branch-commits
@@ -0,0 +1,187 @@ +# ===--===## +# +# 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-

[llvm-branch-commits] [libcxx] [libc++] Implements the new FTM documentation generator. (PR #139774)

2025-05-14 Thread Louis Dionne via llvm-branch-commits
@@ -2555,6 +2645,72 @@ def generate_header_test_directory(self, path: os.path) -> None: f.write(self.generate_header_test_file(header)) +@functools.cached_property +def status_list_table(self) -> str: +"""Creates the rst status table using a l

[llvm-branch-commits] [clang] [llvm] Enable fexec-charset option (PR #138895)

2025-05-14 Thread via llvm-branch-commits
@@ -0,0 +1,36 @@ +//===--- clang/Lex/LiteralConverter.h - Translator for Literals -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apa

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: optionally assume auth traps on failure (PR #139778)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/139778 >From 3dd903c3143f03e0aefb26d0349cf746b8169357 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 13 May 2025 19:50:41 +0300 Subject: [PATCH] [BOLT] Gadget scanner: optionally assume auth traps on

[llvm-branch-commits] [clang] [clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr (PR #139909)

2025-05-14 Thread Balazs Benics via llvm-branch-commits
steakhal wrote: I already amended the patch to add this fix to the release notes of clang. That's the only change I made to the picked commit. https://github.com/llvm/llvm-project/pull/139909 ___ llvm-branch-commits mailing list llvm-branch-commits@li

[llvm-branch-commits] [clang] [clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr (PR #139909)

2025-05-14 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-clang-static-analyzer-1 Author: Balazs Benics (steakhal) Changes As reported in #135665, C++20 parenthesis initializer list expressions are not handled correctly and were causing crashes. This commit attempts to fix the issue by handing parenthesis ini

[llvm-branch-commits] [clang] [clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr (PR #139909)

2025-05-14 Thread Balazs Benics via llvm-branch-commits
https://github.com/steakhal created https://github.com/llvm/llvm-project/pull/139909 As reported in #135665, C++20 parenthesis initializer list expressions are not handled correctly and were causing crashes. This commit attempts to fix the issue by handing parenthesis initializer lists along s

[llvm-branch-commits] [clang] [clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr (PR #139909)

2025-05-14 Thread Balazs Benics via llvm-branch-commits
https://github.com/steakhal milestoned https://github.com/llvm/llvm-project/pull/139909 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [BOLT] Introduce helpers to match `MCInst`s one at a time (NFC) (PR #138883)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138883 >From 1c135a144d7f21e05c3598a992baa170cdde7950 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Wed, 7 May 2025 16:42:00 +0300 Subject: [PATCH] [BOLT] Introduce helpers to match `MCInst`s one at a tim

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: prevent false positives due to jump tables (PR #138884)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138884 >From eae2c10ca4d3024862eba06acbb073244ac350e9 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 6 May 2025 11:31:03 +0300 Subject: [PATCH] [BOLT] Gadget scanner: prevent false positives due to ju

[llvm-branch-commits] [llvm] [BOLT] Factor out MCInstReference from gadget scanner (NFC) (PR #138655)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138655 >From cbcac1bc4612b601a5ec963663ba69a5f212feb1 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Mon, 28 Apr 2025 18:35:48 +0300 Subject: [PATCH] [BOLT] Factor out MCInstReference from gadget scanner (

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: optionally assume auth traps on failure (PR #139778)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/139778 >From 3dd903c3143f03e0aefb26d0349cf746b8169357 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 13 May 2025 19:50:41 +0300 Subject: [PATCH] [BOLT] Gadget scanner: optionally assume auth traps on

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: prevent false positives due to jump tables (PR #138884)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138884 >From eae2c10ca4d3024862eba06acbb073244ac350e9 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 6 May 2025 11:31:03 +0300 Subject: [PATCH] [BOLT] Gadget scanner: prevent false positives due to ju

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: improve handling of unreachable basic blocks (PR #136183)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
atrosinenko wrote: Moved the `computePessimisticState` function here from #137224, as accounting for the registers that were never clobbered in a function (basically, accounting for the leaf functions) turns out to decrease the number of false positive reports quite significantly. https://git

[llvm-branch-commits] [mlir] [MLIR][ArmSVE] Add initial lowering of vector.contract to SVE `*MMLA` instructions (PR #135636)

2025-05-14 Thread Momchil Velikov via llvm-branch-commits
@@ -0,0 +1,304 @@ +//===- LowerContractionToSMMLAPattern.cpp - Contract to SMMLA ---*- 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: Ap

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: detect untrusted LR before tail call (PR #137224)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/137224 >From d20efbedd0be34942e8e28cc91eefeb28d1b8108 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Tue, 22 Apr 2025 21:43:14 +0300 Subject: [PATCH] [BOLT] Gadget scanner: detect untrusted LR before tail

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: account for BRK when searching for auth oracles (PR #137975)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/137975 >From 91b67b64a4e731cdfabc09bd224c32e1ab25e21d Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Wed, 30 Apr 2025 16:08:10 +0300 Subject: [PATCH] [BOLT] Gadget scanner: account for BRK when searching f

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: account for BRK when searching for auth oracles (PR #137975)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/137975 >From 91b67b64a4e731cdfabc09bd224c32e1ab25e21d Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Wed, 30 Apr 2025 16:08:10 +0300 Subject: [PATCH] [BOLT] Gadget scanner: account for BRK when searching f

[llvm-branch-commits] [llvm] [BOLT] Introduce helpers to match `MCInst`s one at a time (NFC) (PR #138883)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/138883 >From 1c135a144d7f21e05c3598a992baa170cdde7950 Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Wed, 7 May 2025 16:42:00 +0300 Subject: [PATCH] [BOLT] Introduce helpers to match `MCInst`s one at a tim

[llvm-branch-commits] [llvm] [BOLT] Gadget scanner: improve handling of unreachable basic blocks (PR #136183)

2025-05-14 Thread Anatoly Trosinenko via llvm-branch-commits
https://github.com/atrosinenko updated https://github.com/llvm/llvm-project/pull/136183 >From c11b9017a4d3a4c07946081a355506e0f69d312b Mon Sep 17 00:00:00 2001 From: Anatoly Trosinenko Date: Thu, 17 Apr 2025 20:51:16 +0300 Subject: [PATCH 1/3] [BOLT] Gadget scanner: improve handling of unreacha

  1   2   >