[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-03-02 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor updated https://github.com/llvm/llvm-project/pull/129293 >From bb41af68d0d0f66c5610c69d6deb8a615d644fe5 Mon Sep 17 00:00:00 2001 From: Andy Kaylor Date: Fri, 28 Feb 2025 10:54:09 -0800 Subject: [PATCH 1/3] [CIR] Replace CIRAttrVisitor with TypeSwitch We previously

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-03-01 Thread Erich Keane via cfe-commits
https://github.com/erichkeane approved this pull request. https://github.com/llvm/llvm-project/pull/129293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -37,63 +37,78 @@ using namespace llvm; namespace cir { namespace direct { -class CIRAttrToValue : public CirAttrVisitor { +class CIRAttrToValue { public: CIRAttrToValue(mlir::Operation *parentOp, mlir::ConversionPatternRewriter &rewriter,

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor closed https://github.com/llvm/llvm-project/pull/129293 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
@@ -37,63 +37,78 @@ using namespace llvm; namespace cir { namespace direct { -class CIRAttrToValue : public CirAttrVisitor { +class CIRAttrToValue { public: CIRAttrToValue(mlir::Operation *parentOp, mlir::ConversionPatternRewriter &rewriter,

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: Andy Kaylor (andykaylor) Changes The previously upstreamed lowering from ClangIR to LLVM IR diverged from the incubator implementation, but when the incubator was updated to incorporate these changes some issues arose which require the up

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Erich Keane via cfe-commits
@@ -218,12 +221,31 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( SmallVector attributes; if (init.has_value()) { -GlobalInitAttrRewriter initRewriter(llvmType, rewriter); -init = initRewriter.rewriteInitAttr(init.value()); -// If initRewri

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread Andy Kaylor via cfe-commits
https://github.com/andykaylor created https://github.com/llvm/llvm-project/pull/129293 The previously upstreamed lowering from ClangIR to LLVM IR diverged from the incubator implementation, but when the incubator was updated to incorporate these changes some issues arose which require the upst

[clang] [CIR] Realign CIR-to-LLVM IR lowering code with incubator (PR #129293)

2025-02-28 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clangir Author: Andy Kaylor (andykaylor) Changes The previously upstreamed lowering from ClangIR to LLVM IR diverged from the incubator implementation, but when the incubator was updated to incorporate these changes some issues arose which require the