@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [
// CallOp
//===--===//
+def SE_All : I32EnumAttrCase<"All", 1, "all">;
+def SE_Pure : I32EnumAttrCase<"Pure", 2, "pure">;
+def SE_Const : I32EnumAttrCase<"
https://github.com/Lancern closed
https://github.com/llvm/llvm-project/pull/144376
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/144376
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -49,7 +52,43 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd,
unsigned builtinID,
}
}
+ assert(!cir::MissingFeatures::opCallBuiltin());
Lancern wrote:
Replaced it with several fine-grained missing feature flags.
https://github.com/l
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/144376
>From 74b80387abe26da76d73b81682105228ef3dfc73 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Tue, 17 Jun 2025 23:39:34 +0800
Subject: [PATCH] [CIR] Add support for __builtin_assume
This patch adds support for t
@@ -24,16 +24,17 @@ let cppNamespace = "::cir" in {
def CIRCallOpInterface : OpInterface<"CIRCallOpInterface",
[CallOpInterface]> {
// Currently we don't have any methods defined in CIRCallOpInterface. We'll
// add more methods as the upstreaming proceeds.
-let m
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [
// CallOp
//===--===//
+def SE_All : I32EnumAttrCase<"All", 1, "all">;
Lancern wrote:
Done.
https://github.com/llvm/llvm-project/pull/14
@@ -1940,22 +1975,30 @@ def CallOp : CIR_CallOpBase<"call",
[NoRegionArguments]> {
let arguments = commonArgs;
let builders = [
-// Build a call op for a direct call
-OpBuilder<(ins "mlir::SymbolRefAttr":$callee, "mlir::Type":$resType,
- "mlir::V
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/144201
>From 77d093f1a9c6c6fc742e788f8b05aa9c601480de Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Tue, 17 Jun 2025 22:35:50 +0800
Subject: [PATCH] [CIR] Add support for __builtin_assume
This patch adds support for t
https://github.com/Lancern created
https://github.com/llvm/llvm-project/pull/144376
This patch adds support for the `__builtin_assume` builtin function.
>From 886097329c486b48ceb32ea7ea807e561ad8abdd Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Mon, 16 Jun 2025 23:38:47 +0800
Subject: [PATCH]
https://github.com/Lancern closed
https://github.com/llvm/llvm-project/pull/144226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Lancern wrote:
I'll merge it once the CI is green.
https://github.com/llvm/llvm-project/pull/144226
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -141,3 +141,11 @@ template constexpr auto c() {
}
auto y = c<1>(); // both-note {{in instantiation of function template
specialization 'c<1>' requested here}}
+
+namespace non_constexpr_structured_binding {
Lancern wrote:
Sorry about that... Updated.
ht
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/144226
>From c9649ce4a054cd20b81b12e51f25afa1cfbcf855 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Sat, 14 Jun 2025 22:25:48 +0800
Subject: [PATCH] [clang][Bytecode] Avoid revisiting decomposition decl
---
clang/lib
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/144226
>From 72b99e66ff7b7534604eed5e555ceaf261b3c78e Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Sat, 14 Jun 2025 22:25:48 +0800
Subject: [PATCH] [clang][Bytecode] Avoid revisiting decomposition decl
---
clang/lib
@@ -0,0 +1,8 @@
+// RUN: %clang_cc1 -std=c++17 -verify %s
-fexperimental-new-constant-interpreter
+// RUN: %clang_cc1 -std=c++17 -verify %s
+
+void f1() {
Lancern wrote:
Updated
https://github.com/llvm/llvm-project/pull/144226
__
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/144226
>From 8046031437a5cfafac17c7c9d978c25fb8ed2479 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Sat, 14 Jun 2025 22:25:48 +0800
Subject: [PATCH] [clang][Bytecode] Avoid revisiting decomposition decl
---
clang/lib
https://github.com/Lancern approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/144223
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/144225
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/144225
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/144225
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -44,6 +68,15 @@ void ComplexExprEmitter::emitStoreOfComplex(mlir::Location
loc, mlir::Value val,
builder.createStore(loc, val, destAddr);
}
+mlir::Value ComplexExprEmitter::VisitCallExpr(const CallExpr *e) {
+ if (e->getCallReturnType(cgf.getContext())->isReferenceType(
@@ -34,28 +32,85 @@ namespace clang::CIRGen {
class RValue {
enum Flavor { Scalar, Complex, Aggregate };
- // Stores first value and flavor.
- llvm::PointerIntPair v1;
- // Stores second value and volatility.
- llvm::PointerIntPair, 1, bool> v2;
- // Stores element type
https://github.com/Lancern created
https://github.com/llvm/llvm-project/pull/144226
This simple patch removes the code to revisit `DecompositionDecl` in
`visitDeclRef`. The revisit will try to emit the initializer of the
`DecompositionDecl`, which could result in evaluation errors if the
`Dec
https://github.com/Lancern created
https://github.com/llvm/llvm-project/pull/144201
This patch adds `side_effect` attribute to `cir.call` operation.
Other function call attributes will be added in later patches.
>From ccf7371db9793ac980093fb3a43f24a7e9b176e7 Mon Sep 17 00:00:00 2001
From: Siru
https://github.com/Lancern closed
https://github.com/llvm/llvm-project/pull/143377
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo
&funcInfo,
assert(!cir::MissingFeatures::opCallBitcastArg());
cirCallArgs[argNo] = v;
} else {
- assert(!cir::MissingFeatures::opCallAggregateArgs());
- cgm.errorNYI("emitCa
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/143377
>From f524308595a06833b7e58f0138f281c7da84 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Mon, 9 Jun 2025 18:35:08 +0800
Subject: [PATCH] [CIR] Function calls with aggregate arguments and return
values
This
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo
&funcInfo,
assert(!cir::MissingFeatures::opCallBitcastArg());
cirCallArgs[argNo] = v;
} else {
- assert(!cir::MissingFeatures::opCallAggregateArgs());
- cgm.errorNYI("emitCa
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/143377
>From e45c2ad46d7589ae1c7aa78b3ea19f7c6e5df094 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Mon, 9 Jun 2025 18:35:08 +0800
Subject: [PATCH] [CIR] Function calls with aggregate arguments and return
values
This
Lancern wrote:
Ping. Does this PR still get a chance to be merged?
https://github.com/llvm/llvm-project/pull/75937
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/75937
>From 8924617e16a035730c4c33f17c726dd5e5bb5f00 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Tue, 19 Dec 2023 22:24:23 +0800
Subject: [PATCH] [clangd][Sema] add noexcept to override functions during code
complet
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/143377
>From 2296d60a753de77415ad4b95e35509bbf3bd437b Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Mon, 9 Jun 2025 18:35:08 +0800
Subject: [PATCH] [CIR] Function calls with aggregate arguments and return
values
This
https://github.com/Lancern approved this pull request.
https://github.com/llvm/llvm-project/pull/143639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -21,6 +21,88 @@
using namespace clang;
using namespace clang::CIRGen;
+/// Checks whether the given constructor is a valid subject for the
+/// complete-to-base constructor delgation optimization, i.e. emitting the
+/// complete constructor as a simple call to the base cons
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/143377
>From df020dfa578d504521c1178dcc161a651eb0b0fa Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Mon, 9 Jun 2025 18:35:08 +0800
Subject: [PATCH] [CIR] Function calls with aggregate arguments and return
values
This
@@ -0,0 +1,78 @@
+// RUN: %clang_cc1 -std=c++11 -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 -std=c++11 -triple x86_64-unknown-linux-gnu
-Wno-unused-value -fcla
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/142981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -229,6 +231,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
cir::IntType getUInt32Ty() { return typeCache.UInt32Ty; }
cir::IntType getUInt64Ty() { return typeCache.UInt64Ty; }
+ cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal);
+
+ cir
https://github.com/Lancern approved this pull request.
LGTM except 2 nits
https://github.com/llvm/llvm-project/pull/142981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/143639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -496,6 +496,47 @@ cir::FuncOp CIRGenFunction::generateCode(clang::GlobalDecl
gd, cir::FuncOp fn,
return fn;
}
+void CIRGenFunction::emitConstructorBody(FunctionArgList &args) {
+ assert(!cir::MissingFeatures::sanitizers());
+ const auto *ctor = cast(curGD.getDecl());
+
https://github.com/Lancern requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/143639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -21,6 +21,88 @@
using namespace clang;
using namespace clang::CIRGen;
+/// Checks whether the given constructor is a valid subject for the
+/// complete-to-base constructor delgation optimization, i.e. emitting the
+/// complete constructor as a simple call to the base cons
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/143639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/143377
>From 2999e0180e22724fc1a7247c9ed3520a8b2349dc Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Mon, 9 Jun 2025 18:35:08 +0800
Subject: [PATCH] [CIR] Function calls with aggregate arguments and return
values
This
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo
&funcInfo,
assert(!cir::MissingFeatures::opCallBitcastArg());
cirCallArgs[argNo] = v;
} else {
- assert(!cir::MissingFeatures::opCallAggregateArgs());
- cgm.errorNYI("emitCa
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo
&funcInfo,
assert(!cir::MissingFeatures::opCallBitcastArg());
cirCallArgs[argNo] = v;
} else {
- assert(!cir::MissingFeatures::opCallAggregateArgs());
- cgm.errorNYI("emitCa
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/143377
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/143377
>From ea7297baf0d801f892065523749903a14aa59ee0 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Mon, 9 Jun 2025 18:35:08 +0800
Subject: [PATCH] [CIR] Function calls with aggregate arguments and return
values
This
@@ -312,8 +329,47 @@ RValue CIRGenFunction::emitCall(const CIRGenFunctionInfo
&funcInfo,
assert(!cir::MissingFeatures::opCallBitcastArg());
cirCallArgs[argNo] = v;
} else {
- assert(!cir::MissingFeatures::opCallAggregateArgs());
- cgm.errorNYI("emitCa
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/143377
>From fc98c3d1e0995d5519a4cb5313affd07f088ab44 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Mon, 9 Jun 2025 18:35:08 +0800
Subject: [PATCH] [CIR] Function calls with aggregate arguments and return
values
This
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/143377
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern created
https://github.com/llvm/llvm-project/pull/143377
This patch updates cir.call operation and allows function calls with aggregate
arguments and return values.
It seems that C++ class support is still at a minimum now. I try to make a call
to a C++ function wit
https://github.com/Lancern closed
https://github.com/llvm/llvm-project/pull/141942
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -409,6 +409,18 @@ void CIRGenFunction::emitCallArg(CallArgList &args, const
clang::Expr *e,
args.add(emitAnyExprToTemp(e), argType);
}
+QualType CIRGenFunction::getVarArgType(const Expr *arg) {
+ // System headers on Windows define NULL to 0 instead of 0LL on Win64. MSV
@@ -39,6 +39,26 @@ class RequiredArgs {
bool allowsOptionalArgs() const { return numRequired != ~0U; }
+ /// Compute the arguments required by the given formal prototype, given that
+ /// there may be some additional, non-formal arguments in play.
+ ///
+ /// If FD is n
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/141942
>From 862cb3bd98bc2ed6a6b01efe0f08ebfaf8ad63e0 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Thu, 29 May 2025 17:21:06 +0800
Subject: [PATCH] [CIR] Call to variadic functions
---
clang/include/clang/CIR/Missin
https://github.com/Lancern created
https://github.com/llvm/llvm-project/pull/141942
This PR adds support for calling variadic functions in CIR.
>From 800e4b1a02520e4c3137a02e284cc8406cf36602 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Thu, 29 May 2025 17:21:06 +0800
Subject: [PATCH] [CIR] Ca
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/140612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -72,16 +68,15 @@ class RequiredArgs {
class CIRGenFunctionInfo final
: public llvm::FoldingSetNode,
- private llvm::TrailingObjects {
- using ArgInfo = CIRGenFunctionInfoArgInfo;
-
+ private llvm::TrailingObjects {
Lancern wrote:
It would be
https://github.com/Lancern approved this pull request.
LGTM with one nit
https://github.com/llvm/llvm-project/pull/140612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern closed
https://github.com/llvm/llvm-project/pull/139748
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/139748
>From 71009b450a333d4537d9a84176707656c5bdcea1 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Thu, 15 May 2025 23:01:18 +0800
Subject: [PATCH] [CIR] Add support for indirect calls
---
.../CIR/Dialect/Builder/CI
@@ -1148,6 +1146,35 @@ mlir::Value CIRGenFunction::emitAlloca(StringRef name,
mlir::Type ty,
return addr;
}
+// Note: this function also emit constructor calls to support a MSVC extensions
+// allowing explicit constructor function call.
+RValue CIRGenFunction::emitCXXMembe
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/140290
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern approved this pull request.
https://github.com/llvm/llvm-project/pull/140290
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern approved this pull request.
https://github.com/llvm/llvm-project/pull/140290
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1500,6 +1507,14 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter
&converter,
converter.addConversion([&](cir::BF16Type type) -> mlir::Type {
return mlir::BFloat16Type::get(type.getContext());
});
+ converter.addConversion([&](cir::FuncType type) -> mlir
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/139748
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/139748
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern edited
https://github.com/llvm/llvm-project/pull/139748
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -937,8 +937,28 @@ CIRGenCallee CIRGenFunction::emitCallee(const clang::Expr
*e) {
return emitDirectCallee(cgm, funcDecl);
}
- cgm.errorNYI(e->getSourceRange(), "Unsupported callee kind");
- return {};
+ assert(!cir::MissingFeatures::opCallPseudoDtor());
@@ -539,15 +573,16 @@ mlir::ParseResult cir::CallOp::parse(mlir::OpAsmParser
&parser,
}
void cir::CallOp::print(mlir::OpAsmPrinter &p) {
- printCallCommon(*this, getCalleeAttr(), p);
+ mlir::Value indirectCallee = isIndirect() ? getIndirectCall() : nullptr;
+ printCallComm
@@ -464,15 +464,35 @@ OpFoldResult cir::CastOp::fold(FoldAdaptor adaptor) {
// CallOp
//===--===//
+mlir::OperandRange cir::CallOp::getArgOperands() {
+ if (isIndirect())
+return getArgs().drop_front(1);
@@ -1861,13 +1867,23 @@ def CallOp : CIR_CallOpBase<"call",
[NoRegionArguments]> {
let arguments = commonArgs;
let builders = [OpBuilder<(ins "mlir::SymbolRefAttr":$callee,
- "mlir::Type":$resType,
- "mlir::V
@@ -1861,13 +1867,23 @@ def CallOp : CIR_CallOpBase<"call",
[NoRegionArguments]> {
let arguments = commonArgs;
let builders = [OpBuilder<(ins "mlir::SymbolRefAttr":$callee,
- "mlir::Type":$resType,
- "mlir::V
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/139748
>From 614849751f24c47c6da53ebc1fb296b806223557 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Thu, 15 May 2025 23:01:18 +0800
Subject: [PATCH] [CIR] Add support for indirect calls
---
.../CIR/Dialect/Builder/CI
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/139748
>From eb08d386728d1d9876f68dc40b4042bace9e5d5c Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Thu, 15 May 2025 23:01:18 +0800
Subject: [PATCH] [CIR] Add support for indirect calls
---
.../CIR/Dialect/Builder/CI
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/139748
>From 8c6a8c37037634ea48eb94e022cd76c0cececb84 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Thu, 15 May 2025 23:01:18 +0800
Subject: [PATCH] [CIR] Add support for indirect calls
---
.../CIR/Dialect/Builder/CI
@@ -1500,6 +1507,14 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter
&converter,
converter.addConversion([&](cir::BF16Type type) -> mlir::Type {
return mlir::BFloat16Type::get(type.getContext());
});
+ converter.addConversion([&](cir::FuncType type) -> mlir
@@ -1837,16 +1835,24 @@ class CIR_CallOpBase
extra_traits = []>
// the upstreaming process moves on. The verifiers is also missing for now,
// will add in the future.
- dag commonArgs = (ins FlatSymbolRefAttr:$callee,
-Variadic:$args);
+ dag comm
@@ -1500,6 +1507,14 @@ static void prepareTypeConverter(mlir::LLVMTypeConverter
&converter,
converter.addConversion([&](cir::BF16Type type) -> mlir::Type {
return mlir::BFloat16Type::get(type.getContext());
});
+ converter.addConversion([&](cir::FuncType type) -> mlir
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/139748
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
https://github.com/Lancern created
https://github.com/llvm/llvm-project/pull/139748
This PR adds support for indirect calls to the `cir.call` operation.
>From 786327894695a73ec80ec256892ca51e68fa5389 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Tue, 13 May 2025 23:02:08 +0800
Subject: [PATCH]
https://github.com/Lancern approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/136854
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern closed
https://github.com/llvm/llvm-project/pull/138873
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern approved this pull request.
https://github.com/llvm/llvm-project/pull/139159
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/138873
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-family: -apple-system,BlinkMacSystemFont,Segoe
UI,Helvetica,Arial,sans-s
https://github.com/Lancern created
https://github.com/llvm/llvm-project/pull/138873
This PR adds LLVMIR lowering support for the `cir.call` operation.
Rate limit · GitHub
body {
background-color: #f6f8fa;
color: #24292e;
font-famil
https://github.com/Lancern closed
https://github.com/llvm/llvm-project/pull/136810
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
Lancern wrote:
Rebased onto the latest `main`. Will land later if no one have more comments.
https://github.com/llvm/llvm-project/pull/136810
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-co
@@ -446,8 +446,31 @@ OpFoldResult cir::CastOp::fold(FoldAdaptor adaptor) {
// CallOp
//===--===//
+mlir::Operation::operand_iterator cir::CallOp::arg_operand_begin() {
+ assert(!cir::MissingFeatures::opCallI
@@ -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.
@@ -1516,6 +1520,41 @@ class CIR_CallOpBase
extra_traits = []>
!listconcat(extra_traits,
[DeclareOpInterfaceMethods,
DeclareOpInterfaceMethods])> {
+ let extraClassDeclaration = [{
+/// Get the argument operands to the c
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/136810
>From e5e7bd931dd409546d04237bd61eab67d6ba6451 Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Fri, 2 May 2025 00:31:08 +0800
Subject: [PATCH] [CIR] Upstream cir.call with scalar arguments
---
.../CIR/Dialect/Bu
https://github.com/Lancern updated
https://github.com/llvm/llvm-project/pull/136810
>From e9334137d0d1b968ac4d0e59af9f1b04e6b639ac Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Fri, 2 May 2025 00:31:08 +0800
Subject: [PATCH] [CIR] Upstream cir.call with scalar arguments
---
.../CIR/Dialect/Bu
@@ -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/Lancern updated
https://github.com/llvm/llvm-project/pull/136810
>From 6fa07927f48cc820fe7babe6d85a32e8e6cc781b Mon Sep 17 00:00:00 2001
From: Sirui Mu
Date: Wed, 23 Apr 2025 12:14:40 +0800
Subject: [PATCH] [CIR] Upstream cir.call with scalar arguments
---
.../CIR/Dialect/B
@@ -17,3 +17,15 @@ int f4() {
// CHECK-LABEL: cir.func @f4() -> !s32i
// CHECK: %[[#x:]] = cir.call @f3() : () -> !s32i
// CHECK-NEXT:cir.store %[[#x]], %{{.+}} : !s32i, !cir.ptr
+
+int f5(int a, int *b, bool c);
+int f6() {
+ int b = 1;
+ return f5(2, &b, false);
1 - 100 of 190 matches
Mail list logo