@@ -2275,4 +2275,36 @@ def VecTernaryOp : CIR_Op<"vec.ternary",
let hasFolder = 1;
}
+//===--===//
+// VecSplatOp
+//===--===//
+
+def VecS
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/139827
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/139827
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1533,6 +1533,16 @@ LogicalResult cir::GetMemberOp::verify() {
// VecCreateOp
//===--===//
+OpFoldResult cir::VecCreateOp::fold(FoldAdaptor adaptor) {
+ if (llvm::any_of(getElements(), [](mlir::Value attr
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/143355
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/143355
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/143260
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,81 @@
+#include "CIRGenBuilder.h"
+#include "CIRGenFunction.h"
+
+#include "clang/AST/StmtVisitor.h"
+
+using namespace clang;
+using namespace clang::CIRGen;
+
+namespace {
+class ComplexExprEmitter : public StmtVisitor
{
+ CIRGenFunction &cgf;
+ CIRGenBuilderTy &bu
@@ -0,0 +1,81 @@
+#include "CIRGenBuilder.h"
+#include "CIRGenFunction.h"
+
+#include "clang/AST/StmtVisitor.h"
+
+using namespace clang;
+using namespace clang::CIRGen;
+
+namespace {
+class ComplexExprEmitter : public StmtVisitor
{
+ CIRGenFunction &cgf;
+ CIRGenBuilderTy &bu
@@ -0,0 +1,81 @@
+#include "CIRGenBuilder.h"
+#include "CIRGenFunction.h"
+
+#include "clang/AST/StmtVisitor.h"
+
+using namespace clang;
+using namespace clang::CIRGen;
+
+namespace {
+class ComplexExprEmitter : public StmtVisitor
{
+ CIRGenFunction &cgf;
+ CIRGenBuilderTy &bu
@@ -255,7 +255,13 @@ void CIRGenFunction::emitExprAsInit(const Expr *init,
const ValueDecl *d,
emitScalarInit(init, getLoc(d->getSourceRange()), lvalue);
return;
case cir::TEK_Complex: {
-cgm.errorNYI(init->getSourceRange(), "emitExprAsInit: complex type");
+
https://github.com/xlauko closed
https://github.com/llvm/llvm-project/pull/143028
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xlauko wrote:
### Merge activity
* **Jun 10, 7:24 AM UTC**: A user started a stack merge that includes this pull
request via
[Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/143028).
https://github.com/llvm/llvm-project/pull/143028
_
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/143262
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/143262
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/143304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/143304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1580,9 +1580,49 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor
adaptor) {
}
//===--===//
-// VecShuffle
+// VecShuffleOp
//===--
@@ -2226,4 +2226,36 @@ def VecTernaryOp : CIR_Op<"vec.ternary",
let hasVerifier = 1;
}
+//===--===//
+// ComplexCreateOp
+//===--===//
+
+d
https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/143028
>From a86eea619ef69932cf017d4ea466bb9008b2f7af Mon Sep 17 00:00:00 2001
From: xlauko
Date: Thu, 5 Jun 2025 21:59:58 +0200
Subject: [PATCH] [CIR][NFC] Use actual operand name in adaptor-obtained
operands
This mi
https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/143028
>From c762c461b5994ca2ccc6c07f413c170781634aea Mon Sep 17 00:00:00 2001
From: xlauko
Date: Thu, 5 Jun 2025 21:59:58 +0200
Subject: [PATCH] [CIR][NFC] Use actual operand name in adaptor-obtained
operands
This mi
https://github.com/xlauko closed
https://github.com/llvm/llvm-project/pull/143024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xlauko wrote:
### Merge activity
* **Jun 6, 7:57 AM UTC**: A user started a stack merge that includes this pull
request via
[Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/143024).
https://github.com/llvm/llvm-project/pull/143024
__
xlauko wrote:
* **#143028** https://app.graphite.dev/github/pr/llvm/llvm-project/143028?utm_source=stack-comment-icon";
target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite"
width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14302
https://github.com/xlauko ready_for_review
https://github.com/llvm/llvm-project/pull/143028
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko created
https://github.com/llvm/llvm-project/pull/143028
This mirrors incubator changes from https://github.com/llvm/clangir/pull/1661
>From 99a25aa458ee70e88bdf23cfe3ebab3828d4d16a Mon Sep 17 00:00:00 2001
From: xlauko
Date: Thu, 5 Jun 2025 21:59:58 +0200
Subject: [P
https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/143024
>From 4e79e49b2e4ea09d202e4c5995194754ae7b5447 Mon Sep 17 00:00:00 2001
From: xlauko
Date: Thu, 5 Jun 2025 21:39:49 +0200
Subject: [PATCH] [CIR][NFC] Use `getType()` instead of more verbose
`getResult().getType(
https://github.com/xlauko ready_for_review
https://github.com/llvm/llvm-project/pull/143024
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xlauko wrote:
* **#143024** https://app.graphite.dev/github/pr/llvm/llvm-project/143024?utm_source=stack-comment-icon";
target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite"
width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14302
https://github.com/xlauko created
https://github.com/llvm/llvm-project/pull/143024
This mirrors incubator changes from https://github.com/llvm/clangir/pull/1662
>From 38c7e537b64329bdb8595653bc97e006d7846bfb Mon Sep 17 00:00:00 2001
From: xlauko
Date: Thu, 5 Jun 2025 21:39:49 +0200
Subject: [P
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/141369
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,41 @@
+
+//===--===//
+//
+// 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
@@ -0,0 +1,41 @@
+
+//===--===//
+//
+// 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
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,41 @@
+
+//===--===//
+//
+// 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
@@ -1883,6 +1884,60 @@ mlir::LogicalResult
CIRToLLVMVecCmpOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite(
+cir::VecSplatOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &rewriter) co
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142823
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142946
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1883,6 +1884,60 @@ mlir::LogicalResult
CIRToLLVMVecCmpOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite(
+cir::VecSplatOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &rewriter) co
@@ -1883,6 +1884,60 @@ mlir::LogicalResult
CIRToLLVMVecCmpOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMVecSplatOpLowering::matchAndRewrite(
+cir::VecSplatOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &rewriter) co
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/142288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142393
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/142393
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xlauko wrote:
Since https://github.com/llvm/llvm-project/pull/14/ was merged, please
mirror additional changes from https://github.com/llvm/clangir/pull/1626 before
merging.
https://github.com/llvm/llvm-project/pull/139827
___
cfe-commits mailing
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/142690
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142591
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/142591
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xlauko wrote:
Can you also add test where condition has different vector element type from
operands?
https://github.com/llvm/llvm-project/pull/142393
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142473
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1597,9 +1598,9 @@ OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor
adaptor) {
elements.reserve(numElements);
const uint64_t maskBits = llvm::NextPowerOf2(numElements - 1) - 1;
-for (uint64_t i = 0; i < numElements; i++) {
- cir::IntAttr idxAttr = m
@@ -1597,9 +1598,9 @@ OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor
adaptor) {
elements.reserve(numElements);
const uint64_t maskBits = llvm::NextPowerOf2(numElements - 1) - 1;
-for (uint64_t i = 0; i < numElements; i++) {
- cir::IntAttr idxAttr = m
@@ -1579,6 +1579,38 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor
adaptor) {
// VecShuffleDynamicOp
//===--===//
+OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) {
+ mlir::Attribute v
@@ -193,6 +193,36 @@ class ScalarExprEmitter : public
StmtVisitor {
e->getSourceRange().getBegin());
}
+ mlir::Value
+ VisitAbstractConditionalOperator(const AbstractConditionalOperator *e) {
+mlir::Location loc = cgf.getLoc(e->getSourc
https://github.com/xlauko deleted
https://github.com/llvm/llvm-project/pull/142393
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1589,6 +1589,24 @@ LogicalResult cir::VecShuffleDynamicOp::verify() {
return success();
}
+//===--===//
+// VecTernaryOp
+//===--===//
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142241
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -193,6 +193,36 @@ class ScalarExprEmitter : public
StmtVisitor {
e->getSourceRange().getBegin());
}
+ mlir::Value
+ VisitAbstractConditionalOperator(const AbstractConditionalOperator *e) {
+mlir::Location loc = cgf.getLoc(e->getSourc
@@ -193,6 +193,36 @@ class ScalarExprEmitter : public
StmtVisitor {
e->getSourceRange().getBegin());
}
+ mlir::Value
+ VisitAbstractConditionalOperator(const AbstractConditionalOperator *e) {
+mlir::Location loc = cgf.getLoc(e->getSourc
@@ -1589,6 +1589,24 @@ LogicalResult cir::VecShuffleDynamicOp::verify() {
return success();
}
+//===--===//
+// VecTernaryOp
+//===--===//
@@ -2190,4 +2190,40 @@ def VecShuffleDynamicOp : CIR_Op<"vec.shuffle.dynamic",
let hasVerifier = 1;
}
+//===--===//
+// VecTernaryOp
+//===
@@ -193,6 +193,36 @@ class ScalarExprEmitter : public
StmtVisitor {
e->getSourceRange().getBegin());
}
+ mlir::Value
+ VisitAbstractConditionalOperator(const AbstractConditionalOperator *e) {
xlauko wrote:
nit: pull out `c
https://github.com/xlauko approved this pull request.
lgtm + minor nits
https://github.com/llvm/llvm-project/pull/142315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1579,6 +1579,38 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor
adaptor) {
// VecShuffleDynamicOp
//===--===//
+OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) {
+ mlir::Attribute v
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/142315
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xlauko wrote:
> * `IntegerVector:$cond` will replaced by `CIR_VectorOfIntType` after merging
> [[CIR][NFC] Upstream VectorType support in helper functionÂ
> #14](https://github.com/llvm/llvm-project/pull/14)
> * there will be a follow up PR for the folder
To simplify these kind of depen
@@ -1579,6 +1579,38 @@ OpFoldResult cir::VecExtractOp::fold(FoldAdaptor
adaptor) {
// VecShuffleDynamicOp
//===--===//
+OpFoldResult cir::VecShuffleDynamicOp::fold(FoldAdaptor adaptor) {
+ mlir::Attribute v
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/14
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/14
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,21 @@
+//===--===//
+//
+// 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: Apac
@@ -2156,6 +2157,52 @@ def VecCmpOp : CIR_Op<"vec.cmp", [Pure,
SameTypeOperands]> {
}];
}
+//===--===//
+// VecShuffleOp
+//===--===//
+
+
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/142288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/142288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,21 @@
+//===--===//
+//
+// 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: Apac
@@ -0,0 +1,21 @@
+//===--===//
+//
+// 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: Apac
xlauko wrote:
> `The size of the result vector does not have to match the size of the
> individual input vectors or of the concatenated vector.`
Quoiting the docs: the result of `__builtin_shufflevector` is a vector with the
same element type as `vec1` and `vec2` but that has an element count
@@ -2156,6 +2156,50 @@ def VecCmpOp : CIR_Op<"vec.cmp", [Pure,
SameTypeOperands]> {
}];
}
+//===--===//
+// VecShuffleOp
+//===--===//
+
+
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/142288
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2156,6 +2156,50 @@ def VecCmpOp : CIR_Op<"vec.cmp", [Pure,
SameTypeOperands]> {
}];
}
+//===--===//
+// VecShuffleOp
+//===--===//
+
+
xlauko wrote:
This partially ports my changes from https://github.com/llvm/clangir/pull/1626
I was originally waiting for other vector stuff to get merged so we don't
conflict. Can you please mirror everything that is applicable from that PR?
https://github.com/llvm/llvm-project/pull/14
__
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/142012
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/141973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/141973
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -276,4 +276,47 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr",
[TypedAttrInterface]> {
}];
}
+//===--===//
+// VisibilityAttr
+//===-
@@ -276,4 +276,47 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr",
[TypedAttrInterface]> {
}];
}
+//===--===//
+// VisibilityAttr
+//===-
@@ -276,4 +276,47 @@ def ConstPtrAttr : CIR_Attr<"ConstPtr", "ptr",
[TypedAttrInterface]> {
}];
}
+//===--===//
+// VisibilityAttr
+//===-
@@ -1643,17 +1644,31 @@ def GlobalOp : CIR_Op<"global"> {
described by the type of the variable.
The `linkage` tracks C/C++ linkage types, currently very similar to LLVM's.
+Symbol visibility in `sym_visibility` is defined in terms of MLIR's
visibility
+and ve
https://github.com/xlauko closed
https://github.com/llvm/llvm-project/pull/141830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xlauko wrote:
### Merge activity
* **May 29, 10:36 AM UTC**: A user started a stack merge that includes this
pull request via
[Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/141830).
https://github.com/llvm/llvm-project/pull/141830
https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/141830
>From d4026ae9fabe8ee8a5d76a69ba5f89a7f1a7c3ff Mon Sep 17 00:00:00 2001
From: xlauko
Date: Wed, 28 May 2025 21:15:58 +0200
Subject: [PATCH 1/3] [CIR] Streamline creation of mlir::IntegerAttrs using
mlir::Builder
https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/141830
>From a58132702ff7b996d805172144ae1f261495c624 Mon Sep 17 00:00:00 2001
From: xlauko
Date: Wed, 28 May 2025 21:15:58 +0200
Subject: [PATCH 1/3] [CIR] Streamline creation of mlir::IntegerAttrs using
mlir::Builder
@@ -428,13 +422,28 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return OpBuilder::InsertPoint(block, block->begin());
};
- mlir::IntegerAttr getSizeFromCharUnits(mlir::MLIRContext *ctx,
- clang::CharUnits size) {
-// N
https://github.com/xlauko updated
https://github.com/llvm/llvm-project/pull/141830
>From a58132702ff7b996d805172144ae1f261495c624 Mon Sep 17 00:00:00 2001
From: xlauko
Date: Wed, 28 May 2025 21:15:58 +0200
Subject: [PATCH 1/2] [CIR] Streamline creation of mlir::IntegerAttrs using
mlir::Builder
https://github.com/xlauko ready_for_review
https://github.com/llvm/llvm-project/pull/141830
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
xlauko wrote:
* **#141830** https://app.graphite.dev/github/pr/llvm/llvm-project/141830?utm_source=stack-comment-icon";
target="_blank">https://static.graphite.dev/graphite-32x32-black.png"; alt="Graphite"
width="10px" height="10px"/> 👈 https://app.graphite.dev/github/pr/llvm/llvm-project/14183
https://github.com/xlauko created
https://github.com/llvm/llvm-project/pull/141830
- Uses getIIntegerAttr builder method instead of explicit attribute
and its type creation.
- Adds few helper functions `getAlignmentAttr` to build alignment representing
mlir::IntegerAttr.
- Removes duplicit typ
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/141700
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -135,6 +135,10 @@ class CIRGenConsumer : public clang::ASTConsumer {
}
}
}
+
+ void CompleteTentativeDefinition(VarDecl *D) override {
+Gen->CompleteTentativeDefinition(D);
+ }
xlauko wrote:
```suggestion
void CompleteTentativeDefinition(V
@@ -1044,6 +1057,24 @@ StringRef CIRGenModule::getMangledName(GlobalDecl gd) {
return mangledDeclNames[canonicalGd] = result.first->first();
}
+void CIRGenModule::emitTentativeDefinition(const VarDecl *d) {
+ assert(!d->getInit() && "Cannot emit definite definitions here!")
https://github.com/xlauko approved this pull request.
lgtm, with minor nits
https://github.com/llvm/llvm-project/pull/141700
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 334 matches
Mail list logo