[llvm-branch-commits] [clang] Backport: [clang] Serialization: support hashing null template arguments (PR #141957)

2025-05-30 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/141957 ___ 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-readobj: Use reportFatalUsageError (PR #142039)

2025-05-29 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/142039 ___ 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] CodeGen: Convert some assorted errors to use reportFatalUsageError (PR #142031)

2025-05-29 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/142031 ___ 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] X86: Add X86TTIImpl::isProfitableToSinkOperands hook for immediate operands. (PR #141326)

2025-05-28 Thread Nikita Popov via llvm-branch-commits
@@ -7170,16 +7165,31 @@ bool X86TTIImpl::isProfitableToSinkOperands(Instruction *I, II->getIntrinsicID() == Intrinsic::fshr) ShiftAmountOpNum = 2; } - if (ShiftAmountOpNum == -1) return false; + auto *ShiftAmount = &I->getOperandUse(ShiftAmountOpNum);

[llvm-branch-commits] X86: Add X86TargetLowering::isProfitableToHoist hook for immediate operands. (PR #141326)

2025-05-27 Thread Nikita Popov via llvm-branch-commits
nikic wrote: @pcc I think using fsh should at least help to get a ror instead of the shr+shl+or. Actually getting the value duplicated+sunk into each block is typically done in CGP, which has a bunch of related transforms. The most generic is probably tryToSinkFreeOperands driven by TTI.isPro

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

2025-05-27 Thread Nikita Popov via llvm-branch-commits
@@ -33,8 +34,11 @@ PreservedAnalyses EmbedBitcodePass::run(Module &M, ModuleAnalysisManager &AM) { std::string Data; raw_string_ostream OS(Data); + // Clone the module with with Thin LTO, since ThinLTOBitcodeWriterPass changes nikic wrote: ```suggestio

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

2025-05-27 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. Okay, let's go with this for now. Compile-time impact of cloning the module is about 0.2% when building clang with fat LTO: https://llvm-compile-time-tracker.com/compare.php?from=11a01e851a06188ae946ace1140f866d7a667221&to=46e037d763e7997a83

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

2025-05-27 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/13 ___ 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: [MachO] Improve bounds check (#141083) (PR #141461)

2025-05-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/141461 ___ 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] Update release notes for SystemZ changes (PR #140060)

2025-05-24 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/140060 ___ 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] [libclc] release/20.x: [libclc] Include isnan implementation for SPIR-V targets (PR #140902)

2025-05-24 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/140902 ___ 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] X86: Add X86TargetLowering::isProfitableToHoist hook for immediate operands. (PR #141326)

2025-05-23 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: I'm not super clear on what it is you're trying to fix here. Probably LowerTypeTests should be directly emitting a fshl/fshr instead of a bit shift sequence to make matching to rotate more reliable. Would that help you or not? https://github.com/llvm/llvm-p

[llvm-branch-commits] Transforms: Have CSE/GVN/LICM check isProfitableToHoist() before hoisting. (PR #141325)

2025-05-23 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. If you're using stacked pull requests, please link the other PRs from the stack. It's impossible to understand the context otherwise. Based on just the changes in this PR: * The EarlyCSE and GVN changes do not make sense to me.

[llvm-branch-commits] [mlir] Add missing imports (PR #138550)

2025-05-22 Thread Nikita Popov via llvm-branch-commits
nikic wrote: The LLVM 19 release is no longer supported. You'll have to apply this as a local patch if you want to build and old LLVM 19 with a new libstdc++. https://github.com/llvm/llvm-project/pull/138550 ___ llvm-branch-commits mailing list llvm-b

[llvm-branch-commits] [mlir] Add missing imports (PR #138550)

2025-05-22 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/138550 ___ 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][EmbedBitcodePass] Prevent modifying the module with ThinLTO (PR #139999)

2025-05-15 Thread Nikita Popov via llvm-branch-commits
nikic wrote: @ilovepi Does it also work on the release branch? I'd mainly see the clone module approach as something easily backportable for the release branch, but I assume for main we'll want a different solution? https://github.com/llvm/llvm-project/pull/13 _

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

2025-05-15 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: Didn't we switch away from cloning because it breaks blockaddress somehow? https://github.com/llvm/llvm-project/pull/13 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.o

[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] release/20.x: AMDGPU: Stop emitting an error on illegal addrspacecasts (#127487) (PR #127496)

2025-05-10 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as https://github.com/llvm/llvm-project/pull/127751 has landed. https://github.com/llvm/llvm-project/pull/127496 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[llvm-branch-commits] [llvm] release/20.x: AMDGPU: Stop emitting an error on illegal addrspacecasts (#127487) (PR #127496)

2025-05-10 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/127496 ___ 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-format] Fix a crash on formatting missing r_pare… (PR #139345)

2025-05-10 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/139345 ___ 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] Reapply "IR: Remove uselist for constantdata (#137313)" (PR #138961)

2025-05-07 Thread Nikita Popov via llvm-branch-commits
@@ -180,6 +180,10 @@ llvm::getKnowledgeForValue(const Value *V, } return RetainedKnowledge::none(); } + + if (!V->hasUseList()) +return RetainedKnowledge::none(); nikic wrote: As a followup, we should completely remove the non-AC code in this fu

[llvm-branch-commits] [llvm] [polly] Reapply "IR: Remove uselist for constantdata (#137313)" (PR #138961)

2025-05-07 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/138961 ___ 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] ValueTracking: Handle minimumnum and maximumnum in computeKnownFPClass (PR #138737)

2025-05-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/138737 ___ 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] ValueTracking: Handle minimumnum/maximumnum in canCreateUndefOrPoison (PR #138729)

2025-05-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/138729 ___ 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: Reorder ConstantData enum values (PR #138638)

2025-05-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/138638 ___ 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: Reorder ConstantData enum values (PR #138638)

2025-05-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: Peculiarly, this has a negative effect on stage1 builds using gcc and a positive effect on stage2 builds using clang: https://llvm-compile-time-tracker.com/compare.php?from=420eca364b07bad78dc0a5d21da5980493798df0&to=00be79cbc7dea09fcd8a57ea51b3e800564fd986&s

[llvm-branch-commits] [llvm] llvm-reduce: Support exotic terminators in instructions-to-return (PR #134794)

2025-05-02 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134794 ___ 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-reduce: Support exotic terminators in instructions-to-return (PR #134794)

2025-05-02 Thread Nikita Popov via llvm-branch-commits
@@ -73,28 +73,16 @@ static void rewriteFuncWithReturnType(Function &OldF, Value *NewRetValue) { } } - // Now prune any CFG edges we have to deal with. - // - // Use KeepOneInputPHIs in case the instruction we are using for the return is - // that phi. - // TODO: C

[llvm-branch-commits] [llvm] llvm-reduce: Support exotic terminators in instructions-to-return (PR #134794)

2025-05-02 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/134794 ___ 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] [llvm] [llvm] Introduce callee_type metadata (PR #87573)

2025-05-01 Thread Nikita Popov via llvm-branch-commits
@@ -5096,6 +5097,23 @@ void Verifier::visitCallsiteMetadata(Instruction &I, MDNode *MD) { visitCallStackMetadata(MD); } +void Verifier::visitCalleeTypeMetadata(Instruction &I, MDNode *MD) { + Check(isa(I), "!callee_type metadata should only exist on calls", +&I); +

[llvm-branch-commits] [llvm] release/20.x: [InstCombine] Do not combine shuffle+bitcast if the bitcast is eliminable. (#135769) (PR #138142)

2025-05-01 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/138142 ___ 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] [AArch64][llvm] Pre-commit tests for #137703 (NFC) (PR #137702)

2025-04-29 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Looks like something went wrong here? https://github.com/llvm/llvm-project/pull/137702 ___ 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: [InstCombine] Fix ninf propagation for fcmp+sel -> minmax (#136433) (PR #137605)

2025-04-28 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > > I don't think there is a need to backport FMF propagation fixes. > > Is there a policy to judge whether or not to backport a miscompilation bug > fix? Actually, it is unlikely to trigger this bug in real-world projects. But > this fix is simple and safe to be backported. Ther

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

2025-04-28 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: I don't think there is a need to backport FMF propagation fixes. 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

[llvm-branch-commits] [llvm] release/20.x: [InstCombine] Do not fold logical is_finite test (#136851) (PR #137606)

2025-04-28 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/137606 ___ 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 reference counts from ConstantData (PR #137314)

2025-04-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/137314 ___ 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 reference counts from ConstantData (PR #137314)

2025-04-26 Thread Nikita Popov via llvm-branch-commits
@@ -518,17 +509,8 @@ class Value { /// This method should only be used by the Use class. void addUse(Use &U) { -if (hasUseList()) - U.addToList(Uses.List); -else - U.addToList(Uses.Count); - } - - void removeUse(Use &U) { -if (hasUseList()) - U

[llvm-branch-commits] [llvm] IR: Remove reference counts from ConstantData (PR #137314)

2025-04-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137314 ___ 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 reference counts from ConstantData (PR #137314)

2025-04-26 Thread Nikita Popov via llvm-branch-commits
@@ -85,10 +84,8 @@ class Use { Use **Prev = nullptr; User *Parent = nullptr; - inline void addToList(unsigned &Count); - inline void addToList(Use *&List); - inline void removeFromList(unsigned &Count); - inline void removeFromList(Use *&List); + inline void addToList

[llvm-branch-commits] [llvm] IR: Remove reference counts from ConstantData (PR #137314)

2025-04-26 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Compile-time for both PRs taken together looks good: https://llvm-compile-time-tracker.com/compare.php?from=12a31658ea36cda74157c6b4e6b6c031e39a19c0&to=d769267079777e4fa4cf41188bfe2aab1b9361f1&stat=instructions%3Au (For reference, this is for the first PR only: https://llvm-compil

[llvm-branch-commits] [llvm] IR: Remove reference counts from ConstantData (PR #137314)

2025-04-25 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: The general approach here makes sense to me. For reference, this is the diff for both PRs together, which is a bit clearer as the second undoes half of the first: https://github.com/llvm/llvm-project/compare/main...users/arsenm/ir/remove-constantdata-referen

[llvm-branch-commits] [llvm] IR: Remove reference counts from ConstantData (PR #137314)

2025-04-25 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/137314 ___ 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 reference counts from ConstantData (PR #137314)

2025-04-25 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: Looks like there are some polly assertion failures. https://github.com/llvm/llvm-project/pull/137314 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[llvm-branch-commits] [llvm] [Attributor] Use `getAllocaAddrSpace` to get address space for `AllocaInst` (PR #136865)

2025-04-23 Thread Nikita Popov via llvm-branch-commits
nikic wrote: @shiltian I'm not entirely sure what you're asking here. As @arsenm said, the alloca address space in the data layout is merely a hint on the address space to use when materializing allocas "out of thin air". There are targets that use multiple alloca address spaces, this just spe

[llvm-branch-commits] [clang] Backport to 20.x "[clang][analyzer] Fix error path of builtin overflow (#136345)" (PR #136589)

2025-04-21 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/136589 ___ 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] ARM: Avoid using getNumUses (PR #136355)

2025-04-18 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/136355 ___ 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] AArch64: Use use_empty instead of getNumUses == 0 (PR #136356)

2025-04-18 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/136356 ___ 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] Fix SBTarget::ReadInstruction with flavor (PR #136034)

2025-04-17 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/136034 ___ 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] [LV] Disable epilogue vectorization for FindLastIV if start is poison. (PR #135666)

2025-04-14 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/135666 ___ 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: [SCEV] Use ashr to adjust constant multipliers (#135534) (PR #135543)

2025-04-14 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/135543 ___ 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: [LLVM][MemCpyOpt] Unify alias tags if we optimize allocas (#129537) (PR #135615)

2025-04-14 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/135615 ___ 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: [LLVM][MemCpyOpt] Unify alias tags if we optimize allocas (#129537) (PR #135615)

2025-04-14 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/135615 Backport of 716b02d8c575afde7af1af13df145019659abca2, with conflicts in the test resolved. >From e385f5c5b9bd32f89754e8088c29f42a761f2880 Mon Sep 17 00:00:00 2001 From: Dominik Adamski Date: Thu, 10 Apr 2025 12:

[llvm-branch-commits] [clang] release/20.x: [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (#132214) (PR #134232)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > @nikic what do you mean by ABI change in this case? It doesn't change ABI of > generated code, moreover it doesn't even change PCM serialized format because > it is in memory only filed and attribute. It changes the ABI of libclang-cpp, by changing the layout of an exported type

[llvm-branch-commits] [clang] release/20.x: [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (#132214) (PR #134232)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
@@ -1392,6 +1392,10 @@ class ASTReader llvm::DenseMap DefinitionSource; + /// Friend functions that were defined but might have had their bodies + /// removed. + llvm::DenseSet ThisDeclarationWasADefinitionSet; nikic wrote: This is an ABI break. https:

[llvm-branch-commits] [clang] release/20.x: [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (#132214) (PR #134232)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. https://github.com/llvm/llvm-project/pull/134232 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commit

[llvm-branch-commits] [clang] release/20.x: [modules] Handle friend function that was a definition but became only a declaration during AST deserialization (#132214) (PR #134232)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/134232 ___ 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] [LV] An attempt to cherry-pick the fix PR #132691 (cherry-pick from the main branch to the release/20.x branch) (PR #135231)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. Breaks LoopUtils.h ABI in obvious ways and FMF.h ABI in less obvious ways. Can this be fixed in a more minimal way than backporting 18 commits that include a lot of refactorings? https://github.com/llvm/llvm-project/pull/135231 _

[llvm-branch-commits] [llvm] [LV] An attempt to cherry-pick the fix PR #132691 (cherry-pick from the main branch to the release/20.x branch) (PR #135231)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/135231 ___ 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] [X86] Backport saturate-convert intrinsics renaming & YMM rounding intrinsics removal in AVX10.2 (PR #135549)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/135549 ___ 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 uselist for constantdata (PR #134692)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: Compile-time: https://llvm-compile-time-tracker.com/compare.php?from=09588e93bbe486ce782de9fba604f5cd184ec446&to=54260021fd4ffa41b5f20994af7b34653b4d4d42&stat=instructions%3Au It's possible that the wall-time picture may be different due to slightly less mem

[llvm-branch-commits] [llvm] IR: Remove uselist for constantdata (PR #134692)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
@@ -889,10 +919,50 @@ inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) { return OS; } +inline Use::~Use() { + if (Val) +Val->removeUse(*this); +} + +void Use::addToList(unsigned &Count) { + assert(isa(Val) && "Only ConstantData is ref-counted"); + ++Co

[llvm-branch-commits] [llvm] IR: Remove uselist for constantdata (PR #134692)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
@@ -8857,6 +8857,8 @@ bool LLParser::parseMDNodeVector(SmallVectorImpl &Elts) { //===--===// bool LLParser::sortUseListOrder(Value *V, ArrayRef Indexes, SMLoc Loc) { + if (isa(

[llvm-branch-commits] [llvm] IR: Remove uselist for constantdata (PR #134692)

2025-04-13 Thread Nikita Popov via llvm-branch-commits
@@ -437,7 +437,8 @@ static bool LinearizeExprTree(Instruction *I, for (unsigned OpIdx = 0; OpIdx < I->getNumOperands(); ++OpIdx) { // Visit operands. Value *Op = I->getOperand(OpIdx); LLVM_DEBUG(dbgs() << "OPERAND: " << *Op << " (" << Weight << ")\n"); - a

[llvm-branch-commits] [llvm] release/20.x: [IR] Fix assertion error in User new/delete edge case (#129914) (PR #130580)

2025-04-11 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. I think this is okay to backport. We should do this properly on main, but this is probably the more conservative fix. https://github.com/llvm/llvm-project/pull/130580 ___ llvm-branch-commits mailing

[llvm-branch-commits] [llvm] [InstCombine] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-11 Thread Nikita Popov via llvm-branch-commits
@@ -3086,13 +3086,47 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { if (GEPType->isVectorTy()) return nullptr; + if (!GEP.isInBounds()) { +unsigned IdxWidth = +DL.getIndexSizeInBits(PtrOp->getType()->getPointerAddressSpac

[llvm-branch-commits] [llvm] [InstCombine] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-11 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/135155 ___ 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] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-11 Thread Nikita Popov via llvm-branch-commits
@@ -3086,13 +3086,47 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { if (GEPType->isVectorTy()) return nullptr; + if (!GEP.isInBounds()) { +unsigned IdxWidth = +DL.getIndexSizeInBits(PtrOp->getType()->getPointerAddressSpac

[llvm-branch-commits] [llvm] [InstCombine] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-11 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/135155 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-comm

[llvm-branch-commits] [llvm] release/20.x: [IndVarSimplify] Handle the case where both operands are the same when widening IV (#135207) (PR #135291)

2025-04-11 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/135291 ___ 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] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-10 Thread Nikita Popov via llvm-branch-commits
@@ -122,25 +122,23 @@ define ptr @gep_inbounds_nuwaddlike(ptr %ptr, i64 %a, i64 %b) { ret ptr %gep } -; FIXME: Preserve "inbounds nuw". define ptr @gep_inbounds_add_nuw(ptr %ptr, i64 %a, i64 %b) { ; CHECK-LABEL: define ptr @gep_inbounds_add_nuw( ; CHECK-SAME: ptr [[PTR:%

[llvm-branch-commits] [llvm] [InstCombine] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-10 Thread Nikita Popov via llvm-branch-commits
@@ -3086,13 +3086,51 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { if (GEPType->isVectorTy()) return nullptr; + if (!GEP.isInBounds()) { +unsigned IdxWidth = +DL.getIndexSizeInBits(PtrOp->getType()->getPointerAddressSpac

[llvm-branch-commits] [llvm] [InstCombine] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-10 Thread Nikita Popov via llvm-branch-commits
@@ -3086,13 +3086,51 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { if (GEPType->isVectorTy()) return nullptr; + if (!GEP.isInBounds()) { +unsigned IdxWidth = +DL.getIndexSizeInBits(PtrOp->getType()->getPointerAddressSpac

[llvm-branch-commits] [llvm] PHITransAddr: Avoid looking at constant use lists (PR #134689)

2025-04-10 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134689 ___ 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] Handle "add like" in ADD+GEP->GEP+GEP rewrites (PR #135156)

2025-04-10 Thread Nikita Popov via llvm-branch-commits
nikic wrote: See also https://github.com/llvm/llvm-project/pull/76981. https://github.com/llvm/llvm-project/pull/135156 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-

[llvm-branch-commits] [llvm] [InstCombine] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-10 Thread Nikita Popov via llvm-branch-commits
@@ -3087,12 +3087,22 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { return nullptr; if (GEP.getNumIndices() == 1) { -// We can only preserve inbounds if the original gep is inbounds, the add -// is nsw, and the add operands ar

[llvm-branch-commits] [llvm] [InstCombine] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-10 Thread Nikita Popov via llvm-branch-commits
@@ -3087,12 +3087,22 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { return nullptr; if (GEP.getNumIndices() == 1) { -// We can only preserve inbounds if the original gep is inbounds, the add -// is nsw, and the add operands ar

[llvm-branch-commits] [llvm] [InstCombine] Improve inbounds preservation for ADD+GEP -> GEP+GEP (PR #135155)

2025-04-10 Thread Nikita Popov via llvm-branch-commits
@@ -3087,12 +3087,22 @@ Instruction *InstCombinerImpl::visitGetElementPtrInst(GetElementPtrInst &GEP) { return nullptr; if (GEP.getNumIndices() == 1) { -// We can only preserve inbounds if the original gep is inbounds, the add -// is nsw, and the add operands ar

[llvm-branch-commits] [clang] [llvm] [X86] Backport new intrinsic and instruction changes in AVX10.2 (PR #133219)

2025-04-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Doesn't this break ABI by changing intrinsic / builtin numbers? https://github.com/llvm/llvm-project/pull/133219 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-b

[llvm-branch-commits] [llvm] LICM: Avoid looking at use list of constant data (PR #134690)

2025-04-07 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134690 ___ 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] LICM: Avoid looking at use list of constant data (PR #134690)

2025-04-07 Thread Nikita Popov via llvm-branch-commits
@@ -2294,10 +2294,14 @@ collectPromotionCandidates(MemorySSA *MSSA, AliasAnalysis *AA, Loop *L) { AliasSetTracker AST(BatchAA); auto IsPotentiallyPromotable = [L](const Instruction *I) { -if (const auto *SI = dyn_cast(I)) - return L->isLoopInvariant(SI->getPointe

[llvm-branch-commits] [llvm] SimplifyLibCalls: Skip sincospi optimization for ConstantData (PR #134688)

2025-04-07 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134688 ___ 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] SCEVExpander: Don't look at uses of constants (PR #134691)

2025-04-07 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/134691 ___ 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-reduce: Add new pass to inline call sites (PR #134223)

2025-04-03 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/134223 ___ 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-reduce: Add new pass to inline call sites (PR #134223)

2025-04-03 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: I'm somewhat skeptical that this really fits into llvm-reduce. Unless we make the heuristic so narrow that it's likely useless in most cases, we'll hit cases where inlining will reduce the size of the reduction. The proper way to do a reduction that involves

[llvm-branch-commits] [clang] [llvm] [llvm] Introduce callee_type operand bundle (PR #87573)

2025-03-19 Thread Nikita Popov via llvm-branch-commits
nikic wrote: I still don't think that using operand bundles for this is appropriate. If you take a look at all the other operand bundles (https://llvm.org/docs/LangRef.html#operand-bundles) they consistently have some kind of impact on the semantics of the call. Also keep in mind that the def

[llvm-branch-commits] [llvm] release/20.x: [IR] Fix assertion error in User new/delete edge case (#129914) (PR #130580)

2025-03-17 Thread Nikita Popov via llvm-branch-commits
nikic wrote: I'm not sure this is the right fix. I left a comment on the original PR: https://github.com/llvm/llvm-project/pull/129914#pullrequestreview-2691932377 https://github.com/llvm/llvm-project/pull/130580 ___ llvm-branch-commits mailing list l

[llvm-branch-commits] [llvm] release/20.x: [SCEV] Check whether the start is non-zero in `ScalarEvolution::howFarToZero` (#131522) (PR #131568)

2025-03-17 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/131568 ___ 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: [ValueTracking] Skip incoming values that are the same as the phi in `isGuaranteedNotToBeUndefOrPoison` (#130111) (PR #130474)

2025-03-15 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/130474 ___ 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] [lld] [llvm] release/20.x: [lld][WebAssembly] Support for the custom-page-sizes WebAssembly proposal (#128942) (PR #129762)

2025-03-14 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > @nikic Are you talking about the additions to the structures ? Yes, the change to WasmLimits and the rename of WasmPageSize. https://github.com/llvm/llvm-project/pull/129762 ___ llvm-branch-commits mailing list llvm-branch-commits@lists

[llvm-branch-commits] [lld] [llvm] release/20.x: [lld][WebAssembly] Support for the custom-page-sizes WebAssembly proposal (#128942) (PR #129762)

2025-03-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. This has multiple ABI and API breaking changes. I wonder why the ABI job doesn't flag this. https://github.com/llvm/llvm-project/pull/129762 ___ llvm-branch-commits mailing list llvm-bra

[llvm-branch-commits] [llvm] release/20.x: [MemCpyOpt] Fix clobber check in fca2memcpy optimization (PR #130964)

2025-03-12 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/130964 ___ 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] Enable select freeze poison folding when storing value (PR #129776)

2025-03-05 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > We can do this fold in InstSimplify: https://alive2.llvm.org/ce/z/Dm53TP The transform is only valid if the freeze(poison) is one-use. And I don't think that InstSimplify should be doing any use-based checks. So I think InstCombine is the right place for it. https://github.com/

[llvm-branch-commits] [llvm] [AArch64] Fall back to SDAG for instructions with emulated TLS variables (PR #129076)

2025-02-27 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/129076 ___ 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] [AArch64] Fall back to SDAG for instructions with emulated TLS variables (PR #129076)

2025-02-27 Thread Nikita Popov via llvm-branch-commits
nikic wrote: This needs to go into the main branch first, before it can be consider for backport (to LLVM 20 only). I'll close this PR due to the mass-subscribe. https://github.com/llvm/llvm-project/pull/129076 ___ llvm-branch-commits mailing list ll

[llvm-branch-commits] [llvm] release/20.x: Reland "[LV]: Teach LV to recursively (de)interleave." (#125094) (PR #128389)

2025-02-27 Thread Nikita Popov via llvm-branch-commits
nikic wrote: I think this is something that @fhahn as the LoopVectorize maintainer should decide. I personally still don't see why this backport is necessary. https://github.com/llvm/llvm-project/pull/128389 ___ llvm-branch-commits mailing list llvm-b

[llvm-branch-commits] [flang] release/20.x: [flang] fix AArch64 PCS for struct following pointer (#127802) (PR #128518)

2025-02-25 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. Backporting crash fixes is fine at this point, especially if they're simple and self-contained like this. https://github.com/llvm/llvm-project/pull/128518 ___ llvm-branch-commits mailing list llvm-b

[llvm-branch-commits] [llvm] release/20.x: Reland "[LV]: Teach LV to recursively (de)interleave." (#125094) (PR #128389)

2025-02-23 Thread Nikita Popov via llvm-branch-commits
nikic wrote: There is a test failure. Why is it important for this change to be part of the LLVM 20 release? https://github.com/llvm/llvm-project/pull/128389 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.or

[llvm-branch-commits] [llvm] release/20.x: [SLP] Check for PHI nodes (potentially cycles!) when checking dependencies (PR #127294)

2025-02-22 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/127294 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

  1   2   3   4   5   6   >