[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

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

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/156092 >From 5ec1b3bd422be52857c10fc16d9f1dc7268a18c8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 29 Aug 2025 21:58:35 +0200 Subject: [PATCH 1/2] [CIR] Implement VAArgExpr for ComplexType --- clang/li

[clang] [CIR] Implement VAArgExpr for ComplexType (PR #156092)

2025-08-29 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/156092 This change adds support VAArgExpr for ComplexExpr Issue: https://github.com/llvm/llvm-project/issues/141365 >From 5ec1b3bd422be52857c10fc16d9f1dc7268a18c8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-29 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/154994 >From f8c9593d519edadfe46a796333f1a590a6f0cdd4 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 22 Aug 2025 15:34:47 +0200 Subject: [PATCH 1/5] [CIR] Upstream Re-Throw with no return --- .../CIR/Dia

[clang] [CIR] DivOp & CompoundAssignmentDiv between ComplexType and ScalarType (PR #155167)

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

[clang] [CIR] Complex Unary plus and minus with promoted type (PR #155486)

2025-08-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/155486 >From c97287958e5db1a598423b37ac63a940277f1988 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Tue, 26 Aug 2025 21:34:52 +0200 Subject: [PATCH 1/2] [CIR] Complex Unary plus and minus with promoted type -

[clang] [CIR] Complex Unary plus and minus with promoted type (PR #155486)

2025-08-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/155486 This change adds support for Complex unary plus and minus expressions with promoted type Issue: https://github.com/llvm/llvm-project/issues/141365 >From c97287958e5db1a598423b37ac63a940277f1988 Mon Sep 17

[clang] [CIR] Add support for initializing classes with multiple vtables (PR #155275)

2025-08-25 Thread Amr Hesham via cfe-commits
@@ -264,6 +289,37 @@ void CIRGenFunction::emitCtorPrologue(const CXXConstructorDecl *cd, } } +static Address applyNonVirtualAndVirtualOffset( +mlir::Location loc, CIRGenFunction &cgf, Address addr, +CharUnits nonVirtualOffset, mlir::Value virtualOffset, +const C

[clang] [CIR] Add support for initializing classes with multiple vtables (PR #155275)

2025-08-25 Thread Amr Hesham via cfe-commits
@@ -126,6 +127,32 @@ static bool isInitializerOfDynamicClass(const CXXCtorInitializer *baseInit) { return baseClassDecl->isDynamicClass(); } +namespace { +/// A visitor which checks whether an initializer uses 'this' in a +/// way which requires the vtable to be properly se

[clang] [CIR] Add support for initializing classes with multiple vtables (PR #155275)

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

[clang] [CIR] Add support for initializing classes with multiple vtables (PR #155275)

2025-08-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. LGMT, just nits https://github.com/llvm/llvm-project/pull/155275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] DivOp & CompoundAssignmentDiv between ComplexType and ScalarType (PR #155167)

2025-08-24 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/155167 This change adds support for DivOp and CompoundAssignmentDiv between ComplexType and ScalarType Issue: https://github.com/llvm/llvm-project/issues/141365 >From 654e3bba22ce007bdb1e30e46ee898af6ec5e57f Mon

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/154994 >From 0a0c6291aa24acbc4a758b141e0b1e56676d99fd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 22 Aug 2025 15:34:47 +0200 Subject: [PATCH 1/4] [CIR] Upstream Re-Throw with no return --- .../CIR/Dia

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-23 Thread Amr Hesham via cfe-commits
@@ -3800,4 +3800,58 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/154994 >From 0a0c6291aa24acbc4a758b141e0b1e56676d99fd Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 22 Aug 2025 15:34:47 +0200 Subject: [PATCH 1/3] [CIR] Upstream Re-Throw with no return --- .../CIR/Dia

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-23 Thread Amr Hesham via cfe-commits
@@ -405,17 +405,37 @@ void LoweringPreparePass::lowerArrayCtor(cir::ArrayCtor op) { true); } +void LoweringPreparePass::lowerThrowOp(ThrowOp op) { AmrDeveloper wrote: I moved it, it was confusing that rethrow is in LP but throw i

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-23 Thread Amr Hesham via cfe-commits
@@ -289,6 +291,52 @@ void CIRGenItaniumCXXABI::emitDestructorCall( vttTy, nullptr); } +// The idea here is creating a separate block for the throw with an +// `UnreachableOp` as the terminator. So, we branch from the current block +// to the throw b

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-23 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/154994 >From 373d3c49c631955c9e4b50f7e9b9666fdb2faef4 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 22 Aug 2025 15:34:47 +0200 Subject: [PATCH 1/3] [CIR] Upstream Re-Throw with no return --- .../CIR/Dia

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

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

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-22 Thread Amr Hesham via cfe-commits
@@ -3013,6 +3013,47 @@ def CIR_ComplexMulOp : CIR_Op<"complex.mul", [ }]; } +def CIR_ComplexDivOp : CIR_Op<"complex.div", [ + Pure, SameOperandsAndResultType +]> { + let summary = "Complex division"; + let description = [{ +The `cir.complex.div` operation takes two co

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/153796 >From 6613d4c0d735461a0b5ef04da544f6ddf3f38541 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 13 Aug 2025 20:22:38 +0200 Subject: [PATCH 1/6] [CIR] Upstream DivOp for ComplexType --- clang/include

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-22 Thread Amr Hesham via cfe-commits
@@ -3013,6 +3013,47 @@ def CIR_ComplexMulOp : CIR_Op<"complex.mul", [ }]; } +def CIR_ComplexDivOp : CIR_Op<"complex.div", [ + Pure, SameOperandsAndResultType +]> { + let summary = "Complex division"; + let description = [{ +The `cir.complex.div` operation takes two co

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/154994 >From ee45be1718bf21b394a8bb0893efff1a3416853c Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 22 Aug 2025 15:34:47 +0200 Subject: [PATCH 1/2] [CIR] Upstream Re-Throw with no return --- .../CIR/Dia

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-22 Thread Amr Hesham via cfe-commits
@@ -3013,6 +3013,47 @@ def CIR_ComplexMulOp : CIR_Op<"complex.mul", [ }]; } +def CIR_ComplexDivOp : CIR_Op<"complex.div", [ + Pure, SameOperandsAndResultType +]> { + let summary = "Complex division"; + let description = [{ +The `cir.complex.div` operation takes two co

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/153796 >From 6613d4c0d735461a0b5ef04da544f6ddf3f38541 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 13 Aug 2025 20:22:38 +0200 Subject: [PATCH 1/5] [CIR] Upstream DivOp for ComplexType --- clang/include

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-22 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: - For the verification tests, I will add it in the emitThrow PR https://github.com/llvm/llvm-project/pull/154994 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-22 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/154994 This change adds support for the throw op without sub expression and with noreturn Issue #154992 >From ee45be1718bf21b394a8bb0893efff1a3416853c Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 22

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-21 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/153796 >From 6613d4c0d735461a0b5ef04da544f6ddf3f38541 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 13 Aug 2025 20:22:38 +0200 Subject: [PATCH 1/4] [CIR] Upstream DivOp for ComplexType --- clang/include

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

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

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-21 Thread Amr Hesham via cfe-commits
@@ -110,9 +110,10 @@ class CIRGenConsumer : public clang::ASTConsumer { if (!FEOptions.ClangIRDisablePasses) { // Setup and run CIR pipeline. + bool EnableLoweringPrepare = Action != CIRGenAction::OutputType::EmitCIR; AmrDeveloper wrote: > It s

[clang] [CIR] Implement MemberExpr with VarDecl for ComplexType (PR #154307)

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

[clang] [CIR] Implement MemberExpr with VarDecl for ComplexType (PR #154307)

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

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-19 Thread Amr Hesham via cfe-commits
@@ -110,9 +110,10 @@ class CIRGenConsumer : public clang::ASTConsumer { if (!FEOptions.ClangIRDisablePasses) { // Setup and run CIR pipeline. + bool EnableLoweringPrepare = Action != CIRGenAction::OutputType::EmitCIR; AmrDeveloper wrote: I upda

[clang] [CIR] Implement MemberExpr with VarDecl for COmplexType (PR #154307)

2025-08-19 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/154307 This change adds support for MemberExpr with VarDecl ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365 >From dd84b6ff8ec1d695887ffe4168f5dd59ff9dbce2 Mon Sep 17 00:00:00 2001 From: AmrD

[clang] [CIR] Implement MemberExpr support for ComplexType (PR #154027)

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

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper deleted https://github.com/llvm/llvm-project/pull/154107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-18 Thread Amr Hesham via cfe-commits
@@ -15,53 +15,29 @@ struct HasDtor { ~HasDtor(); }; -// CHECK: acc.private.recipe @privatization__ZTSA5_7HasDtor : !cir.ptr> init { +// CHECK: acc.private.recipe @privatization__ZTSA5_7HasDtor : !cir.ptr> init { // CHECK-NEXT: ^bb0(%[[ARG:.*]]: !cir.ptr> {{.*}}): -// CH

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/154107 >From ecd8ca3f42042ef65eef73cb743847538cededd1 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 18 Aug 2025 12:08:04 +0200 Subject: [PATCH 1/2] [CIR] Run LoweringPrepare pass only for non CIR output

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-18 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/154107 Run Lowering preparing pass conditionally if the action is not to emit CIR >From ecd8ca3f42042ef65eef73cb743847538cededd1 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Mon, 18 Aug 2025 12:08:04 +0200 S

[clang] [CIR] Implement MemberExpr support for ComplexType (PR #154027)

2025-08-17 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/154027 This change adds support for the MemberExpr ComplexType Issue: https://github.com/llvm/llvm-project/issues/141365 >From 4133294ca1424acfc7b23078d7eea45af060670f Mon Sep 17 00:00:00 2001 From: AmrDeveloper

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/153796 >From 6613d4c0d735461a0b5ef04da544f6ddf3f38541 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 13 Aug 2025 20:22:38 +0200 Subject: [PATCH 1/3] [CIR] Upstream DivOp for ComplexType --- clang/include

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-16 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/153796 >From 6613d4c0d735461a0b5ef04da544f6ddf3f38541 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 13 Aug 2025 20:22:38 +0200 Subject: [PATCH 1/2] [CIR] Upstream DivOp for ComplexType --- clang/include

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-15 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: - Division between Complex & Scalar will be in follow-up PR https://github.com/llvm/llvm-project/pull/153796 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-15 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/153796 This change adds support for the division operation between two complex types Issue: #141365 >From 6613d4c0d735461a0b5ef04da544f6ddf3f38541 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 13 Aug 20

[clang] [CIR] Upstream builtin lowering emitter & FAbs op (PR #151750)

2025-08-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/151750 >From 64ae6442a22f4ad67c7af2089c3248a88f4cfc29 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 1 Aug 2025 20:48:02 +0200 Subject: [PATCH 1/4] [CIR] Upstream builtin fabs op --- clang/include/clang/

[clang] [CIR] Upstream builtin lowering emitter & FAbs op (PR #151750)

2025-08-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/151750 >From 64ae6442a22f4ad67c7af2089c3248a88f4cfc29 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 1 Aug 2025 20:48:02 +0200 Subject: [PATCH 1/4] [CIR] Upstream builtin fabs op --- clang/include/clang/

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

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

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

2025-08-11 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: I think @darkbuck comitted a similar solution before I land 😕, I will rebase and land the diff from the code review comments https://github.com/llvm/llvm-project/pull/152846 ___ cfe-commits mailing list cfe-commits@lists.llvm.org h

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

2025-08-11 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/152846 >From 51882dd59abdc2a93f7ef18714568ce6f879e2f7 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 9 Aug 2025 11:48:23 +0200 Subject: [PATCH 1/2] [CIR] Make ClangIR compatible after AST representation m

[clang] [CIR] CompoundAssignment from ComplexType to ScalarType (PR #152915)

2025-08-10 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: Also, we can track the LValue type in the assignment, and if it is not complex, we can optimise the calculation more and not emit any complex create op for the result https://github.com/llvm/llvm-project/pull/152915 ___ cfe-commit

[clang] [CIR] CompoundAssignment from ComplexType to ScalarType (PR #152915)

2025-08-10 Thread Amr Hesham via cfe-commits
AmrDeveloper wrote: The current implementation in the incubator emits CreateComplexOp from the scalar and then emits ComplexBinOp to calculate the result between one complex and one scalar converted to complex. This approach is different from the OGCG because in the OGCG, it creates a track a

[clang] [CIR] CompoundAssignment from ComplexType to ScalarType (PR #152915)

2025-08-10 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/152915 This change adds support for the CompoundAssignment for ComplexType and updates our approach for emitting bin op between Complex & Scalar https://github.com/llvm/llvm-project/issues/141365 >From 1b36407a9

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

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

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

2025-08-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/152846 >From 946f3718f7e67966f07c962e7283d7fd11d0b329 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 9 Aug 2025 11:48:23 +0200 Subject: [PATCH 1/4] [CIR] Make ClangIR compatible after AST representation m

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

2025-08-09 Thread Amr Hesham via cfe-commits
@@ -10,20 +10,20 @@ bool clang::CIRGen::isEmptyRecordForLayout(const ASTContext &context, if (!rt) return false; - const RecordDecl *rd = rt->getDecl(); + const RecordDecl *rd = rt->getOriginalDecl(); AmrDeveloper wrote: Thank you for the review and

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

2025-08-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/152846 >From 946f3718f7e67966f07c962e7283d7fd11d0b329 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 9 Aug 2025 11:48:23 +0200 Subject: [PATCH 1/3] [CIR] Make ClangIR compatible after AST representation m

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

2025-08-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/152846 >From 946f3718f7e67966f07c962e7283d7fd11d0b329 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 9 Aug 2025 11:48:23 +0200 Subject: [PATCH 1/2] [CIR] Make ClangIR compatible after AST representation m

[clang] [CIR] Make ClangIR compatible with latest nested name specifier AST representation (PR #152846)

2025-08-09 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/152846 After AST representation, new modifications landed in (https://github.com/llvm/llvm-project/pull/147835). ClangIR requires some changes in how we use Clang AST to be compatible with the new changes >From

[clang] [CIR][NFC] Fix typo in ComplexRangeKind comment (PR #152535)

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

[clang] [CIR] Mul CompoundAssignment support for ComplexType (PR #152354)

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

[clang] [CIR] Upstream builtin lowering emitter & FAbs op (PR #151750)

2025-08-07 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,108 @@ +//===- CIRLoweringEmitter.cpp - Generate lowering of builtins --=-*- 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] [CIR][NFC] Fix typo in ComplexRangeKind comment (PR #152535)

2025-08-07 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/152535 Fix typo in ComplexRangeKind comment Catched in https://github.com/llvm/clangir/pull/1779 >From 1f4c7fb76dd14e76a868fd691ad25ee44bc4e795 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Thu, 7 Aug 2025 1

[clang] [CIR] Mul CompoundAssignment support for ComplexType (PR #152354)

2025-08-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/152354 >From 849151bd3ca671e1acf304e904134aa53733c88d Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 6 Aug 2025 18:53:34 +0200 Subject: [PATCH 1/2] [CIR] Mul CompoundAssignment support for ComplexType ---

[clang] [CIR] Mul CompoundAssignment support for ComplexType (PR #152354)

2025-08-06 Thread Amr Hesham via cfe-commits
@@ -286,3 +286,167 @@ void foo4() { // CXX_OGCG: %[[C_IMAG_PTR:.*]] = getelementptr inbounds nuw { i32, i32 }, ptr %[[C_ADDR]], i32 0, i32 1 // CXX_OGCG: store i32 %[[B_REAL]], ptr %[[C_REAL_PTR]], align 4 // CXX_OGCG: store i32 %[[B_IMAG]], ptr %[[C_IMAG_PTR]], align 4 +

[clang] [CIR] Mul CompoundAssignment support for ComplexType (PR #152354)

2025-08-06 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/152354 This change adds support for Mul CompoundAssignment for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 849151bd3ca671e1acf304e904134aa53733c88d Mon Sep 17 00:00:00 2001 From: AmrDevel

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

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

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-05 Thread Amr Hesham via cfe-commits
@@ -630,6 +654,104 @@ ComplexExprEmitter::emitBinOps(const BinaryOperator *e, QualType promotionTy) { return binOpInfo; } +LValue ComplexExprEmitter::emitCompoundAssignLValue( +const CompoundAssignOperator *e, +mlir::Value (ComplexExprEmitter::*func)(const BinOpInfo

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150759 >From 966844c4bbb1a2794c184e9a47bf97aa782dcdfc Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Jul 2025 14:43:06 +0200 Subject: [PATCH 1/5] [CIR] Plus & Minus CompoundAssignment support for Compl

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-05 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150759 >From 966844c4bbb1a2794c184e9a47bf97aa782dcdfc Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Jul 2025 14:43:06 +0200 Subject: [PATCH 1/5] [CIR] Plus & Minus CompoundAssignment support for Compl

[clang] [CIR] Upstream builtin lowering emitter & FAbs op (PR #151750)

2025-08-04 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,108 @@ +//===- CIRLoweringEmitter.cpp - Generate lowering of builtins --=-*- 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] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-04 Thread Amr Hesham via cfe-commits
@@ -630,6 +654,104 @@ ComplexExprEmitter::emitBinOps(const BinaryOperator *e, QualType promotionTy) { return binOpInfo; } +LValue ComplexExprEmitter::emitCompoundAssignLValue( +const CompoundAssignOperator *e, +mlir::Value (ComplexExprEmitter::*func)(const BinOpInfo

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-04 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,227 @@ +// RUN: %clang_cc1 -std=c++20 -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir -emit-cir %s -o %t.cir +// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR +// RUN: %clang_cc1 -x c -triple x86_64-unknown-linux-gnu -Wno-unused-value -fclangir

[clang] [CIR] Upstream builtin lowering emitter & FAbs op (PR #151750)

2025-08-04 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,108 @@ +//===- CIRLoweringEmitter.cpp - Generate lowering of builtins --=-*- 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] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-03 Thread Amr Hesham via cfe-commits
@@ -570,6 +594,124 @@ ComplexExprEmitter::emitBinOps(const BinaryOperator *e, QualType promotionTy) { return binOpInfo; } +LValue ComplexExprEmitter::emitCompoundAssignLValue( +const CompoundAssignOperator *e, +mlir::Value (ComplexExprEmitter::*func)(const BinOpInfo

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150759 >From 966844c4bbb1a2794c184e9a47bf97aa782dcdfc Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Jul 2025 14:43:06 +0200 Subject: [PATCH 1/4] [CIR] Plus & Minus CompoundAssignment support for Compl

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150759 >From 966844c4bbb1a2794c184e9a47bf97aa782dcdfc Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Jul 2025 14:43:06 +0200 Subject: [PATCH 1/3] [CIR] Plus & Minus CompoundAssignment support for Compl

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-08-03 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150759 >From 966844c4bbb1a2794c184e9a47bf97aa782dcdfc Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Jul 2025 14:43:06 +0200 Subject: [PATCH 1/2] [CIR] Plus & Minus CompoundAssignment support for Compl

[clang] [CIR] Upstream builtin lowering emitter & FAbs op (PR #151750)

2025-08-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/151750 >From 756f0656c3ad7788ed80ff9ccc091e19d07d63f8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 1 Aug 2025 20:48:02 +0200 Subject: [PATCH 1/3] [CIR] Upstream builtin fabs op --- clang/include/clang/

[clang] [CIR] Upstream builtin lowering emitter & FAbs op (PR #151750)

2025-08-02 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/151750 >From 756f0656c3ad7788ed80ff9ccc091e19d07d63f8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 1 Aug 2025 20:48:02 +0200 Subject: [PATCH 1/2] [CIR] Upstream builtin fabs op --- clang/include/clang/

[clang] [CIR] Upstream builtin lowering emitter & FAbs op (PR #151750)

2025-08-01 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/151750 Upstreaming FAbsOp as a prerequisite for upstreaming ComplexDivOp >From 756f0656c3ad7788ed80ff9ccc091e19d07d63f8 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 1 Aug 2025 20:48:02 +0200 Subject: [P

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-07-31 Thread Amr Hesham via cfe-commits
@@ -570,6 +594,124 @@ ComplexExprEmitter::emitBinOps(const BinaryOperator *e, QualType promotionTy) { return binOpInfo; } +LValue ComplexExprEmitter::emitCompoundAssignLValue( +const CompoundAssignOperator *e, +mlir::Value (ComplexExprEmitter::*func)(const BinOpInfo

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-07-31 Thread Amr Hesham via cfe-commits
@@ -570,6 +594,124 @@ ComplexExprEmitter::emitBinOps(const BinaryOperator *e, QualType promotionTy) { return binOpInfo; } +LValue ComplexExprEmitter::emitCompoundAssignLValue( +const CompoundAssignOperator *e, +mlir::Value (ComplexExprEmitter::*func)(const BinOpInfo

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

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

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-31 Thread Amr Hesham via cfe-commits
@@ -2823,6 +2823,49 @@ def CIR_ComplexSubOp : CIR_Op<"complex.sub", [ }]; } +//===--===// +// ComplexMulOp +//===--===// + +def CIR_Complex

[clang] [CIR] Fix fallthrough warning (PR #151418)

2025-07-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. LGTM, Thanks https://github.com/llvm/llvm-project/pull/151418 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Unary Plus & Minus op for ComplexType (PR #150281)

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

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-30 Thread Amr Hesham via cfe-commits
@@ -0,0 +1,325 @@ +// complex-range basic +// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -complex-range=basic -Wno-unused-value -fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-canonicalize -o %t.cir %s 2>&1 | FileCheck --check-prefix=CIR-BEFORE-BASIC %s +/

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-30 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper deleted https://github.com/llvm/llvm-project/pull/150834 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream MulOp for ComplexType (PR #150834)

2025-07-27 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150834 This change adds support for mul op for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 59063f1e4e73eb0c4dfe6d74393ed496c2c3e7be Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sun,

[clang] [CIR][NFC] Fix an unused variable warning (PR #150758)

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

[clang] [CIR] Plus & Minus CompoundAssignment support for ComplexType (PR #150759)

2025-07-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150759 This change adds support for Plus & Minus CompoundAssignment for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From cc8134454578899c228634799f6150c03b0fb403 Mon Sep 17 00:00:00 2001 From

[clang] [CIR][NFC] Fix an unused variable warning (PR #150758)

2025-07-26 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150758 This fixes a warning where a variable assigned in 'if' statement wasn't referenced again. >From 5905c9dd5fd3c2b5428002134cdc736cd31cc889 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Sat, 26 Jul 2025

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Amr Hesham via cfe-commits
@@ -1208,6 +1208,16 @@ cir::GlobalOp CIRGenModule::getGlobalForStringLiteral(const StringLiteral *s, return gv; } +void CIRGenModule::emitExplicitCastExprType(const ExplicitCastExpr *e, +CIRGenFunction *cgf) { + // Bind VLAs in t

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150668 >From 2858cdcc7f217e59a5ebf6e6b6afbd3e9bdc6deb Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Fri, 25 Jul 2025 19:49:11 +0200 Subject: [PATCH 1/2] [CIR] Implement LValueBitcast for ComplexType --- clan

[clang] [CIR] Add support for C++ initializer lists (PR #150681)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/150681 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement LValueBitcast for ComplexType (PR #150668)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper created https://github.com/llvm/llvm-project/pull/150668 This change adds support for LValueBitcast for ComplexType https://github.com/llvm/llvm-project/issues/141365 >From 2858cdcc7f217e59a5ebf6e6b6afbd3e9bdc6deb Mon Sep 17 00:00:00 2001 From: AmrDeveloper Dat

[clang] [CIR] Upstream Unary Plus & Minus op for ComplexType (PR #150281)

2025-07-25 Thread Amr Hesham via cfe-commits
https://github.com/AmrDeveloper updated https://github.com/llvm/llvm-project/pull/150281 >From 19a9d55e62b829de872c152c40f41a4459bc8c45 Mon Sep 17 00:00:00 2001 From: AmrDeveloper Date: Wed, 23 Jul 2025 19:59:07 +0200 Subject: [PATCH 1/2] [CIR] Upstream Unary Plus & Minus op for ComplexType --

[clang] [CIR] Upstream Support Init ComplexType from 1 size InitList (PR #150293)

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

[clang] [CIR] Implement CK_LValueToRValueBitCast for ComplexType (PR #150296)

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

[clang] [CIR] Implement CK_LValueToRValueBitCast for ComplexType (PR #150296)

2025-07-24 Thread Amr Hesham via cfe-commits
@@ -326,3 +326,28 @@ void complex_to_complex_cast() { // OGCG: store i32 %[[REAL_INT_CAST]], ptr {{.*}}, align 4 // OGCG: store i32 %[[IMAG_INT_CAST]], ptr getelementptr inbounds nuw ({ i32, i32 }, ptr {{.*}}, i32 0, i32 1), align 4 + +void lvalue_to_rvalue_bitcast() { + voi

  1   2   3   4   5   6   7   8   9   >