[llvm-branch-commits] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/116524 >From f027116e3d12422bcd2cc9a25dfd3ad09fc52196 Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Sun, 17 Nov 2024 04:38:09 +0100 Subject: [PATCH] [mlir][Transforms] Support 1:N mappings in `Conve

[llvm-branch-commits] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/116524 >From 16e58e7b9e7b60c55567c34a9212d3f32e9ef82b Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Sun, 17 Nov 2024 04:38:09 +0100 Subject: [PATCH] [mlir][Transforms] Support 1:N mappings in `Conve

[llvm-branch-commits] [mlir] [mlir][Transforms] Support 1:N mappings in `ConversionValueMapping` (PR #116524)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer created https://github.com/llvm/llvm-project/pull/116524 Draft only. Do not review. Depends on #116470. >From 0649c6ebaf1e77c7343bb261eea6091c5c5d2569 Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Sun, 17 Nov 2024 04:38:09 +0100 Subject: [PATCH]

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread via llvm-branch-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff e872b86e236dc88a5d4b46a25b3eaefa734379b9 350f01b1f08b634087baf0c63511ea39b49589db --e

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
@@ -1538,10 +1607,9 @@ void ConversionPatternRewriter::replaceOp(Operation *op, ValueRange newValues) { impl->logger.startLine() << "** Replace : '" << op->getName() << "'(" << op << ")\n"; }); - SmallVector newVals(newValues.size()); - for (auto [index, val] :

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/116470 >From 153310ac1898f017c4fbd14f7df93b2a918090f4 Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Tue, 12 Nov 2024 05:14:43 +0100 Subject: [PATCH 1/3] replace with multiple MIME-Version: 1.0 Conten

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/116470 >From 153310ac1898f017c4fbd14f7df93b2a918090f4 Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Tue, 12 Nov 2024 05:14:43 +0100 Subject: [PATCH 1/3] replace with multiple MIME-Version: 1.0 Conten

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/116470 >From 153310ac1898f017c4fbd14f7df93b2a918090f4 Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Tue, 12 Nov 2024 05:14:43 +0100 Subject: [PATCH 1/2] replace with multiple MIME-Version: 1.0 Conten

[llvm-branch-commits] [llvm] release/19.x: [SystemZ] Use the EVT version of getVectorVT() in combineTruncateExtract(). (#100150) (PR #116510)

2024-11-16 Thread Tom Stellard via llvm-branch-commits
https://github.com/tstellar milestoned https://github.com/llvm/llvm-project/pull/116510 ___ 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/19.x: [SystemZ] Use the EVT version of getVectorVT() in combineTruncateExtract(). (#100150) (PR #116510)

2024-11-16 Thread Tom Stellard via llvm-branch-commits
tstellar wrote: This fixes a crashes in Fedora 41 compiling the colm with clang. https://github.com/llvm/llvm-project/pull/116510 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/ll

[llvm-branch-commits] [flang] [Flang][NFC] Split runtime headers in preparation for cross-compilation. (PR #112188)

2024-11-16 Thread Michael Klemm via llvm-branch-commits
https://github.com/mjklemm approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/112188 ___ 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/19.x: [SystemZ] Use the EVT version of getVectorVT() in combineTruncateExtract(). (#100150) (PR #116510)

2024-11-16 Thread via llvm-branch-commits
https://github.com/llvmbot updated https://github.com/llvm/llvm-project/pull/116510 >From 4a24ff4ca001c095f30ed2e17301386b84cc30d2 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Fri, 26 Jul 2024 14:33:40 +0200 Subject: [PATCH] [SystemZ] Use the EVT version of getVectorVT() in combineTrunc

[llvm-branch-commits] [llvm] release/19.x: [SystemZ] Use the EVT version of getVectorVT() in combineTruncateExtract(). (#100150) (PR #116510)

2024-11-16 Thread via llvm-branch-commits
https://github.com/llvmbot created https://github.com/llvm/llvm-project/pull/116510 Backport 22bc9db92b46965882b1c77aebc86430149b0912 Requested by: @tstellar >From 00c9d22eaafa6258da38cafd3a636c1106d238c4 Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Fri, 26 Jul 2024 14:33:40 +0200 Subj

[llvm-branch-commits] [llvm] release/19.x: [SystemZ] Use the EVT version of getVectorVT() in combineTruncateExtract(). (#100150) (PR #116510)

2024-11-16 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-systemz Author: None (llvmbot) Changes Backport 22bc9db92b46965882b1c77aebc86430149b0912 Requested by: @tstellar --- Full diff: https://github.com/llvm/llvm-project/pull/116510.diff 2 Files Affected: - (modified) llvm/lib/Target/SystemZ/Syst

[llvm-branch-commits] [llvm] release/19.x: [SystemZ] Use the EVT version of getVectorVT() in combineTruncateExtract(). (#100150) (PR #116510)

2024-11-16 Thread via llvm-branch-commits
github-actions[bot] wrote: Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it

[llvm-branch-commits] [llvm] [CodeGen][NewPM] Port PeepholeOptimizer to NPM (PR #116326)

2024-11-16 Thread Matt Arsenault via llvm-branch-commits
https://github.com/arsenm approved this pull request. https://github.com/llvm/llvm-project/pull/116326 ___ 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] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/116470 >From 153310ac1898f017c4fbd14f7df93b2a918090f4 Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Tue, 12 Nov 2024 05:14:43 +0100 Subject: [PATCH] replace with multiple MIME-Version: 1.0 Content-Ty

[llvm-branch-commits] [clang] [llvm] [RISCV] Support __builtin_cpu_is (PR #116231)

2024-11-16 Thread Yingwei Zheng via llvm-branch-commits
@@ -22505,6 +22506,53 @@ Value *CodeGenFunction::EmitHexagonBuiltinExpr(unsigned BuiltinID, return nullptr; } +Value *CodeGenFunction::EmitRISCVCpuIs(const CallExpr *E) { + const Expr *CPUExpr = E->getArg(0)->IgnoreParenCasts(); + StringRef CPUStr = cast(CPUExpr)->getStri

[llvm-branch-commits] [mlir] [OpenMP][MLIR] Descriptor explicit member map lowering changes (PR #113556)

2024-11-16 Thread via llvm-branch-commits
https://github.com/agozillon updated https://github.com/llvm/llvm-project/pull/113556 >From 7a6a02b21b7674b152cea40f7cb2ea2377315639 Mon Sep 17 00:00:00 2001 From: agozillon Date: Fri, 4 Oct 2024 13:03:22 -0500 Subject: [PATCH] [OpenMP][MLIR] Descriptor explicit member map lowering changes Th

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Markus Böck via llvm-branch-commits
@@ -1538,10 +1607,9 @@ void ConversionPatternRewriter::replaceOp(Operation *op, ValueRange newValues) { impl->logger.startLine() << "** Replace : '" << op->getName() << "'(" << op << ")\n"; }); - SmallVector newVals(newValues.size()); - for (auto [index, val] :

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Markus Böck via llvm-branch-commits
@@ -1145,15 +1170,32 @@ LogicalResult ConversionPatternRewriterImpl::remapValues( return failure(); } +// If a type is converted to 0 types, there is nothing to do. +if (legalTypes.empty()) { + remapped.push_back({}); + continue; +} + if (

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Markus Böck via llvm-branch-commits
@@ -1376,14 +1423,36 @@ void ConversionPatternRewriterImpl::insertNTo1Materialization( legalOutputType = replacements[0].getType(); } if (legalOutputType && legalOutputType != originalType) { +UnrealizedConversionCastOp targetCastOp; Value targetMat = buildUnr

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Markus Böck via llvm-branch-commits
@@ -537,6 +537,10 @@ class ConversionPattern : public RewritePattern { ConversionPatternRewriter &rewriter) const { llvm_unreachable("unimplemented rewrite"); } + virtual void rewrite(Operation *op, ArrayRef operands, zero9178 wrot

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Markus Böck via llvm-branch-commits
@@ -1733,12 +1819,14 @@ ConversionPattern::matchAndRewrite(Operation *op, getTypeConverter()); // Remap the operands of the operation. - SmallVector operands; + SmallVector> remapped; if (failed(rewriterImpl.remapValues("oper

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Markus Böck via llvm-branch-commits
@@ -1965,19 +2053,19 @@ OperationLegalizer::legalizeWithFold(Operation *op, }); // Try to fold the operation. - SmallVector replacementValues; + SmallVector ValueRange; zero9178 wrote: ```suggestion SmallVector valueRange; ``` https://github.com/llvm

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-sparse Author: Matthias Springer (matthias-springer) Changes This commit adds a new `matchAndRewrite` overload to `ConversionPattern` to support 1:N replacements. This is the first of two main PRs that merge the 1:1 and 1:N dialect conversion driv

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116470 ___ 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] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-mlir-core Author: Matthias Springer (matthias-springer) Changes This commit adds a new `matchAndRewrite` overload to `ConversionPattern` to support 1:N replacements. This is the first of two main PRs that merge the 1:1 and 1:N dialect conversion driver

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer ready_for_review https://github.com/llvm/llvm-project/pull/116470 ___ 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] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116470 ___ 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] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/116470 >From fe38d4bc65947e7d33854f40927bfdde7aa5186b Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Tue, 12 Nov 2024 05:14:43 +0100 Subject: [PATCH] replace with multiple MIME-Version: 1.0 Content-Ty

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116470 ___ 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] [RISCV] Support __builtin_cpu_is (PR #116231)

2024-11-16 Thread Yingwei Zheng via llvm-branch-commits
@@ -22505,6 +22506,53 @@ Value *CodeGenFunction::EmitHexagonBuiltinExpr(unsigned BuiltinID, return nullptr; } +Value *CodeGenFunction::EmitRISCVCpuIs(const CallExpr *E) { + const Expr *CPUExpr = E->getArg(0)->IgnoreParenCasts(); + StringRef CPUStr = cast(CPUExpr)->getStri

[llvm-branch-commits] [clang] [llvm] [RISCV] Support __builtin_cpu_is (PR #116231)

2024-11-16 Thread Yingwei Zheng via llvm-branch-commits
@@ -22505,6 +22506,53 @@ Value *CodeGenFunction::EmitHexagonBuiltinExpr(unsigned BuiltinID, return nullptr; } +Value *CodeGenFunction::EmitRISCVCpuIs(const CallExpr *E) { + const Expr *CPUExpr = E->getArg(0)->IgnoreParenCasts(); + StringRef CPUStr = cast(CPUExpr)->getStri

[llvm-branch-commits] [clang] [llvm] [RISCV] Support __builtin_cpu_is (PR #116231)

2024-11-16 Thread Yingwei Zheng via llvm-branch-commits
@@ -22505,6 +22506,53 @@ Value *CodeGenFunction::EmitHexagonBuiltinExpr(unsigned BuiltinID, return nullptr; } +Value *CodeGenFunction::EmitRISCVCpuIs(const CallExpr *E) { + const Expr *CPUExpr = E->getArg(0)->IgnoreParenCasts(); + StringRef CPUStr = cast(CPUExpr)->getStri

[llvm-branch-commits] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116470 ___ 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] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer edited https://github.com/llvm/llvm-project/pull/116470 ___ 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] [mlir] [mlir][Transforms] Add 1:N `matchAndRewrite` overload (PR #116470)

2024-11-16 Thread Matthias Springer via llvm-branch-commits
https://github.com/matthias-springer updated https://github.com/llvm/llvm-project/pull/116470 >From de3b79feaab0318b794bac7f85503545682eef7d Mon Sep 17 00:00:00 2001 From: Matthias Springer Date: Tue, 12 Nov 2024 05:14:43 +0100 Subject: [PATCH] replace with multiple MIME-Version: 1.0 Content-Ty

[llvm-branch-commits] [llvm] [CodeGen][NewPM] Port PeepholeOptimizer to NPM (PR #116326)

2024-11-16 Thread via llvm-branch-commits
llvmbot wrote: @llvm/pr-subscribers-backend-aarch64 Author: Akshat Oke (optimisan) Changes With this, all machine SSA optimization passes are available in the new codegen pipeline. --- Full diff: https://github.com/llvm/llvm-project/pull/116326.diff 16 Files Affected: - (modified) llv