[llvm-branch-commits] [llvm] [llvm][mustache] Specialize delimiter search (PR #160165)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
@@ -306,15 +350,18 @@ SmallVector tokenize(StringRef Template) { StringLiteral Open("{{"); StringLiteral Close("}}"); size_t Start = 0; - size_t DelimiterStart = Template.find(Open); + // size_t DelimiterStart = Template.find(Open); nikic wrote: Leftov

[llvm-branch-commits] [llvm] [llvm][mustache] Specialize delimiter search (PR #160165)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/160165 ___ 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] [llvm][mustache] Specialize delimiter search (PR #160165)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: How much does this improve performance? https://github.com/llvm/llvm-project/pull/160165 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-br

[llvm-branch-commits] [llvm] [llvm][mustache] Specialize delimiter search (PR #160165)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
@@ -572,6 +620,8 @@ void ASTNode::render(const json::Value &CurrentCtx, raw_ostream &OS) { ParentContext = &CurrentCtx; const json::Value *ContextPtr = Ty == Root ? ParentContext : findContext(); + if (AccessorValue.empty() && (Ty != Root && Ty != Text)) +return; ---

[llvm-branch-commits] [llvm] [llvm][mustache] Specialize delimiter search (PR #160165)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
@@ -17,6 +17,50 @@ namespace { using Accessor = SmallVector; +// A more generic specialized find for needles of length 1-3. +[[maybe_unused]] nikic wrote: Not maybe_unused? https://github.com/llvm/llvm-project/pull/160165 ___

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
@@ -3248,9 +3346,11 @@ as follows: this set are considered to support most general arithmetic operations efficiently. ``ni:::...`` -This specifies pointer types with the specified address spaces -as :ref:`Non-Integral Pointer Type ` s. The ``0`` -address sp

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
@@ -355,30 +364,111 @@ class DataLayout { /// \sa DataLayout::getAddressSizeInBits unsigned getAddressSize(unsigned AS) const { return getIndexSize(AS); } - /// Return the address spaces containing non-integral pointers. Pointers in - /// this address space don't have a

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
@@ -617,7 +638,7 @@ Error DataLayout::parseLayoutString(StringRef LayoutString) { // the spec for AS0, and we then update that to mark it non-integral. const PointerSpec &PS = getPointerSpec(AS); setPointerSpec(AS, PS.BitWidth, PS.ABIAlign, PS.PrefAlign, PS.IndexB

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/105735 ___ 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] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
@@ -660,42 +660,136 @@ Non-Integral Pointer Type Note: non-integral pointer types are a work in progress, and they should be considered experimental at this time. -LLVM IR optionally allows the frontend to denote pointers in certain address -spaces as "non-integral" via the :r

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-22 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/105735 ___ 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] [ConstantFolding] Avoid use of isNonIntegralPointerType() (PR #159959)

2025-09-21 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/159959 ___ 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] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-21 Thread Nikita Popov via llvm-branch-commits
@@ -3193,9 +3273,14 @@ as follows: default index size is equal to the pointer size. The index size also specifies the width of addresses in this address space. All sizes are in bits. -The address space, ``n``, is optional, and if not specified, -denotes the

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-21 Thread Nikita Popov via llvm-branch-commits
@@ -77,12 +77,21 @@ class DataLayout { uint32_t BitWidth; Align ABIAlign; Align PrefAlign; +/// The index bit width also defines the address size in this address space. +/// If the index width is less than the representation bit width, the +/// pointer

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-21 Thread Nikita Popov via llvm-branch-commits
@@ -440,8 +461,12 @@ Error DataLayout::parsePointerSpec(StringRef Spec) { return createStringError( "index size cannot be larger than the pointer size"); + if (ExternalState && BitWidth == IndexBitWidth) +return createStringError( +"pointers with exter

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-21 Thread Nikita Popov via llvm-branch-commits
@@ -660,42 +660,122 @@ Non-Integral Pointer Type Note: non-integral pointer types are a work in progress, and they should be considered experimental at this time. -LLVM IR optionally allows the frontend to denote pointers in certain address -spaces as "non-integral" via the :r

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-21 Thread Nikita Popov via llvm-branch-commits
@@ -660,42 +660,122 @@ Non-Integral Pointer Type Note: non-integral pointer types are a work in progress, and they should be considered experimental at this time. -LLVM IR optionally allows the frontend to denote pointers in certain address -spaces as "non-integral" via the :r

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-21 Thread Nikita Popov via llvm-branch-commits
@@ -660,42 +660,122 @@ Non-Integral Pointer Type Note: non-integral pointer types are a work in progress, and they should be considered experimental at this time. -LLVM IR optionally allows the frontend to denote pointers in certain address -spaces as "non-integral" via the :r

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-09-21 Thread Nikita Popov via llvm-branch-commits
@@ -6,7 +6,9 @@ target datalayout = "p:16:16:16:8" ; The GEP should only modify the low 8 bits of the pointer. define ptr @test() { ; CHECK-LABEL: define ptr @test() { -; CHECK-NEXT:ret ptr inttoptr (i16 -256 to ptr) +; We need to use finer-grained DataLayout properties for

[llvm-branch-commits] [clang] port 5b4819e to release (PR #159209)

2025-09-20 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/159209 ___ 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] release/21.x: MC: Better handle backslash-escaped symbols (PR #159420)

2025-09-18 Thread Nikita Popov via llvm-branch-commits
nikic wrote: The diff here is fairly large, but also very mechanical. This fixes a regression for the Rust defmt crate with LLVM 21. https://github.com/llvm/llvm-project/pull/159420 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.o

[llvm-branch-commits] [llvm] release/21.x: MC: Better handle backslash-escaped symbols (PR #159420)

2025-09-17 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/159420 None >From 0dca43897ece415a59345b11dd86854d60a3a640 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Fri, 12 Sep 2025 09:11:08 +0200 Subject: [PATCH 1/2] [MC] Add parseSymbol() helper (NFC) (#158106) This combi

[llvm-branch-commits] [llvm] release/21.x: MC: Better handle backslash-escaped symbols (PR #159420)

2025-09-17 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/159420 ___ 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] release/21.x: [Loads] Check for overflow when adding MaxPtrDiff + Offset. (PR #158918)

2025-09-16 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/158918 ___ 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] release/21.x: [VPlan] Don't narrow op multiple times in narrowInterleaveGroups. (PR #158013)

2025-09-15 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/158013 ___ 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] release/21.x: [RISCV] Support PreserveMost calling convention (#148214) (PR #158403)

2025-09-13 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Duplicate of https://github.com/llvm/llvm-project/pull/158402. https://github.com/llvm/llvm-project/pull/158403 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-br

[llvm-branch-commits] [llvm] release/21.x: [RISCV] Support PreserveMost calling convention (#148214) (PR #158403)

2025-09-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/158403 ___ 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] release/21.x: [VPlan] Don't narrow op multiple times in narrowInterleaveGroups. (PR #158013)

2025-09-12 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/158013 ___ 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] [AMDGPU] Generate canonical additions in AMDGPUPromoteAlloca (PR #157810)

2025-09-12 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/157810 ___ 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] [InstCombine] Set !prof metadata on selects (PR #157599)

2025-09-09 Thread Nikita Popov via llvm-branch-commits
nikic wrote: TBH I don't think selects should be validated by profcheck at all, only branches. https://github.com/llvm/llvm-project/pull/157599 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[llvm-branch-commits] [llvm] release/21.x: [SCEVExp] Fix early exit in ComputeEndCheck. (PR #157410)

2025-09-09 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > This was merged to the release branch - the PR didn't update since I didn't > have access to write to your repo @nikic (don't forget to check the "allow > maintainer to write" checkbox in the future). Huh, this is weird. I checked a few other PRs I have open, and they all have i

[llvm-branch-commits] [llvm] [MC] Rewrite stdin.s to use python (PR #157232)

2025-09-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > > I don't know if I understand what you're going for in this patch. How is > > this an improvement over just keeping REQUIRES: shell? The REQUIRES: bit > > is what's going to stop the test from running in the wrong environment. > > That seems like the right tradeoff. > > If we

[llvm-branch-commits] [llvm] release/21.x: [SCEVExp] Fix early exit in ComputeEndCheck. (PR #157410)

2025-09-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/157410 Backport of: https://github.com/llvm/llvm-project/commit/a6148071300302b451ae92fbd8f8b955a6974891 https://github.com/llvm/llvm-project/commit/ec581e460ae92ef29c1ea4f200b36b79188fdd21 https://github.com/llvm/ll

[llvm-branch-commits] [llvm] release/21.x: [SCEVExp] Fix early exit in ComputeEndCheck. (PR #157410)

2025-09-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/157410 ___ 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] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-09-07 Thread Nikita Popov via llvm-branch-commits
nikic wrote: As this test runs the whole optimization pipeline, please move it to llvm/test/Transforms/PhaseOrdering. https://github.com/llvm/llvm-project/pull/151649 ___ llvm-branch-commits mailing list llvm-branch-

[llvm-branch-commits] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-09-07 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/151649 ___ 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] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-09-07 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/151649 ___ 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] release/21.x: [clang][docs] Fix implicit-int-conversion-on-negation typos (PR #156815)

2025-09-04 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/156815 ___ 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] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -697,8 +697,7 @@ static bool isSafeAndProfitableToSinkLoad(LoadInst *L) { Instruction *InstCombinerImpl::foldPHIArgLoadIntoPHI(PHINode &PN) { LoadInst *FirstLI = cast(PN.getIncomingValue(0)); - // Can't forward swifterror through a phi. - if (FirstLI->getOperand(0)->isS

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -0,0 +1,167 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5 +; RUN: opt -passes=pre-isel-intrinsic-lowering -S < %s | FileCheck --check-prefix=NOPAUTH %s +; RUN: opt -passes=pre-isel-intrinsic-lowering -m

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; nikic wrote: Unused? https://github.com/llvm/llvm-project/pull/151

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -2850,6 +2850,12 @@ def int_experimental_convergence_anchor def int_experimental_convergence_loop : DefaultAttrsIntrinsic<[llvm_token_ty], [], [IntrNoMem, IntrConvergent]>; +//===- Structure Protection Intrinsics ===// + +def int_prote

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] [clang] release/21.x: [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (#154490) (PR #155513)

2025-08-27 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/155513 ___ 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] release/21.x: [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (#154490) (PR #155492)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
@@ -634,7 +634,7 @@ class ASTContext : public RefCountedBase { /// contain data that is address discriminated. This includes /// implicitly authenticated values like vtable pointers, as well as /// explicitly qualified fields. - bool containsAddressDiscriminatedPointerAu

[llvm-branch-commits] [clang] release/21.x: [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (#154490) (PR #155492)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
@@ -634,7 +634,7 @@ class ASTContext : public RefCountedBase { /// contain data that is address discriminated. This includes /// implicitly authenticated values like vtable pointers, as well as /// explicitly qualified fields. - bool containsAddressDiscriminatedPointerAu

[llvm-branch-commits] [llvm] [IR] Add `MD_prof` to the `Keep` list of `dropUBImplyingAttrsAndMetadata` (PR #154635)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
@@ -553,16 +553,17 @@ void Instruction::dropUBImplyingAttrsAndUnknownMetadata( } void Instruction::dropUBImplyingAttrsAndMetadata(ArrayRef Keep) { nikic wrote: I think the `Keep` is no longer needed now, but I guess it doesn't hurt to keep it... https://git

[llvm-branch-commits] [llvm] [IR] Add `MD_prof` to the `Keep` list of `dropUBImplyingAttrsAndMetadata` (PR #154635)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
@@ -1,20 +1,21 @@ -; NOTE: Assertions have been autogenerated by update_test_checks.py +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5 nikic wrote: I think you don't need the `--check-globals`,

[llvm-branch-commits] [llvm] [IR] Add `MD_prof` to the `Keep` list of `dropUBImplyingAttrsAndMetadata` (PR #154635)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/154635 ___ 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] Add `MD_prof` to the `Keep` list of `dropUBImplyingAttrsAndMetadata` (PR #154635)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/154635 ___ 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] [Local] preserve `MD_prof` in `hoistAllInstructionsInto` (PR #154635)

2025-08-25 Thread Nikita Popov via llvm-branch-commits
@@ -498,6 +498,7 @@ LLVM_ABI void dropDebugUsers(Instruction &I); /// /// The moved instructions receive the insertion point debug location values /// (DILocations) and their debug intrinsic instructions are removed. +/// Selects and indirect calls keep their MD_prof metadata.

[llvm-branch-commits] [libcxx] release/21.x [libc++] Fix ABI break introduced by switching to _LIBCPP_COMPRESSED_PAIR (#154686) (PR #155251)

2025-08-25 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. We need to also either backport a fix for lldb tests or disable the relevant tests. That needs to happen as part of this PR. https://github.com/llvm/llvm-project/pull/155251 ___ llvm-bra

[llvm-branch-commits] [llvm] [SelectionDAGBuilder] Use address width when lowering ptrtoaddr (PR #139423)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/139423 ___ 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] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
nikic wrote: You can probably achieve that just by adding a function call before the select (where the function is not known willreturn/nounwind). https://github.com/llvm/llvm-project/pull/152420 ___ llvm-branch-comm

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) { // A DIAssignID attachment is debug metadata, don't drop it. KnownSet.insert(LLVMContext::MD_DIAssignID); + if (!ProfcheckDisableMetadataFixes) +KnownSet.insert(LLVMContext::MD_p

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-09 Thread Nikita Popov via llvm-branch-commits
nikic wrote: All this tests needs is a hoistable select with prof metadata. You do not need any of the blockaddress / indirectbr stuff. https://github.com/llvm/llvm-project/pull/152420 ___ llvm-branch-commits mailing

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-09 Thread Nikita Popov via llvm-branch-commits
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) { // A DIAssignID attachment is debug metadata, don't drop it. KnownSet.insert(LLVMContext::MD_DIAssignID); + if (!ProfcheckDisableMetadataFixes) +KnownSet.insert(LLVMContext::MD_p

[llvm-branch-commits] [CaptureTracking] Handle ptrtoaddr (PR #152221)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/152221 ___ 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] [lldb] [lldb-dap] fix crash if disconnect request is not sent. (PR #148878)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/148878 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [lldb] [lldb-dap] fix crash if disconnect request is not sent. (PR #148878)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/148878 ___ 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] release/20.x: [libc++] Fix std::make_exception_ptr interaction with ObjC (#135386) (PR #147554)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/147554 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fix std::make_exception_ptr interaction with ObjC (#135386) (PR #147554)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/147554 ___ 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] release/20.x: [CoroSplit] Always erase lifetime intrinsics for spilled allocas (#142551) (PR #147448)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/147448 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/20.x: [CoroSplit] Always erase lifetime intrinsics for spilled allocas (#142551) (PR #147448)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/147448 ___ 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] release/20.x: [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (#142749) (PR #142909)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/142909 ___ 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] release/20.x: [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (#142749) (PR #142909)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/142909 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/20.x: [InstCombine] Fix ninf propagation for fcmp+sel -> minmax (#136433) (PR #137605)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/137605 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/20.x: [InstCombine] Fix ninf propagation for fcmp+sel -> minmax (#136433) (PR #137605)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/137605 ___ 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] release/20.x: [LV] Fix crash when building partial reductions using types that aren't known scale factors (#136680) (PR #136863)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/136863 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/20.x: [LV] Fix crash when building partial reductions using types that aren't known scale factors (#136680) (PR #136863)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/136863 ___ 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] [flang] release/20.x: [flang] Fix missed case of symbol renaming in module file generation (#132475) (PR #133223)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/133223 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [flang] release/20.x: [flang] Fix missed case of symbol renaming in module file generation (#132475) (PR #133223)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/133223 ___ 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] [llvm][cmake] Turn runtime in PROJECTS warnings into FATAL_ERROR (PR #152302)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. This is absolutely inappropriate to land on the release branch. Feel free to update the version numbers -- or better, remove the mention of specific versions entirely. These will get removed when we are ready to remove them, not

[llvm-branch-commits] [flang] release/21.x: [flang][cmake] Fix bbc dependencies (#152306) (PR #152364)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/152364 ___ 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] [polly] [IR] Add CallBr intrinsics support (PR #133907)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -3490,19 +3514,25 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) { // Update successor info. addSuccessorWithProb(CallBrMBB, Return, BranchProbability::getOne()); - for (unsigned i = 0, e = I.getNumIndirectDests(); i < e; ++i) { -BasicBlock *Dest =

[llvm-branch-commits] [llvm] [polly] [IR] Add CallBr intrinsics support (PR #133907)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -9674,7 +9678,7 @@ This instruction requires several arguments: indicates the function accepts a variable number of arguments, the extra arguments can be specified. #. '``fallthrough label``': the label reached when the inline assembly's - execution exits the bottom.

[llvm-branch-commits] [llvm] [polly] [IR] Add CallBr intrinsics support (PR #133907)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
nikic wrote: I think it would be a good idea to land the refactorings here (which just split things into separate methods) as a separate NFC change. It's kind of hard to follow what's going on here with all the code movements mixed in. https://github.com/llvm

[llvm-branch-commits] [llvm] [polly] [IR] Add CallBr intrinsics support (PR #133907)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -3006,10 +3024,41 @@ bool IRTranslator::translateInvoke(const User &U, return true; } +/// The intrinsics currently supported by callbr are implicit control flow +/// intrinsics such as amdgcn.kill. bool IRTranslator::translateCallBr(const User &U,

[llvm-branch-commits] [CaptureTracking] Handle ptrtoaddr (PR #152221)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -359,6 +359,11 @@ UseCaptureInfo llvm::DetermineUseCaptureKind(const Use &U, const Value *Base) { case Instruction::AddrSpaceCast: // The original value is not captured via this if the new value isn't. return UseCaptureInfo::passthrough(); + case Instruction::Ptr

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Should also add an entry in https://llvm.org/docs/LangRef.html#constant-expressions. https://github.com/llvm/llvm-project/pull/139357 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.o

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/139357 ___ 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] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -12521,6 +12521,59 @@ Example: %Y = ptrtoint ptr %P to i64; yields zero extension on 32-bit architecture %Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension for a vector of addresses on 32-bit architecture +.. _i_ptrto

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -3532,6 +3533,28 @@ void Verifier::visitFPToSIInst(FPToSIInst &I) { visitInstruction(I); } +void Verifier::visitPtrToAddrInst(PtrToAddrInst &I) { + // Get the source and destination types + Type *SrcTy = I.getOperand(0)->getType(); + Type *DestTy = I.getType(); + + Ch

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/139357 ___ 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] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -731,6 +731,12 @@ class TargetTransformInfoImplBase { return 0; break; } +case Instruction::PtrToAddr: { + unsigned DstSize = Dst->getScalarSizeInBits(); + if (DL.isLegalInteger(DstSize) && DstSize >= DL.getAddressSizeInBits(Src)) ---

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -12521,6 +12521,59 @@ Example: %Y = ptrtoint ptr %P to i64; yields zero extension on 32-bit architecture %Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension for a vector of addresses on 32-bit architecture +.. _i_ptrto

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -3532,6 +3533,28 @@ void Verifier::visitFPToSIInst(FPToSIInst &I) { visitInstruction(I); } +void Verifier::visitPtrToAddrInst(PtrToAddrInst &I) { + // Get the source and destination types + Type *SrcTy = I.getOperand(0)->getType(); + Type *DestTy = I.getType(); + + Ch

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -1482,6 +1482,20 @@ Constant *llvm::ConstantFoldCastOperand(unsigned Opcode, Constant *C, switch (Opcode) { default: llvm_unreachable("Missing case"); + case Instruction::PtrToAddr: +if (auto *GEP = dyn_cast(C)) { + // For now just handle the basic case of

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -12521,6 +12521,59 @@ Example: %Y = ptrtoint ptr %P to i64; yields zero extension on 32-bit architecture %Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension for a vector of addresses on 32-bit architecture +.. _i_ptrto

[llvm-branch-commits] [llvm] [ConstraintElim] Simplify `usub_with_overflow` when A uge B (PR #135785)

2025-08-05 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM, though I wouldn't expect to see much usub.with.overflow in the middle-end. https://github.com/llvm/llvm-project/pull/135785 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.o

[llvm-branch-commits] [llvm] release/21.x: [llvm][sroa] Disable support for `invariant.group` (#151743) (PR #152099)

2025-08-05 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/152099 ___ 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] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-08-04 Thread Nikita Popov via llvm-branch-commits
nikic wrote: That sounds fine as long as the plan is to remove the isNonIntegralPointer() method in the future, in favor of more precise checks. https://github.com/llvm/llvm-project/pull/105735 ___ llvm-branch-commits mailing list llvm-branch-commits@

[llvm-branch-commits] [llvm] RuntimeLibcalls: Remove darwin override of half convert libcalls (PR #148782)

2025-08-03 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/148782 ___ 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] AlwaysInliner: A new inlining algorithm to interleave alloca promotion with inlines. (PR #145613)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
nikic wrote: This looks like a simple missed optimization in InstCombine. My first thought would be to handle this via foldOpIntoPhi for selects: https://github.com/nikic/llvm-project/commit/c7d9b006453275be94894c6afdae5f6c940c1621 But this isn't quite correc

[llvm-branch-commits] [IR] Make BranchInst operand order consistent (PR #151673)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Ah, I didn't realize that it's always based on op_end. Maybe this change is not actually that bad if combined with the new successors() representation? Then the successors iterator is not going to through through getSuccessor() anymore and it will have less impact? https://github

[llvm-branch-commits] [llvm] release/21.x: [DAG] visitFREEZE - limit freezing of multiple operands (PR #150425)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM, though I'd probably squash the first two commits. The back and forth is confusing. https://github.com/llvm/llvm-project/pull/150425 ___ llvm-branch-commits mailing list llvm-branch-commits@lis

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +465,198 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Use update_test_checks.py. https://github.com/llvm/llvm-project/pull/151647 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bra

  1   2   3   4   5   6   7   >