https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/150520
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -174,6 +185,58 @@ mlir::Value ComplexExprEmitter::emitCast(CastKind ck, Expr
*op,
return {};
}
+mlir::Value ComplexExprEmitter::VisitUnaryPlus(const UnaryOperator *e,
+ QualType promotionType) {
+ QualType promotionTy = prom
@@ -584,6 +584,12 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr
*e) {
return lv;
}
+ if (const auto *bd = dyn_cast(nd)) {
+assert(!e->refersToEnclosingVariableOrCapture() &&
+ !cir::MissingFeatures::lambdaCaptures());
andy
https://github.com/andykaylor approved this pull request.
https://github.com/llvm/llvm-project/pull/151069
___
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/151066
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/150499
___
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/150520
>From 88039a468792435666e3026b5bf42ad31405d332 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Thu, 24 Jul 2025 13:14:35 -0700
Subject: [PATCH 1/3] [CIR] Upstream proper function alias lowering
This change
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/150553
___
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.
I verified that CIR builds for me also with the latest changes.
https://github.com/llvm/llvm-project/pull/150805
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
@@ -1729,6 +1783,34 @@ cir::FuncOp CIRGenModule::getOrCreateCIRFunction(
invalidLoc ? theModule->getLoc() : getLoc(funcDecl->getSourceRange()),
mangledName, mlir::cast(funcType), funcDecl);
+ // If we already created a function with the same mangled name (but diff
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/150499
>From 13c8a3d27a92808485ed594d7f4f57c3597ee884 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Wed, 23 Jul 2025 11:56:44 -0700
Subject: [PATCH 1/2] [CIR] Initial support for array cleanups
This adds initial
@@ -658,10 +693,38 @@ void CIRGenFunction::emitNullabilityCheck(LValue lhs,
mlir::Value rhs,
/// elements
void CIRGenFunction::emitDestroy(Address addr, QualType type,
Destroyer *destroyer) {
- if (getContext().getAsArrayType(type))
-cgm
@@ -649,6 +649,41 @@ void CIRGenFunction::emitNullabilityCheck(LValue lhs,
mlir::Value rhs,
assert(!cir::MissingFeatures::sanitizers());
}
+/// Destroys all the elements of the given array, beginning from last to first.
+/// The array cannot be zero-length.
+///
+/// \param
@@ -923,4 +923,129 @@ CIRGenFunction::emitArrayLength(const clang::ArrayType
*origArrayType,
return builder.getConstInt(*currSrcLoc, SizeTy, countFromCLAs);
}
+// TODO(cir): most part of this function can be shared between CIRGen
andykaylor wrote:
```sugge
@@ -923,4 +923,129 @@ CIRGenFunction::emitArrayLength(const clang::ArrayType
*origArrayType,
return builder.getConstInt(*currSrcLoc, SizeTy, countFromCLAs);
}
+// TODO(cir): most part of this function can be shared between CIRGen
+// and traditional LLVM codegen
+void CIRGe
https://github.com/andykaylor approved this pull request.
Looks good, with a few nits.
https://github.com/llvm/llvm-project/pull/150668
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/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
@@ -923,4 +923,129 @@ CIRGenFunction::emitArrayLength(const clang::ArrayType
*origArrayType,
return builder.getConstInt(*currSrcLoc, SizeTy, countFromCLAs);
}
+// TODO(cir): most part of this function can be shared between CIRGen
+// and traditional LLVM codegen
+void CIRGe
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/150668
___
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/150681
This adds basic support for using C++ initializer lists to initialize fields of
a record.
>From 37662e274d664c34b09b909c62de943913ee2164 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Thu, 24 Jul 2025 18:
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/150553
This adds standard-comforming handling for calls to functions that were
declared in C source in the no prototype form.
>From 77391e361f5c40baca8974dce31d3d007ac97c4f Mon Sep 17 00:00:00 2001
From: Andy Kaylo
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/150520
This change implements correct lowering of function aliases to the LLVM dialect.
>From 88039a468792435666e3026b5bf42ad31405d332 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Thu, 24 Jul 2025 13:14:35 -070
andykaylor wrote:
I'm not sure the combined warning is necessary. I think just stating that the
clang option overrides the GCC option is sufficient since there is no sense in
which clang-specific options can be incompatible with GCC if GCC doesn't
implement the option.
I think we're all in ag
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/150497
___
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/150499
This adds support for array cleanups, including the ArrayDtor op.
>From 13c8a3d27a92808485ed594d7f4f57c3597ee884 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Wed, 23 Jul 2025 11:56:44 -0700
Subject: [PAT
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/150497
This change removes a stale errorNYI message to allow destructor alias
handling. The error message was an artifact of the order in which various parts
of the implementation were upstreamed. Now that all the
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/149948
___
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/149948
>From e3119acb922ad93f6a9b66a5067271834726e77d Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Thu, 17 Jul 2025 11:18:57 -0700
Subject: [PATCH 1/2] [CIR] Add support for normal cleanups
This change adds bas
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/149948
>From 03ed26afb3fd0dc9618b0243daf3b05ece14d95b Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Thu, 17 Jul 2025 11:18:57 -0700
Subject: [PATCH 1/2] [CIR] Add support for normal cleanups
This change adds bas
https://github.com/andykaylor approved this pull request.
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
@@ -2132,6 +2133,117 @@ LogicalResult cir::ComplexImagPtrOp::verify() {
return success();
}
+//===--===//
+// Bit manipulation operations
+//===---
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/150235
___
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 -- thanks for the test updates!
https://github.com/llvm/llvm-project/pull/150235
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-
https://github.com/andykaylor approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/149142
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -311,6 +312,115 @@ void CIRGenFunction::emitInitializerForField(FieldDecl
*field, LValue lhs,
assert(!cir::MissingFeatures::requiresCleanups());
}
+/// Emit a loop to call a particular constructor for each of several members
+/// of an array.
+///
+/// \param ctor the co
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/149142
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -22,15 +24,97 @@ struct LoweringPreparePass : public
LoweringPrepareBase {
void runOnOperation() override;
void runOnOp(Operation *op);
+ void lowerArrayCtor(ArrayCtor op);
};
} // namespace
-void LoweringPreparePass::runOnOp(Operation *op) {}
+void LoweringPrep
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o -
2>&1 | FileCheck --check-prefixes=CIR-BEFORE-LPP %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-u
@@ -0,0 +1,93 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-cir -mmlir --mlir-print-ir-before=cir-lowering-prepare %s -o -
2>&1 | FileCheck --check-prefixes=CIR-BEFORE-LPP %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-u
https://github.com/andykaylor approved this pull request.
lgtm, with one nit remaining and a couple of test requests
https://github.com/llvm/llvm-project/pull/149142
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin
https://github.com/andykaylor approved this pull request.
lgtm if @xlauko is satisfied.
https://github.com/llvm/llvm-project/pull/149717
___
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/149676
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -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 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-llvm %s -o
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/149552
>From a129747782cf1bf3ac863cff28757c847f256c00 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 18 Jul 2025 10:32:43 -0700
Subject: [PATCH 1/2] [CIR] Add complete destructor handling
The initial impleme
https://github.com/andykaylor approved this pull request.
LGTM
We should make this same change in `ScalarExprEmitter::EmitScalarPrePostIncDec`
https://github.com/llvm/llvm-project/pull/149566
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
htt
https://github.com/andykaylor approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/148943
___
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/149552
The initial implementation for emitting destructors emitted the complete
destructor body for both D1 and D2 destructors. This change updates the code to
have the D1 destructor call the D2 destructor.
>From
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -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 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-llvm %s -o
@@ -0,0 +1,70 @@
+// RUN: %clang_cc1 -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 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-llvm %s -o
https://github.com/andykaylor approved this pull request.
This looks good, but I'm asking for changes to make the tests more readable.
https://github.com/llvm/llvm-project/pull/149162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://list
@@ -83,8 +83,204 @@ void foo2() {
// OGCG: %[[A_REAL:.*]] = load float, ptr %[[A_REAL_PTR]], align 4
// OGCG: %[[A_IMAG_PTR:.*]] = getelementptr inbounds nuw { float, float }, ptr
%[[COMPLEX]], i32 0, i32 1
// OGCG: %[[A_IMAG:.*]] = load float, ptr %[[A_IMAG_PTR]], align 4
-//
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/149162
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -73,8 +73,8 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> {
}
def LoweringPrepare : Pass<"cir-lowering-prepare"> {
- let summary = "Lower to more fine-grained CIR operations before lowering to
-other dialects";
+ let summary = "Lower to more fine-grained CIR operatio
https://github.com/andykaylor approved this pull request.
https://github.com/llvm/llvm-project/pull/148025
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/148080
___
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/148011
These decl types don't require any code generation, though when debug info is
implemented, we will need to add handling for that. Until then, we just need to
have a handler so they don't generate an NYI err
@@ -1669,6 +1669,94 @@ def GetGlobalOp : CIR_Op<"get_global",
}];
}
+//===--===//
+// SetBitfieldOp
+//===--===//
+
+def SetBitfieldOp : CI
@@ -105,6 +106,27 @@ class CIRGenFunction : public CIRGenTypeCache {
mlir::Value emitAlloca(llvm::StringRef name, mlir::Type ty,
mlir::Location loc, clang::CharUnits alignment);
+private:
+ // Track current variable initialization (if there's one)
+
@@ -2661,6 +2661,45 @@ def BitPopcountOp : CIR_BitOpBase<"bit.popcnt",
}];
}
+def BitReverseOp : CIR_BitOpBase<"bit.reverse",
+ CIR_UIntOfWidths<[8, 16, 32, 64]>> {
+ let summary = "Reverse the bit pattern of the operand integer";
+ let desc
https://github.com/andykaylor approved this pull request.
lgtm, apart from my request for an additional test case
https://github.com/llvm/llvm-project/pull/147609
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/ma
@@ -1669,6 +1669,94 @@ def GetGlobalOp : CIR_Op<"get_global",
}];
}
+//===--===//
+// SetBitfieldOp
+//===--===//
+
+def SetBitfieldOp : CI
https://github.com/andykaylor commented:
I'm not sure we want to do this as part of our general canonicalization. It's a
good optimization, but I don't think this kind of thing should be happening
before the optimization phase. That may be true of most of our folders.
I suppose this is a broad
https://github.com/andykaylor approved this pull request.
I strongly approve!
https://github.com/llvm/llvm-project/pull/147365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -82,12 +85,17 @@ llvm::LogicalResult
prepareCIRModuleDataLayout(mlir::ModuleOp mod,
// Data layout is fully determined by the target triple. Here we only pass
the
// triple to get the data layout.
+ llvm::IntrusiveRefCntPtr diagID(
+ new clang::DiagnosticIDs);
+
@@ -82,12 +85,17 @@ llvm::LogicalResult
prepareCIRModuleDataLayout(mlir::ModuleOp mod,
// Data layout is fully determined by the target triple. Here we only pass
the
// triple to get the data layout.
+ llvm::IntrusiveRefCntPtr diagID(
+ new clang::DiagnosticIDs);
+
@@ -65,6 +65,10 @@ struct CIROpAsmDialectInterface : public
OpAsmDialectInterface {
os << (boolAttr.getValue() ? "true" : "false");
return AliasResult::FinalAlias;
}
+if (auto bitfield = mlir::dyn_cast(attr)) {
andykaylor wrote:
Yes, I see
andykaylor wrote:
> Is there any reason why this is special a operation and not `cmp` operation
> parameterized by (ne, eq) as for floats, integers?
I like this suggestion.
https://github.com/llvm/llvm-project/pull/146129
___
cfe-commits mailing list
https://github.com/andykaylor approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/146167
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/145979
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -76,3 +77,31 @@ void def() {
T t;
U u;
}
+
+int load_field(S* s) {
+ return s->c;
andykaylor wrote:
Can you add a test case with an unsigned field?
https://github.com/llvm/llvm-project/pull/145971
___
cfe-co
@@ -2244,6 +2245,54 @@ mlir::LogicalResult
CIRToLLVMComplexImagOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMGetBitfieldOpLowering::matchAndRewrite(
+cir::GetBitfieldOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &r
@@ -65,6 +65,10 @@ struct CIROpAsmDialectInterface : public
OpAsmDialectInterface {
os << (boolAttr.getValue() ? "true" : "false");
return AliasResult::FinalAlias;
}
+if (auto bitfield = mlir::dyn_cast(attr)) {
andykaylor wrote:
Can you ad
@@ -2244,6 +2245,54 @@ mlir::LogicalResult
CIRToLLVMComplexImagOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMGetBitfieldOpLowering::matchAndRewrite(
+cir::GetBitfieldOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &r
@@ -326,13 +326,61 @@ mlir::Value
CIRGenFunction::emitStoreThroughBitfieldLValue(RValue src,
return {};
}
+RValue CIRGenFunction::emitLoadOfBitfieldLValue(LValue lv, SourceLocation loc)
{
+ const CIRGenBitFieldInfo &info = lv.getBitFieldInfo();
+
+ // Get the output type
@@ -405,6 +406,16 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
return createGlobal(module, loc, uniqueName, type, linkage);
}
+
+ mlir::Value createGetBitfield(mlir::Location loc, mlir::Type resultType,
+mlir::Value addr, mli
@@ -375,4 +375,42 @@ def CIR_VisibilityAttr : CIR_EnumAttr {
}];
}
+//===--===//
+// BitfieldInfoAttr
+//===--===//
+
+def BitfieldInfoAttr
@@ -375,4 +375,42 @@ def CIR_VisibilityAttr : CIR_EnumAttr {
}];
}
+//===--===//
+// BitfieldInfoAttr
+//===--===//
+
+def BitfieldInfoAttr
@@ -258,6 +258,30 @@ void CIRGenFunction::emitDelegateCXXConstructorCall(
/*Delegating=*/true, thisAddr, delegateArgs, loc);
}
+void CIRGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &args)
{
+ const auto *assignOp = cast(curGD.getDe
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/145979
>From af4621f2944e84801f425bba3c77313ab625e714 Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Fri, 16 May 2025 14:14:21 -0700
Subject: [PATCH 1/2] [CIR] Upstream support for operator assign
This adds suppo
@@ -258,6 +258,30 @@ void CIRGenFunction::emitDelegateCXXConstructorCall(
/*Delegating=*/true, thisAddr, delegateArgs, loc);
}
+void CIRGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &args)
{
+ const auto *assignOp = cast(curGD.getDe
https://github.com/andykaylor approved this pull request.
Thanks for handling this!
https://github.com/llvm/llvm-project/pull/146147
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -258,6 +258,30 @@ void CIRGenFunction::emitDelegateCXXConstructorCall(
/*Delegating=*/true, thisAddr, delegateArgs, loc);
}
+void CIRGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &args)
{
+ const auto *assignOp = cast(curGD.getDe
@@ -258,6 +258,30 @@ void CIRGenFunction::emitDelegateCXXConstructorCall(
/*Delegating=*/true, thisAddr, delegateArgs, loc);
}
+void CIRGenFunction::emitImplicitAssignmentOperatorBody(FunctionArgList &args)
{
+ const auto *assignOp = cast(curGD.getDe
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/145802
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/145792
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -95,6 +95,7 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &mlirContext,
// TODO(CIR): Should be updated once TypeSizeInfoAttr is upstreamed
const unsigned sizeTypeSize =
astContext.getTypeSize(astContext.getSignedSizeType());
+ SizeSizeInBytes = astContext.toCha
@@ -95,6 +95,7 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &mlirContext,
// TODO(CIR): Should be updated once TypeSizeInfoAttr is upstreamed
const unsigned sizeTypeSize =
astContext.getTypeSize(astContext.getSignedSizeType());
+ SizeSizeInBytes = astContext.toCha
@@ -66,6 +66,16 @@ struct CIRGenTypeCache {
unsigned char PointerSizeInBytes;
};
+ /// The size and alignment of size_t.
+ union {
+unsigned char SizeSizeInBytes; // sizeof(size_t)
andykaylor wrote:
It will eventually be used by the array cookie i
@@ -888,6 +888,69 @@ void CIRGenModule::updateCompletedType(const TagDecl *td) {
genTypes.updateCompletedType(td);
}
+void CIRGenModule::addReplacement(StringRef name, mlir::Operation *op) {
+ replacements[name] = op;
+}
+
+void CIRGenModule::replacePointerTypeArgs(cir::Fun
@@ -79,17 +79,102 @@ void
CIRGenItaniumCXXABI::emitInstanceFunctionProlog(SourceLocation loc,
}
}
+// Find out how to cirgen the complete destructor and constructor
+namespace {
+enum class StructorCIRGen { Emit, RAUW, Alias, COMDAT };
+}
+
+static StructorCIRGen getCIRGenT
https://github.com/andykaylor approved this pull request.
Thanks for the fix. For some reason my compiler (clang 14) doesn't warn about
these situations.
https://github.com/llvm/llvm-project/pull/145922
___
cfe-commits mailing list
cfe-commits@lists.l
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/145792
This change adds support for handling the -mconstructor-aliases option in CIR.
Aliases are not yet correctly lowered to LLVM IR. That will be implemented in a
future change.
>From b9fa4c7e927b01bf998380334d
https://github.com/andykaylor edited
https://github.com/llvm/llvm-project/pull/145770
___
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/145750
This sorts the 'Misc' section of the MissingFeatures.h file lexicographically.
The goal is to reduce the number of merge conflicts we're having with this
file. Currently, we've been adding new entries at the
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/145600
___
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/144877
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1737,25 +1737,51 @@ def GetMemberOp : CIR_Op<"get_member"> {
def FuncOp : CIR_Op<"func", [
AutomaticAllocationScope, CallableOpInterface, FunctionOpInterface,
+ DeclareOpInterfaceMethods,
IsolatedFromAbove
]> {
let summary = "Declare or define a function";
let
@@ -1737,25 +1737,51 @@ def GetMemberOp : CIR_Op<"get_member"> {
def FuncOp : CIR_Op<"func", [
AutomaticAllocationScope, CallableOpInterface, FunctionOpInterface,
+ DeclareOpInterfaceMethods,
IsolatedFromAbove
]> {
let summary = "Declare or define a function";
let
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/145551
The CIR handling of `dso_local` for globals was upstreamed without the
underscore, making it inconsistent with the incubator and LLVM IR. This change
restores the underscore.
>From f3927e3fd07cad46f183e4341
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/145560
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 1507 matches
Mail list logo