[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper closed https://github.com/llvm/llvm-project/pull/136426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/136426 >From 91a6937c7b937daceef426c877703d4d0cfeae76 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 19 Apr 2025 14:22:45 +0200 Subject: [PATCH 1/4] [CIR] Upstream StackSave and StackRestoreOp --- clang/

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/136426 >From 91a6937c7b937daceef426c877703d4d0cfeae76 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 19 Apr 2025 14:22:45 +0200 Subject: [PATCH 1/4] [CIR] Upstream StackSave and StackRestoreOp --- clang/

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Andy Kaylor via cfe-commits
@@ -1419,6 +1419,50 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor edited https://github.com/llvm/llvm-project/pull/136426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Andy Kaylor via cfe-commits
@@ -0,0 +1,19 @@ +// RUN: cir-opt %s -cir-to-llvm -o - | FileCheck %s -check-prefix=MLIR andykaylor wrote: Can you also add a RUN line to lower this to LLVM IR? https://github.com/llvm/llvm-project/pull/136426 ___ cfe-

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Andy Kaylor via cfe-commits
@@ -1419,6 +1419,50 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Andy Kaylor via cfe-commits
@@ -1419,6 +1419,50 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp andykaylor wrote: ```suggestion // StackSaveOp & St

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Andy Kaylor via cfe-commits
@@ -1419,6 +1419,50 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor approved this pull request. Looks good, with a couple of minor requests. https://github.com/llvm/llvm-project/pull/136426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listi

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/136426 >From 91a6937c7b937daceef426c877703d4d0cfeae76 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 19 Apr 2025 14:22:45 +0200 Subject: [PATCH 1/3] [CIR] Upstream StackSave and StackRestoreOp --- clang/

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. The PR looks good overall, it adds the operation, tests for parsing/printing + LLVM lowering, leaving CIRGen to support to be done incrementally. LGTM once the operation names are used consistently. https://github.com/llvm/llvm-proje

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1419,6 +1419,48 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Henrich Lauko via cfe-commits
@@ -1419,6 +1419,50 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Henrich Lauko via cfe-commits
@@ -1419,6 +1419,50 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/136426 >From 91a6937c7b937daceef426c877703d4d0cfeae76 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 19 Apr 2025 14:22:45 +0200 Subject: [PATCH 1/2] [CIR] Upstream StackSave and StackRestoreOp --- clang/

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Henrich Lauko via cfe-commits
@@ -1419,6 +1419,48 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper edited https://github.com/llvm/llvm-project/pull/136426 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Amr Hesham via cfe-commits
@@ -1419,6 +1419,48 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Amr Hesham via cfe-commits
@@ -1419,6 +1419,48 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Henrich Lauko via cfe-commits
@@ -242,6 +242,26 @@ class CIRToLLVMPtrStrideOpLowering matchAndRewrite(cir::PtrStrideOp op, OpAdaptor, mlir::ConversionPatternRewriter &) const override; }; + +class CIRToLLVMStackSaveOpLowering +: public mlir::OpConversionPattern { +public: + using ml

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Henrich Lauko via cfe-commits
@@ -1419,6 +1419,48 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Henrich Lauko via cfe-commits
@@ -1419,6 +1419,48 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Henrich Lauko via cfe-commits
@@ -1419,6 +1419,48 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { }]>]; } +//===--===// +// StackSave & StackRestoreOp +//===---

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-21 Thread Henrich Lauko via cfe-commits
@@ -1512,6 +1514,22 @@ mlir::LogicalResult CIRToLLVMTrapOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMStackSaveOpLowering::matchAndRewrite( +cir::StackSaveOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) co

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Amr Hesham (AmrDeveloper) Changes This change adds support for StackSave and StackRestoreOp as a preliminary patch of VLA support --- Full diff: https://github.com/llvm/llvm-project/pull/136426.diff 5 Files Affected: - (modified) cla

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-19 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Amr Hesham (AmrDeveloper) Changes This change adds support for StackSave and StackRestoreOp as a preliminary patch of VLA support --- Full diff: https://github.com/llvm/llvm-project/pull/136426.diff 5 Files Affected: - (modified) clang

[clang] [CIR] Upstream StackSave and StackRestoreOp (PR #136426)

2025-04-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/136426 This change adds support for StackSave and StackRestoreOp as a preliminary patch of VLA support >From 91a6937c7b937daceef426c877703d4d0cfeae76 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 19 Apr