[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-09 Thread Nikita Popov via cfe-commits
nikic wrote: @ritter-x2a Nice find! I guess this code is the culprit: https://github.com/llvm/llvm-project/blob/db8cad0c8d00a691d1365e9b2962a7f2f4ff0890/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp#L404 It seems to treat ConstOffset as an unsigned number, while it is actually signed. https:

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-09-09 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,531 @@ +//===- ABI/Types.h --*- 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

[clang] [flang] [llvm] Introduce -fexperimental-loop-fuse to clang and flang (PR #142686)

2025-09-09 Thread Nikita Popov via cfe-commits
https://github.com/nikic commented: I'm fine with this as well. For the future though, I think we can save a lot of time by exposing experimental passes via `-mllvm -enable-loop-fusion`. That is still easy for users to experiment with, while being less intrusive. https://github.com/llvm/llvm-

[clang] [llvm] MC: Use Triple form of lookupTarget in more places (PR #157591)

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

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-09 Thread Nikita Popov via cfe-commits
@@ -3680,6 +3681,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) { Results.push_back(Tmp1); break; } + case ISD::STACKADDRESS: case ISD::STACKSAVE: // Expand to CopyFromReg if the target set // StackPointerRegisterToSaveRestore.

[clang] [llvm] [IndVarSimplify] Sink unused l-invariant loads in preheader. (PR #157559)

2025-09-09 Thread Nikita Popov via cfe-commits
https://github.com/nikic requested changes to this pull request. I don't think IndVarSimplify is a good place to perform this transform. We could probably do this in LICM, which has access to MemorySSA. (LICM already sinks instructions from the loop to the exits, so doing it fore the preheader

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-08 Thread Nikita Popov via cfe-commits
nikic wrote: > Given this is in the `preopt` IR, the change would occur in an even earlier > stage, right? I'll see if I can get some IR out of whatever stage that may be. Yes, you're currently dumping the pre-LTO IR, but we'd want the full optimized one produced by the compiler. (Should be po

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-04 Thread Nikita Popov via cfe-commits
nikic wrote: Ah yes, good point. That means the issue was already introduced at an earlier point in the middle-end pipeline, not during codegen. https://github.com/llvm/llvm-project/pull/155415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-09-04 Thread Nikita Popov via cfe-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/140112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-04 Thread Nikita Popov via cfe-commits
nikic wrote: I looked at the diff between those two, and all the changes look correct to me. The only real difference is related to __cxa_thread_finalize, which is probably just a difference in baselines (it was added yesterday). https://github.com/llvm/llvm-project/pull/155415 ___

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-03 Thread Nikita Popov via cfe-commits
nikic wrote: GVN doesn't seem to do anything particularly interesting there. I tried running this through llc to see how the codegen changes, but that gives: > LLVM ERROR: Cannot select: intrinsic %llvm.amdgcn.if Does this need extra llc flags beyond the triple? https://github.com/llvm/llvm-p

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-03 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/155415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-03 Thread Nikita Popov via cfe-commits
@@ -2720,6 +2721,30 @@ static SDValue LowerVAARG(SDValue Op, SelectionDAG &DAG) { Align(std::min(PtrVT.getFixedSizeInBits(), VT.getFixedSizeInBits()) / 8)); } +static SDValue LowerSTACKADDRESS(SDValue Op, SelectionDAG &DAG, + const Sparc

[clang] [Sema] Diagnose use of if/else-if condition variable inside else-if/else branch(s) (PR #156436)

2025-09-02 Thread Nikita Popov via cfe-commits
nikic wrote: > CC @nikic could you put this on llvm-compile-time-tracker so we know what the > overhead of this is if any? Not seeing an impact when applying this patch -- but that's probably expected as the warning is not enabled by default? I'd probably additional changes to enable it. htt

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-02 Thread Nikita Popov via cfe-commits
nikic wrote: @jplehr I don't have an AMDGPU environment to debug this. Is it possible to reduce this further? https://github.com/llvm/llvm-project/pull/155415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-09-02 Thread Nikita Popov via cfe-commits
nikic wrote: Not sure whether it's going to be sufficient, but the original IR dump would be a good starting point at least. https://github.com/llvm/llvm-project/pull/155415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-02 Thread Nikita Popov via cfe-commits
nikic wrote: > > You'd probably want to define STACKADDRESS with a default expansion to > > STACKSAVE, plus custom legalization on SPARC. There should be no direct > > triple checks. > > Thx for the pointer @nikic , does this revision address your comment properly? Yes, thank you. https://gi

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-02 Thread Nikita Popov via cfe-commits
@@ -956,6 +956,10 @@ void TargetLoweringBase::initActions() { // This one by default will call __clear_cache unless the target // wants something different. setOperationAction(ISD::CLEAR_CACHE, MVT::Other, LibCall); + + // By default, STACKADDRESS nodes are expanded to S

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-02 Thread Nikita Popov via cfe-commits
@@ -2720,6 +2721,30 @@ static SDValue LowerVAARG(SDValue Op, SelectionDAG &DAG) { Align(std::min(PtrVT.getFixedSizeInBits(), VT.getFixedSizeInBits()) / 8)); } +static SDValue LowerSTACKADDRESS(SDValue Op, SelectionDAG &DAG, + const Sparc

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-02 Thread Nikita Popov via cfe-commits
@@ -3680,6 +3681,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) { Results.push_back(Tmp1); break; } + case ISD::STACKADDRESS: case ISD::STACKSAVE: // Expand to CopyFromReg if the target set // StackPointerRegisterToSaveRestore.

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-02 Thread Nikita Popov via cfe-commits
@@ -14389,6 +14389,34 @@ Semantics: Note this intrinsic is only verified on AArch64 and ARM. +'``llvm.stackaddress``' Intrinsic +^ + +Syntax: +""" + +:: + + declare ptr @llvm.stackaddress() + +Overview: +" + +The '``llvm.stacka

[clang] [llvm] [Clang] Add `__builtin_stack_address` (PR #148281)

2025-09-02 Thread Nikita Popov via cfe-commits
@@ -14389,6 +14389,34 @@ Semantics: Note this intrinsic is only verified on AArch64 and ARM. +'``llvm.stackaddress``' Intrinsic +^ + +Syntax: +""" + +:: + + declare ptr @llvm.stackaddress() nikic wrote: ```suggestion

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-09-01 Thread Nikita Popov via cfe-commits
nikic wrote: Fixed by https://github.com/llvm/llvm-project/commit/c128b8c46f2a3b750c9abcba1e303f92d6531e5f. https://github.com/llvm/llvm-project/pull/142150 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman

[clang-tools-extra] c128b8c - [clang-reorder-fields] Fix unused private field warning (NFC)

2025-09-01 Thread Nikita Popov via cfe-commits
Author: Nikita Popov Date: 2025-09-01T10:07:11+02:00 New Revision: c128b8c46f2a3b750c9abcba1e303f92d6531e5f URL: https://github.com/llvm/llvm-project/commit/c128b8c46f2a3b750c9abcba1e303f92d6531e5f DIFF: https://github.com/llvm/llvm-project/commit/c128b8c46f2a3b750c9abcba1e303f92d6531e5f.diff

[clang-tools-extra] [clang-reorder-fields] Support designated initializers (PR #142150)

2025-09-01 Thread Nikita Popov via cfe-commits
nikic wrote: ``` Building CXX object tools/clang/tools/extra/clang-reorder-fields/CMakeFiles/obj.clangReorderFields.dir/Designator.cpp.o FAILED: tools/clang/tools/extra/clang-reorder-fields/CMakeFiles/obj.clangReorderFields.dir/Designator.cpp.o sccache /opt/llvm/bin/clang++ -DGTEST_HAS_RTTI=0

[clang] [llvm] [UBSan] make ubsantrap `inaccessiblemem: write` (PR #156100)

2025-08-30 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. LGTM, assuming the intended usage model for these does not include introspection of memory at the time of trap. https://github.com/llvm/llvm-project/pull/156100 ___ cfe-commits mailing list cfe-comm

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,1493 @@ +//===- X86.cpp ===// +// +// 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: A

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-08-28 Thread Nikita Popov via cfe-commits
nikic wrote: > > The main issue I saw is that we now sometimes fail to eliminate null checks > > of the form `gep inbounds (p, x-1) == null`, which are converted to `gep > > (gep p, x), -1` now, losing flags. > > I checked whether we can mitigate this by folding null checks before doing > thi

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,560 @@ +//== QualTypeMapper.cpp - Maps Clang QualType to LLVMABI Types -==// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,556 @@ +//== QualTypeMapper.cpp - Maps Clang QualType to LLVMABI Types -==// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,1493 @@ +//===- X86.cpp ===// +// +// 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: A

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,1493 @@ +//===- X86.cpp ===// +// +// 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: A

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,1493 @@ +//===- X86.cpp ===// +// +// 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: A

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,76 @@ +//=== ABITypeMapper.h - Maps LLVM ABI Types to LLVM IR Types ===// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,76 @@ +//=== ABITypeMapper.h - Maps LLVM ABI Types to LLVM IR Types ===// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,76 @@ +//=== ABITypeMapper.h - Maps LLVM ABI Types to LLVM IR Types ===// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,76 @@ +//=== ABITypeMapper.h - Maps LLVM ABI Types to LLVM IR Types ===// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,76 @@ +//=== ABITypeMapper.h - Maps LLVM ABI Types to LLVM IR Types ===// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,244 @@ +//=== ABITypeMapper.cpp - Maps LLVM ABI Types to LLVM IR Types --===// +// +// 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: Apach

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,76 @@ +//=== ABITypeMapper.h - Maps LLVM ABI Types to LLVM IR Types ===// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,76 @@ +//=== ABITypeMapper.h - Maps LLVM ABI Types to LLVM IR Types ===// +// +// 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
nikic wrote: Missing license header. https://github.com/llvm/llvm-project/pull/140112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
nikic wrote: Missing license header. https://github.com/llvm/llvm-project/pull/140112 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-28 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,543 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] Remove some "DeprecatedSmallSet is deprecated" warnings from the build (PR #155407)

2025-08-27 Thread Nikita Popov via cfe-commits
nikic wrote: https://github.com/llvm/llvm-project/pull/155622 https://github.com/llvm/llvm-project/pull/155407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Remove some "DeprecatedSmallSet is deprecated" warnings from the build (PR #155407)

2025-08-27 Thread Nikita Popov via cfe-commits
nikic wrote: I think it's probably best to revert this change. https://github.com/llvm/llvm-project/pull/155407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] Remove some "DeprecatedSmallSet is deprecated" warnings from the build (PR #155407)

2025-08-27 Thread Nikita Popov via cfe-commits
nikic wrote: Which compiler are you using? https://github.com/llvm/llvm-project/pull/155407 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [InstCombine] Strip leading zero indices from GEP (PR #155415)

2025-08-26 Thread Nikita Popov via cfe-commits
nikic wrote: @zyw-bot csmith-fuzz https://github.com/llvm/llvm-project/pull/155415 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Disable loop interchange by default (PR #155279)

2025-08-26 Thread Nikita Popov via cfe-commits
nikic wrote: /cherry-pick 8849750e998819903dc749411bc9a7cd508a5e8a https://github.com/llvm/llvm-project/pull/155279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Disable loop interchange by default (PR #155279)

2025-08-26 Thread Nikita Popov via cfe-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/155279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] Disable loop interchange by default (PR #155279)

2025-08-26 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/155279 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-08-25 Thread Nikita Popov via cfe-commits
nikic wrote: As this is time critical (needs to land prior to the LLVM 21 release tomorrow) I've submitted a PR myself: https://github.com/llvm/llvm-project/pull/155279 https://github.com/llvm/llvm-project/pull/140182 ___ cfe-commits mailing list cfe-

[clang] [flang] [flang] Disable loop interchange by default (PR #155279)

2025-08-25 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/155279 Disable loop interchange by default, while keeping the ability to explicitly enable using `-floop-interchange`. This matches Clang. See discussion on https://github.com/llvm/llvm-project/pull/140182. >From 94006

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-08-25 Thread Nikita Popov via cfe-commits
nikic wrote: @sjoerdmeijer Let me address two points separately. The first is the original submission of this PR. There was an existing PR to enable loop interchange in https://github.com/llvm/llvm-project/pull/124911, and discussion for this enablement was consolidated there. I can see no ev

[clang] [flang] [flang] add -floop-interchange and enable it with opt levels (PR #140182)

2025-08-22 Thread Nikita Popov via cfe-commits
nikic wrote: To be honest, I am very surprised that this PR was submitted, let alone landed. We have **explicitly not approved** enabling LoopInterchange by default in LLVM due to outstanding issues. So instead you go ahead and enable it directly in Flang instead, without even notifying any of

[clang] [llvm] Reland "[Utils] Add new --update-tests flag to llvm-lit" (PR #153821)

2025-08-19 Thread Nikita Popov via cfe-commits
nikic wrote: It looks like this also ends up regenerating XFAIL tests, which is not desirable. https://github.com/llvm/llvm-project/pull/153821 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-18 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,1408 @@ +//===- X86.cpp ===// +// +// 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: A

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-18 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,603 @@ +//== QualTypeMapper.cpp - Maps Clang QualType to LLVMABI Types -==// +// +// 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

[clang] [Clang] Rename HasLegalHalfType -> HasFastHalfType (NFC) (PR #153163)

2025-08-18 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/153163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WIP] ABI Lowering Library (PR #140112)

2025-08-17 Thread Nikita Popov via cfe-commits
@@ -0,0 +1,538 @@ +//===- ABI/Types.h --*- 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

[clang] [llvm] Reland "[Utils] Add new --update-tests flag to llvm-lit" (PR #153821)

2025-08-15 Thread Nikita Popov via cfe-commits
nikic wrote: > It also adds support for auto-fixing tests failing based on the diff command. This seems like an independent feature -- do it as a followup? https://github.com/llvm/llvm-project/pull/153821 ___ cfe-commits mailing list cfe-commits@lists

[clang] [clang-tools-extra] [flang] [lld] [llvm] [LLVM][utils] Add script which clears release notes (PR #153593)

2025-08-15 Thread Nikita Popov via cfe-commits
nikic wrote: Yes, I think this PR is valuable by itself and we can build any further changes on top of it. https://github.com/llvm/llvm-project/pull/153593 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [clang-tools-extra] [flang] [lld] [llvm] [LLVM][utils] Add script which clears release notes (PR #153593)

2025-08-15 Thread Nikita Popov via cfe-commits
nikic wrote: @tru In that case it might make sense to switch to the libcxx model where all the release notes are versioned (see https://github.com/llvm/llvm-project/tree/main/libcxx/docs/ReleaseNotes) and then just the latest one included on the unversioned page? https://github.com/llvm/llvm

[clang] Revert "[Headers][X86] Allow SSE/AVX/AVX512 unpck intrinsics to be used in constexpr" (PR #153491)

2025-08-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic auto_merge_disabled https://github.com/llvm/llvm-project/pull/153491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Headers][X86] Allow SSE/AVX/AVX512 unpck intrinsics to be used in constexpr" (PR #153491)

2025-08-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/153491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Headers][X86] Allow SSE/AVX/AVX512 unpck intrinsics to be used in constexpr" (PR #153491)

2025-08-13 Thread Nikita Popov via cfe-commits
nikic wrote: Yes, if you completely break the build, please fix it ASAP, either by reverting or directly pushing a fix. https://github.com/llvm/llvm-project/pull/153491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi

[clang] Revert "[Headers][X86] Allow SSE/AVX/AVX512 unpck intrinsics to be used in constexpr" (PR #153491)

2025-08-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic auto_merge_enabled https://github.com/llvm/llvm-project/pull/153491 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Revert "[Headers][X86] Allow SSE/AVX/AVX512 unpck intrinsics to be used in constexpr" (PR #153491)

2025-08-13 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/153491 Reverts llvm/llvm-project#153102 because it introduces a test failure. >From d5069f8aaefd251fdc101440b72013d9b5280f21 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Wed, 13 Aug 2025 22:34:47 +0200 Subject: [PA

[clang] [llvm] [AVR] Only specify one legal int string in data layout (PR #153010)

2025-08-11 Thread Nikita Popov via cfe-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/153010 There should not be both `n8` and `n16:8`. This is a single list of legal integers. Additionally, this should use the standard order in increasing size `n8:16`. >From 17d75aaec45a1feefa3f96289fd115c1200bb5fd Mon

[clang] [llvm] [PowerPC] fix bug affecting float to int32 conversion on LE PowerPC (PR #150194)

2025-08-08 Thread Nikita Popov via cfe-commits
nikic wrote: > Found another related bug: soft float ABI selection was not taking effect on > little-endian powerPC with embedded vectors (e.g. e500v2) leading to errors. > (embedded vectors use "extended" GPRs to store floating-point values, and > this caused issues with variadic arguments as

[clang] [llvm] [KeyInstr] Remove LLVM_EXPERIMENTAL_KEY_INSTRUCTIONS CMake flag (PR #152735)

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

[clang] [Clang][CodeGen] Move `EmitPointerArithmetic` into `CodeGenFunction`. NFC. (PR #152634)

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

[clang] [flang] [llvm] [IR] Remove size argument from lifetime intrinsics (PR #150248)

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

[clang] [Clang][CodeGen] Move `EmitPointerArithmetic` into `CodeGenFunction`. NFC. (PR #152634)

2025-08-08 Thread Nikita Popov via cfe-commits
@@ -4227,79 +4234,77 @@ static Value *emitPointerArithmetic(CodeGenFunction &CGF, // // Note that we do not suppress the pointer overflow check in this case. if (BinaryOperator::isNullPointerArithmeticExtension( - CGF.getContext(), op.Opcode, expr->getLHS(), exp

[clang] [llvm] [InferAlignment] Propagate alignment between loads/stores of the same base pointer (PR #145733)

2025-08-07 Thread Nikita Popov via cfe-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/145733 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [flang] [llvm] [IR] Remove size argument from lifetime intrinsics (PR #150248)

2025-08-07 Thread Nikita Popov via cfe-commits
nikic wrote: I think this is now ready for review if you ignore the first commit (which is https://github.com/llvm/llvm-project/pull/152154). https://github.com/llvm/llvm-project/pull/150248 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http

[clang] [llvm] [InferAlignment] Propagate alignment between loads/stores of the same base pointer (PR #145733)

2025-08-06 Thread Nikita Popov via cfe-commits
nikic wrote: > Is there any merit to keeping the abs for readability, so future maintainers > don't need to reason through this? Maybe just a comment? I think it's ok to drop as long as there's test coverage, but no strong opinion either way. https://github.com/llvm/llvm-project/pull/145733 _

[clang] [llvm] [InferAlignment] Propagate alignment between loads/stores of the same base pointer (PR #145733)

2025-08-06 Thread Nikita Popov via cfe-commits
nikic wrote: Are you sure the abs is needed? It looks like your tests also passed before that change. I think this ends up being correct because an offset like -8 is something like ...1000 in binary, which has the same effect for the common alignment as using ...1000. https://github.c

  1   2   3   4   5   6   7   8   9   10   >