@@ -306,7 +316,45 @@ void CIRRecordLowering::fillOutputFields() {
RecordDecl::field_iterator
CIRRecordLowering::accumulateBitFields(RecordDecl::field_iterator field,
RecordDecl::field_iterator fieldEnd) {
- assert(!cir::MissingFeatures::i
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/156085
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor commented:
Looks good, with just a couple of test requests.
https://github.com/llvm/llvm-project/pull/156085
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
@@ -0,0 +1,65 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mms-bitfields -fclangir
-emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s --check-prefix=CIR
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -mms-bitfields -fclangir
-emit-llvm %s -o %t-ci
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation
AsteriskLoc) {
return BuildOpenACCAsteriskSizeExpr(AsteriskLoc);
}
+/// Loops through a type and generates an appropriate InitListExpr to generate
+/// type initialization.
+static Expr *Generat
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation
AsteriskLoc) {
return BuildOpenACCAsteriskSizeExpr(AsteriskLoc);
}
+/// Loops through a type and generates an appropriate InitListExpr to generate
+/// type initialization.
+static Expr *Generat
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation
AsteriskLoc) {
return BuildOpenACCAsteriskSizeExpr(AsteriskLoc);
}
+/// Loops through a type and generates an appropriate InitListExpr to generate
+/// type initialization.
+static Expr *Generat
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation
AsteriskLoc) {
return BuildOpenACCAsteriskSizeExpr(AsteriskLoc);
}
+/// Loops through a type and generates an appropriate InitListExpr to generate
+/// type initialization.
+static Expr *Generat
@@ -2733,14 +2786,33 @@ SemaOpenACC::CreateInitRecipe(OpenACCClauseKind CK,
// are used for code generation, we can just ignore/not bother doing
any
// initialization here.
break;
- case OpenACCReductionOperator::Multiplication:
case OpenACC
@@ -2589,6 +2589,59 @@ SemaOpenACC::ActOnOpenACCAsteriskSizeExpr(SourceLocation
AsteriskLoc) {
return BuildOpenACCAsteriskSizeExpr(AsteriskLoc);
}
+/// Loops through a type and generates an appropriate InitListExpr to generate
+/// type initialization.
+static Expr *Generat
https://github.com/andykaylor commented:
This looks good, but I have some questions and a couple of suggestions.
https://github.com/llvm/llvm-project/pull/156122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mai
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/156122
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/156124
This fills in the missing pieces to handle volatile loads and stores in CIR.
This addresses https://github.com/llvm/llvm-project/issues/153280
>From 99df40768de131846d6b58ac876cafd6dcddc2c0 Mon Sep 17 00:00:
https://github.com/andykaylor approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/155924
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor approved this pull request.
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
https://github.com/andykaylor edited
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
https://github.com/andykaylor commented:
Looks good, but without calling convention lowering it's not very useful.
https://github.com/llvm/llvm-project/pull/156092
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
@@ -853,3 +853,56 @@ void foo32() {
// OGCG: %[[REAL_ADDR:.*]] = alloca i32, align 4
// OGCG: %[[REAL:.*]] = load i32, ptr @_ZN9Container1cE, align 4
// OGCG: store i32 %[[REAL]], ptr %[[REAL_ADDR]], align 4
+
+void foo33(__builtin_va_list a) {
+ float _Complex b = __builtin_v
https://github.com/andykaylor approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/156036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/155486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2730,17 +2730,38 @@ static void
CollectArgsForIntegratedAssembler(Compilation &C,
}
}
-static std::string ComplexArithmeticStr(LangOptions::ComplexRangeKind Range) {
- return (Range == LangOptions::ComplexRangeKind::CX_None)
- ? ""
- : "-fcomple
https://github.com/andykaylor approved this pull request.
This looks good to me.
https://github.com/llvm/llvm-project/pull/154899
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/154899
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3,9 +3,32 @@
// CHECK: acc.reduction.recipe @reduction_lor__ZTSA5_f :
!cir.ptr> reduction_operator init {
// CHECK-NEXT: ^bb0(%[[ARG:.*]]: !cir.ptr>{{.*}})
-// CHECK-NEXT: cir.alloca !cir.array,
!cir.ptr>, ["openacc.reduction.init"]
-// TODO OpenACC: Expecting an initia
@@ -425,6 +425,7 @@ class OpenACCClauseCIREmitter final
&recipe.getCopyRegion(), recipe.getCopyRegion().end(),
{mainOp.getType(), mainOp.getType()}, {loc, loc});
builder.setInsertionPointToEnd(&recipe.getCopyRegion().back());
+CIRGenFunction::LexicalScop
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -30,7 +30,8 @@ llvm::Align CIRDataLayout::getAlignment(mlir::Type ty, bool
useABIAlign) const {
return llvm::Align(1);
// Get the layout annotation... which is lazily created on demand.
-llvm_unreachable("getAlignment()) for record type is not implemented");
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -21,20 +20,526 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
https://github.com/andykaylor approved this pull request.
This looks good. I have a lot of suggestions for updating the op description,
but feel free to merge after updating those.
https://github.com/llvm/llvm-project/pull/154994
___
cfe-commits maili
https://github.com/andykaylor edited
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
https://github.com/andykaylor approved this pull request.
lgtm
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
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> {
}];
}
+//===--===//
+// ThrowOp
+//===--===//
+
+def CIR_ThrowOp : CIR_Op<"thro
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> {
}];
}
+//===--===//
+// ThrowOp
+//===--===//
+
+def CIR_ThrowOp : CIR_Op<"thro
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> {
}];
}
+//===--===//
+// ThrowOp
+//===--===//
+
+def CIR_ThrowOp : CIR_Op<"thro
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> {
}];
}
+//===--===//
+// ThrowOp
+//===--===//
+
+def CIR_ThrowOp : CIR_Op<"thro
@@ -3864,4 +3864,63 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> {
}];
}
+//===--===//
+// ThrowOp
+//===--===//
+
+def CIR_ThrowOp : CIR_Op<"thro
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155668
>From 7a3f59c3f250f9730dc3479f2b5e1b28ec2f2354 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Wed, 27 Aug 2025 10:28:55 -0700
Subject: [PATCH 1/2] [Clang][CodeGen]NFC] Modernize loops in EmitCtorPrologue
T
@@ -130,6 +132,44 @@ void
CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset(
computeGlobalViewIndicesFromFlatOffset(offset, subType, layout, indices);
}
+static mlir::Type getAttributeType(mlir::Attribute attr) {
+ return mlir::cast(attr).getType();
+}
+
+cir::Record
@@ -21,20 +20,571 @@
#include "clang/AST/APValue.h"
#include "clang/AST/ASTContext.h"
#include "clang/AST/Attr.h"
+#include "clang/AST/CharUnits.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/RecordLayout.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/B
@@ -130,6 +132,44 @@ void
CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset(
computeGlobalViewIndicesFromFlatOffset(offset, subType, layout, indices);
}
+static mlir::Type getAttributeType(mlir::Attribute attr) {
+ return mlir::cast(attr).getType();
+}
+
+cir::Record
@@ -130,6 +132,44 @@ void
CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset(
computeGlobalViewIndicesFromFlatOffset(offset, subType, layout, indices);
}
+static mlir::Type getAttributeType(mlir::Attribute attr) {
+ return mlir::cast(attr).getType();
+}
+
+cir::Record
@@ -283,6 +283,16 @@ Type RecordType::getLargestMember(const ::mlir::DataLayout
&dataLayout) const {
});
}
+bool RecordType::isLayoutIdentical(const RecordType &other) {
+ if (getImpl() == other.getImpl())
+return true;
+
+ if (getPacked() != other.getPacked())
+
@@ -130,6 +132,44 @@ void
CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset(
computeGlobalViewIndicesFromFlatOffset(offset, subType, layout, indices);
}
+static mlir::Type getAttributeType(mlir::Attribute attr) {
+ return mlir::cast(attr).getType();
+}
+
+cir::Record
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/155534
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -238,31 +238,44 @@ void CIRGenFunction::emitCtorPrologue(const
CXXConstructorDecl *cd,
bool constructVBases = ctorType != Ctor_Base &&
classDecl->getNumVBases() != 0 &&
!classDecl->isAbstract();
- if (constructVBases) {
-
https://github.com/andykaylor approved this pull request.
lgtm, but some of the tests are going to fail after
https://github.com/llvm/llvm-project/pull/155697 so we need to coordinate the
merge order for these.
https://github.com/llvm/llvm-project/pull/155635
__
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155534
>From dc7ae0c41669c04d1288a882929058ec08501042 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 11 Jul 2025 13:18:29 -0700
Subject: [PATCH 1/4] [CIR] Add initial support for virtual base classes
This ad
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155534
>From dc7ae0c41669c04d1288a882929058ec08501042 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 11 Jul 2025 13:18:29 -0700
Subject: [PATCH 1/3] [CIR] Add initial support for virtual base classes
This ad
@@ -180,7 +180,11 @@ CharUnits CodeGenModule::computeNonVirtualBaseClassOffset(
// Get the layout.
const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);
-const auto *BaseDecl = Base->getType()->castAsCXXRecordDecl();
+const auto *BaseDecl =
--
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155534
>From dc7ae0c41669c04d1288a882929058ec08501042 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 11 Jul 2025 13:18:29 -0700
Subject: [PATCH 1/2] [CIR] Add initial support for virtual base classes
This ad
@@ -899,6 +933,52 @@ void CIRRecordLowering::accumulateBases(const
CXXRecordDecl *cxxRecordDecl) {
}
}
+void CIRRecordLowering::accumulateVBases() {
andykaylor wrote:
Yes, we should definitely update to the newer code structure. Thanks for
catching that!
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/155697
This adds the implementation of aggEmitFinalDestCopy for the case where the
destination value is not ignored. This requires adding the cir.copy operation
and associated interface code.
>From 36b02a82c306c31
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/155469
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155469
>From 711aee40c93a964cf8c731e1eb2aea4b1a055783 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Tue, 26 Aug 2025 09:36:52 -0700
Subject: [PATCH 1/2] [CIR][NFC] Add errors for unhandled AggExprEmitter
visitor
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/155668
This patch updates the loops in EmitCtorPrologue to use range-based for loops
rather than looping over a single iterator which was being shared between three
loops. Setting up three separate ranges adds a ve
@@ -37,6 +37,12 @@ class CIRGenCXXABI {
void setCXXABIThisValue(CIRGenFunction &cgf, mlir::Value thisPtr);
+ /// Emit the code to initialize hidden members required to handle virtual
+ /// inheritance, if needed by the ABI.
+ virtual void
+ initializeHiddenVirtualInheri
@@ -238,31 +238,44 @@ void CIRGenFunction::emitCtorPrologue(const
CXXConstructorDecl *cd,
bool constructVBases = ctorType != Ctor_Base &&
classDecl->getNumVBases() != 0 &&
!classDecl->isAbstract();
- if (constructVBases) {
-
https://github.com/andykaylor approved this pull request.
I have no additional comments beyond what @bcardosolopes has already said.
https://github.com/llvm/llvm-project/pull/155168
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.
https://github.com/andykaylor commented:
Doesn't this have an effect on any of the existing tests?
I'm not sure this is what we want. I know the parameter for emitArrayDestroy is
named `elementType` but the current output looks correct.
https://github.com/llvm/llvm-project/pull/155333
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155275
>From 5b6ce122b2298484dbeae63c4fc8151a312a Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Thu, 21 Aug 2025 09:24:43 -0700
Subject: [PATCH 1/3] [CIR] Add support for initializing classes with multiple
v
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155275
>From 37816ad3f4470032843080d71bd9b4425d1bc243 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Thu, 21 Aug 2025 09:24:43 -0700
Subject: [PATCH 1/2] [CIR] Add support for initializing classes with multiple
v
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155048
>From 5442c29e2d0960843da83e944b61e8155ce0ff1f Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 22 Aug 2025 13:26:30 -0700
Subject: [PATCH 1/2] [CIR] Add VTTAddrPointOp
This adds the definition, verific
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/155275
This adds support for initializing the vptr members in a class that requires
multiple vtables because of multiple inheritence. This still does not handle
virtual bases.
>From 37816ad3f4470032843080d71bd9b44
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/155027
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155027
>From 6d89819044ba3f2500af4dfa07f8f93bba00aeb9 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Wed, 20 Aug 2025 14:44:32 -0700
Subject: [PATCH 1/3] [CIR] Add support for emitting multi-vtables
This change a
@@ -144,33 +144,29 @@ void CIRGenVTables::createVTableInitializer(cir::GlobalOp
&vtableOp,
layout.getAddressPointIndices();
unsigned nextVTableThunkIndex = 0;
- if (layout.getNumVTables() > 1)
-cgm.errorNYI("emitVTableDefinitions: multiple vtables");
-
- // We'l
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/155048
This adds the definition, verification, and lowering for CIR's VTTAddrPointOp.
This is a bit ahead of the current codegen implementation, which doesn't yet
have support for emitting VTT definitions, but sinc
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/155031
>From fd0bd309c13adba6966cfafbc884cb378e0212c4 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 22 Aug 2025 14:23:50 -0700
Subject: [PATCH 1/2] [CIR] Add verifier for vtable initializer
This adds verifi
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/155031
This adds verification for the initializer, if present, of any global passed to
the `cir.vtable.address_point` op.
>From fd0bd309c13adba6966cfafbc884cb378e0212c4 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
D
andykaylor wrote:
@seven-mile This fixes a warning introduced in
https://github.com/llvm/llvm-project/pull/152511
https://github.com/llvm/llvm-project/pull/155029
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/m
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/155029
The getCIRSourceLanguage wasn't returning a value if the source language was
anything other than C or C++. This change updates that function to return a
std::optional value and only adds the source language
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/155027
This change adds support for emitting multiple tables in a global vtable object
to handle the case of multiple-inheritence.
>From 6d89819044ba3f2500af4dfa07f8f93bba00aeb9 Mon Sep 17 00:00:00 2001
From: Andy
https://github.com/andykaylor approved this pull request.
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
@@ -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
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/154808
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -33,13 +35,215 @@ mlir::Type CIRGenVTables::getVTableComponentType() {
return cgm.getVTableComponentType();
}
-mlir::Type CIRGenVTables::getVTableType(const VTableLayout &layout) {
+cir::RecordType CIRGenVTables::getVTableType(const VTableLayout &layout) {
SmallVector
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/154808
>From bedcef440bc14e523d3145b7683ce8a5cdfe4661 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Thu, 31 Jul 2025 09:47:08 -0700
Subject: [PATCH 1/3] [CIR] Add support for emitting vtables
This adds a simplif
@@ -495,6 +498,23 @@ void CIRGenModule::setNonAliasAttributes(GlobalDecl gd,
mlir::Operation *op) {
assert(!cir::MissingFeatures::setTargetAttributes());
}
+cir::SourceLanguage CIRGenModule::getCIRSourceLanguage() const {
+ using ClangStd = clang::LangStandard;
+ using CI
@@ -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
@@ -3013,6 +3014,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
@@ -405,17 +405,37 @@ void LoweringPreparePass::lowerArrayCtor(cir::ArrayCtor
op) {
true);
}
+void LoweringPreparePass::lowerThrowOp(ThrowOp op) {
andykaylor wrote:
Why does this happen here rather than in LowerToLLVM?
https://g
@@ -2646,6 +2646,24 @@ ParseResult cir::InlineAsmOp::parse(OpAsmParser &parser,
return mlir::success();
}
+//===--===//
+// ThrowOp
+//===-
@@ -657,6 +657,11 @@ class ScalarExprEmitter : public
StmtVisitor {
return cgf.emitCXXNewExpr(e);
}
+ mlir::Value VisitCXXThrowExpr(const CXXThrowExpr *e) {
+cgf.emitCXXThrowExpr(e);
+return nullptr;
andykaylor wrote:
```suggestion
return
@@ -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
@@ -2646,6 +2646,24 @@ ParseResult cir::InlineAsmOp::parse(OpAsmParser &parser,
return mlir::success();
}
+//===--===//
+// ThrowOp
+//===-
@@ -3757,4 +3757,58 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> {
}];
}
+//===--===//
+// ThrowOp
+//===--===//
+
+def CIR_ThrowOp : CIR_Op<"thro
1 - 100 of 1490 matches
Mail list logo