https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/133100
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
I don't have anything to add on top of Andy's review. LGTM once those comments
are addressed.
https://github.com/llvm/llvm-project/pull/133159
___
cfe-commits mailing list
cfe-commits@lists.
https://github.com/bcardosolopes approved this pull request.
LGTM after few extra nits
https://github.com/llvm/llvm-project/pull/134673
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/134536
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -304,6 +305,102 @@ RValue CIRGenFunction::emitAnyExpr(const Expr *e) {
llvm_unreachable("bad evaluation kind");
}
+static cir::FuncOp emitFunctionDeclPointer(CIRGenModule &cgm, GlobalDecl gd) {
+ assert(!cir::MissingFeatures::weakRefReference());
+ return cgm.getAddrOfF
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/134673
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,17 @@
+// RUN: cir-opt %s | FileCheck %s
+
bcardosolopes wrote:
Not a review item, more like a general "it will be nice comment": `mlir-opt`
has a `--verify-roundtrip` flag, which we should add at some point to `cir-opt`
to make such testings even mo
https://github.com/bcardosolopes approved this pull request.
LGTM. Btw I started seeing tons of these in the incubator since my latest macOS
update too, will do a round of cleanup there as well
https://github.com/llvm/llvm-project/pull/135046
___
cfe-
@@ -1342,6 +1342,47 @@ def FuncOp : CIR_Op<"func", [
let hasVerifier = 1;
}
+//===--===//
+// CallOp
+//===--===//
+
+class CIR_CallOpBase
@@ -304,6 +305,102 @@ RValue CIRGenFunction::emitAnyExpr(const Expr *e) {
llvm_unreachable("bad evaluation kind");
}
+static cir::FuncOp emitFunctionDeclPointer(CIRGenModule &cgm, GlobalDecl gd) {
+ assert(!cir::MissingFeatures::weakRefReference());
+ return cgm.getAddrOfF
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/134673
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -29,8 +29,15 @@ int f[5] = {1, 2};
void func() {
int arr[10];
-
// CHECK: %[[ARR:.*]] = cir.alloca !cir.array,
!cir.ptr>, ["arr"]
+
+ int e = arr[1];
+ // CHECK: %[[INIT:.*]] = cir.alloca !s32i, !cir.ptr, ["e", init]
+ // CHECK: %[[IDX:.*]] = cir.const #cir.int<1>
https://github.com/bcardosolopes approved this pull request.
Ship it!
https://github.com/llvm/llvm-project/pull/134928
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/134536
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -759,6 +761,84 @@ def BrCondOp : CIR_Op<"brcond",
}];
}
+//===--===//
+// While & DoWhileOp
+//===--===//
+
+class WhileOpBase : CIR_Op
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/131369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -400,13 +400,126 @@ def VoidPtr : Type<
"cir::VoidType::get($_builder.getContext()))"> {
}
+//===--===//
+// StructType
+//
+// The base type for all RecordDecls.
+//===---
bcardosolopes wrote:
> I'm still waiting for input from @bcardosolopes.
sorry for the delay, busy week!
https://github.com/llvm/llvm-project/pull/135105
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/lis
@@ -400,13 +400,126 @@ def VoidPtr : Type<
"cir::VoidType::get($_builder.getContext()))"> {
}
+//===--===//
+// StructType
+//
+// The base type for all RecordDecls.
+//===---
@@ -0,0 +1,116 @@
+//===--===//
+//
+// 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: Apa
https://github.com/bcardosolopes approved this pull request.
LGTM, really happy to see structs (now "records") landing!
https://github.com/llvm/llvm-project/pull/135105
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
https://github.com/bcardosolopes approved this pull request.
Nice!
https://github.com/llvm/llvm-project/pull/135427
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/133405
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -229,4 +229,32 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr",
[TypedAttrInterface]> {
}];
}
+//===--===//
+// RecordLayoutAttr
+//===---
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
@@ -225,17 +235,108 @@ void RecordType::complete(ArrayRef members, bool
packed, bool padded) {
//===--===//
llvm::TypeSize
-RecordType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
-
https://github.com/bcardosolopes approved this pull request.
LGTM once @xlauko is happy
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/136036
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1294,6 +1296,90 @@ mlir::LogicalResult
CIRToLLVMCmpOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite(
+cir::ShiftOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &rewriter) const {
+
@@ -1310,6 +1310,70 @@ def GetGlobalOp : CIR_Op<"get_global",
let hasVerifier = 0;
}
+//===--===//
+// GetMemberOp
+//===--===//
+
+def Get
bcardosolopes wrote:
> I think we should just make them illegal.
sounds good to me
https://github.com/llvm/llvm-project/pull/136387
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -215,6 +215,37 @@ def ConstArrayAttr : CIR_Attr<"ConstArray", "const_array",
[TypedAttrInterface]>
}];
}
+//===--===//
+// ConstVectorAttr
+//===--
https://github.com/bcardosolopes commented:
Title should start with `[CIR] ...`, more comments inline
https://github.com/llvm/llvm-project/pull/136807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
bcardosolopes wrote:
> It generates anonymous records for vtables and typeinfo
oh right, that was it! thanks for double checking
https://github.com/llvm/llvm-project/pull/136387
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
@@ -617,6 +617,9 @@ void CIRGenModule::emitTopLevelDecl(Decl *decl) {
case Decl::OpenACCDeclare:
emitGlobalOpenACCDecl(cast(decl));
break;
+ case Decl::Enum:
+assert(!cir::MissingFeatures::generateDebugInfo() && "NYI");
bcardosolopes wrote:
`ass
@@ -68,20 +168,70 @@ static cir::CIRCallOpInterface
emitCallLikeOp(CIRGenFunction &cgf,
assert(builder.getInsertionBlock() && "expected valid basic block");
assert(!cir::MissingFeatures::opCallIndirect());
- return builder.createCallOp(callLoc, directFuncOp);
+ return b
@@ -1496,6 +1496,10 @@ def FuncOp : CIR_Op<"func", [
return getFunctionType().getReturnTypes();
}
+// TODO(cir): this should be an operand attribute, but for now we just
hard-
+// wire this as a function. Will later add a $no_proto argument to this op.
+
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/136852
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/136807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/136807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bcardosolopes wrote:
> In the future, we'll have to teach the OpenACC dialect how to derive the
> upperbound, lowerbound, and step from the cir.for loop
Yea, even better if the `cir.for` representation can itself be improved to
expose that information (either by transforming it into a more ref
https://github.com/bcardosolopes commented:
Nothing to add after Andy comments are addressed
https://github.com/llvm/llvm-project/pull/135493
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
@@ -515,9 +519,32 @@ verifyCallCommInSymbolUses(mlir::Operation *op,
return op->emitOpError() << "'" << fnAttr.getValue()
<< "' does not reference a valid function";
- // TODO(cir): verify function arguments and return type
+ auto callIf = dy
@@ -0,0 +1,89 @@
+//==-- ABIArgInfo.h - Abstract info regarding ABI-specific arguments
---==//
+//
+// 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: Apa
@@ -18,9 +18,12 @@
using namespace clang;
using namespace clang::CIRGen;
-CIRGenFunctionInfo *CIRGenFunctionInfo::create() {
- // For now we just create an empty CIRGenFunctionInfo.
- CIRGenFunctionInfo *fi = new CIRGenFunctionInfo();
+CIRGenFunctionInfo *CIRGenFunctionInfo:
@@ -87,9 +110,48 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo
&funcInfo,
assert(!cir::MissingFeatures::opCallMustTail());
assert(!cir::MissingFeatures::opCallReturn());
- // For now we just return nothing because we don't have support for return
- // valu
@@ -1294,6 +1296,90 @@ mlir::LogicalResult
CIRToLLVMCmpOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite(
+cir::ShiftOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &rewriter) const {
+
@@ -350,20 +350,87 @@ void func7() {
// OGCG: %[[ARR:.*]] = alloca [1 x ptr], align 8
// OGCG: call void @llvm.memset.p0.i64(ptr align 8 %[[ARR]], i8 0, i64 8, i1
false)
-void func8(int p[10]) {}
-// CIR: cir.func @func8(%arg0: !cir.ptr
-// CIR: cir.alloca !cir.ptr, !cir.ptr>
@@ -67,6 +72,166 @@ void CIRDialect::printType(Type type, DialectAsmPrinter
&os) const {
llvm::report_fatal_error("printer is missing a handler for this type");
}
+//===--===//
+// RecordType Definitions
+/
@@ -399,6 +399,14 @@ mlir::Type CIRGenTypes::convertType(QualType type) {
break;
}
+ case Type::Enum: {
+const EnumDecl *ED = cast(ty)->getDecl();
+if (ED->isCompleteDefinition() || ED->isFixed())
+ return convertType(ED->getIntegerType());
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const
clang::BreakStmt &s) {
return mlir::success();
}
+const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s,
+ mlir::Type condType,
+
@@ -428,6 +429,52 @@ mlir::LogicalResult CIRGenFunction::emitBreakStmt(const
clang::BreakStmt &s) {
return mlir::success();
}
+const CaseStmt *CIRGenFunction::foldCaseStmt(const clang::CaseStmt &s,
+ mlir::Type condType,
+
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/136807
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/138576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final
return conversionOp.getResult(0);
}
+ mlir::Value createConstantInt(mlir::Location loc, unsigned width,
+int64_t value) {
+mlir::IntegerType ty = mlir::IntegerType::get(
+
@@ -82,6 +83,17 @@ class OpenACCClauseCIREmitter final
return conversionOp.getResult(0);
}
+ mlir::Value createConstantInt(mlir::Location loc, unsigned width,
+int64_t value) {
+mlir::IntegerType ty = mlir::IntegerType::get(
+
https://github.com/bcardosolopes commented:
LGTM with minor tip: can you also add a source to CIR test that guarantee this
kicks in from the driver?
https://github.com/llvm/llvm-project/pull/138317
___
cfe-commits mailing list
cfe-commits@lists.llvm.
@@ -365,10 +365,15 @@ mlir::Attribute
ConstantEmitter::tryEmitPrivateForVarInit(const VarDecl &d) {
if (!d.hasLocalStorage()) {
QualType ty = cgm.getASTContext().getBaseElementType(d.getType());
if (ty->isRecordType())
- if (d.getInit() && isa(d.getInit())) {
-
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/138368
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes commented:
Overall looks good. While here, can you please implement a folder for this
operation? It should kick-in if both idx and input vector are constants.
https://github.com/llvm/llvm-project/pull/138413
___
cfe-co
@@ -0,0 +1,184 @@
+//===--===//
+//
+// 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: Apa
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/138317
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -21,9 +21,24 @@ let cppNamespace = "::cir" in {
// The CIRCallOpInterface must be used instead of CallOpInterface when
looking
// at arguments and other bits of CallOp. This creates a level of abstraction
// that's useful for handling indirect calls and other details.
@@ -253,3 +253,8 @@ size_type max_size(void) {
// OGCG: define{{.*}} i64 @max_size()
// OGCG: ret i64 2305843009213693951
+
+enum {
+ um = 0,
+ dois = 1,
+};
bcardosolopes wrote:
You should add equivalent filecheck CHECK like lines here and in the other t
@@ -18,22 +18,118 @@
using namespace clang;
using namespace clang::CIRGen;
-CIRGenFunctionInfo *CIRGenFunctionInfo::create(CanQualType resultType) {
- void *buffer = operator new(totalSizeToAlloc(1));
+CIRGenFunctionInfo *
+CIRGenFunctionInfo::create(CanQualType resultType,
+
@@ -68,20 +168,70 @@ static cir::CIRCallOpInterface
emitCallLikeOp(CIRGenFunction &cgf,
assert(builder.getInsertionBlock() && "expected valid basic block");
assert(!cir::MissingFeatures::opCallIndirect());
- return builder.createCallOp(callLoc, directFuncOp);
+ return b
https://github.com/bcardosolopes approved this pull request.
I don't have anything to say that wasn't covered, LGTM once Andy is happy!
https://github.com/llvm/llvm-project/pull/136854
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lis
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/137396
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/135493
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -29,13 +32,29 @@ CIRGenCallee
CIRGenCallee::prepareConcreteCallee(CIRGenFunction &cgf) const {
return *this;
}
-static const CIRGenFunctionInfo &arrangeFreeFunctionLikeCall(CIRGenTypes &cgt)
{
+static const CIRGenFunctionInfo &
+arrangeFreeFunctionLikeCall(CIRGenTypes &
https://github.com/bcardosolopes approved this pull request.
LGTM, pending if Andy has any other followup
https://github.com/llvm/llvm-project/pull/135552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/li
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/135552
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -350,20 +350,87 @@ void func7() {
// OGCG: %[[ARR:.*]] = alloca [1 x ptr], align 8
// OGCG: call void @llvm.memset.p0.i64(ptr align 8 %[[ARR]], i8 0, i64 8, i1
false)
-void func8(int p[10]) {}
-// CIR: cir.func @func8(%arg0: !cir.ptr
-// CIR: cir.alloca !cir.ptr, !cir.ptr>
@@ -0,0 +1,50 @@
+#include "TargetInfo.h"
+#include "ABIInfo.h"
+#include "CIRGenFunctionInfo.h"
+#include "clang/CIR/MissingFeatures.h"
+
+using namespace clang;
+using namespace clang::CIRGen;
+
+static bool testIfIsVoidTy(QualType ty) {
+ const auto *builtinTy = ty->getAs();
+
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/135844
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM with minor nit
https://github.com/llvm/llvm-project/pull/135844
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,222 @@
+//===--===//
+//
+// 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: Apa
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/135844
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -225,17 +235,108 @@ void RecordType::complete(ArrayRef members, bool
packed, bool padded) {
//===--===//
llvm::TypeSize
-RecordType::getTypeSizeInBits(const ::mlir::DataLayout &dataLayout,
-
@@ -502,6 +502,15 @@ def CIR_RecordType : CIR_Type<"Record", "record",
void complete(llvm::ArrayRef members, bool packed,
bool isPadded);
+
+ // Utilities for lazily computing and cacheing data layout info.
+ // FIXME: currently opaque because there's a
https://github.com/bcardosolopes approved this pull request.
Minor nit, but LGTM otherwise
https://github.com/llvm/llvm-project/pull/136578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-comm
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/136578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -136,6 +154,51 @@ class OpenACCClauseCIREmitter final
if (!clause.getArchitectures().empty())
operation.setDeviceType(
decodeDeviceType(clause.getArchitectures()[0].getIdentifierInfo()));
+} else if constexpr (isOneOfTypes) {
+ // Nothing
@@ -1310,6 +1310,70 @@ def GetGlobalOp : CIR_Op<"get_global",
let hasVerifier = 0;
}
+//===--===//
+// GetMemberOp
+//===--===//
+
+def Get
@@ -309,6 +309,37 @@ RecordType::computeStructAlignment(const mlir::DataLayout
&dataLayout) const {
return recordAlignment;
}
+uint64_t RecordType::getElementOffset(const ::mlir::DataLayout &dataLayout,
+ unsigned idx) const {
+ assert(
https://github.com/bcardosolopes approved this pull request.
LGTM pending discussion/comments
https://github.com/llvm/llvm-project/pull/136383
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
bcardosolopes wrote:
> I question stealing ty as the prefix to this instead of rt (or something more
> specific to records), but I'm not sure I feel particularly strongly. Just it
> seems that ty is going to be pretty meaningless perhaps?
Good point, `rec` or `rt` probably make more sense. I'm
https://github.com/bcardosolopes approved this pull request.
LGTM pending `ty_anon` test mentioned by Erich
https://github.com/llvm/llvm-project/pull/136387
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
@@ -1419,6 +1419,48 @@ def CallOp : CIR_CallOpBase<"call", [NoRegionArguments]>
{
}]>];
}
+//===--===//
+// StackSave & StackRestoreOp
+//===---
https://github.com/bcardosolopes closed
https://github.com/llvm/llvm-project/pull/136431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
The PR looks good overall, it adds the operation, tests for parsing/printing +
LLVM lowering, leaving CIRGen to support to be done incrementally. LGTM once
the operation names are used consistently.
https://github.com/llvm/llvm-proje
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/136431
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -530,7 +567,7 @@ def CIRRecordType : Type<
//===--===//
def CIR_AnyType : AnyTypeOf<[
- CIR_VoidType, CIR_BoolType, CIR_ArrayType, CIR_IntType, CIR_AnyFloat,
+ CIR_VoidType, CIR_BoolType, CIR_ArrayType,
@@ -637,6 +637,41 @@ ArrayType::getABIAlignment(const ::mlir::DataLayout
&dataLayout,
return dataLayout.getTypeABIAlignment(getEltType());
}
+//===--===//
+// VectorType Definitions
+//===--
@@ -307,6 +307,26 @@ def CIR_ArrayType : CIR_Type<"Array", "array",
}];
}
+//===--===//
+// VectorType (fixed size)
+//===--===//
+
+def CI
@@ -307,6 +307,26 @@ def CIR_ArrayType : CIR_Type<"Array", "array",
}];
}
+//===--===//
+// VectorType (fixed size)
+//===--===//
+
+def CI
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/136488
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl
gd,
llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition");
}
+static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) {
+ assert(!cir::MissingFeatures::supportComdat
@@ -210,6 +223,193 @@ void CIRGenModule::emitGlobalDefinition(clang::GlobalDecl
gd,
llvm_unreachable("Invalid argument to CIRGenModule::emitGlobalDefinition");
}
+static bool shouldBeInCOMDAT(CIRGenModule &cgm, const Decl &d) {
+ assert(!cir::MissingFeatures::supportComdat
@@ -57,3 +57,15 @@ bool boolfunc() { return true; }
// CHECK: %0 = cir.const #true
// CHECK: cir.return %0 : !cir.bool
// CHECK: }
+
+float floatfunc() { return 42.42f; }
+// CHECK: cir.func @floatfunc() -> !cir.float {
+// CHECK: %0 = cir.const #cir.fp<4.242000e+01> : !c
601 - 700 of 980 matches
Mail list logo