[clang] [CIR] Upstream initial support for CIR flattening (PR #130648)

2025-03-11 Thread Bruno Cardoso Lopes via cfe-commits
@@ -428,6 +428,46 @@ def ScopeOp : CIR_Op<"scope", [ ]; } +//===--===// +// BrOp +//===--===// + +def BrOp : CIR_Op<"br",

[clang] [CIR] Upstream basic support for ArrayType (PR #130502)

2025-03-11 Thread Bruno Cardoso Lopes via cfe-commits
@@ -280,6 +280,25 @@ def CIR_BoolType : }]; } +//===--===// +// ArrayType +//===--===// + +def CIR_ArrayType : CIR_Type<"Array", "array", +

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -117,6 +117,24 @@ static void printOmittedTerminatorRegion(mlir::OpAsmPrinter &printer, /*printBlockTerminators=*/!omitRegionTerm(region)); } +//===--===// +// AllocaOp +//===

[clang] [CIR] Upstream basic alloca and load support (PR #128792)

2025-02-27 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,82 @@ +//===--===// +// +// 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

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM pending on question left in one comment https://github.com/llvm/llvm-project/pull/130690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/130690 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream CastOp and scalar conversions (PR #130690)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,58 @@ +// RUN: %clang_cc1 -std=c++17 -triple x86_64-unknown-linux-gnu -fclangir -emit-cir %s -o %t.cir bcardosolopes wrote: Has this been addressed? https://github.com/llvm/llvm-project/pull/130690 ___ cfe

[clang] [CIR] Add cir-translate and cir-lsp-server tools (PR #131181)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,166 @@ +//===--===// +// +// 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

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-13 Thread Bruno Cardoso Lopes via cfe-commits
@@ -11,6 +11,9 @@ add_clang_library(clangCIRFrontendAction DEPENDS MLIRCIROpsIncGen MLIRCIROpInterfacesIncGen + # Add mlir-generic-headers dependency as the header CIRGenAction.h needs to + # include BuiltinOps.h + mlir-generic-headers bcardosolopes wr

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1,7 +1,9 @@ // 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 %

[clang] [CIR] Upstream global variable linkage types (PR #129072)

2025-03-05 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: Looks like ready to land, @mmha do you have landing permission? https://github.com/llvm/llvm-project/pull/129072 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/130869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,53 @@ +// 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

[clang] [CIR] Upstream support for emitting ignored statements (PR #130869)

2025-03-12 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/130869 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-03-17 Thread Bruno Cardoso Lopes via cfe-commits
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

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-17 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/131057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add cir-translate and cir-lsp-server tools (PR #131181)

2025-03-17 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/131181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][CIR] Add missing dependency on MLIR headers (PR #131057)

2025-03-17 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes closed https://github.com/llvm/llvm-project/pull/131057 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-03-20 Thread Bruno Cardoso Lopes via cfe-commits
@@ -52,6 +52,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return cir::BoolAttr::get(getContext(), getBoolTy(), state); } + /// Create a for operation. + cir::ForOp createFor( + mlir::Location loc, + llvm::function_ref condBuilder,

[clang] [CIR] Fix unary op folding (PR #132269)

2025-03-20 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, the only difference from incubator is the misleading comment, thanks Andy! Will update comment over there as well. https://github.com/llvm/llvm-project/pull/132269 ___ cfe-commits mail

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-03-24 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after nit https://github.com/llvm/llvm-project/pull/132468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add binary operators (PR #132420)

2025-03-24 Thread Bruno Cardoso Lopes via cfe-commits
@@ -143,6 +147,114 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return createCast(loc, cir::CastKind::bitcast, src, newTy); } + mlir::Value createBinop(mlir::Value lhs, cir::BinOpKind kind, + const llvm::APInt &rhs) { +return create(

[clang] [CIR] Add binary operators (PR #132420)

2025-03-24 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/132420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-28 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. I don't have anything else to add, LGTM! https://github.com/llvm/llvm-project/pull/132974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -710,6 +710,89 @@ class ScalarExprEmitter : public StmtVisitor { HANDLEBINOP(Xor) HANDLEBINOP(Or) #undef HANDLEBINOP + + mlir::Value emitCmp(const BinaryOperator *e) { +mlir::Value result; +QualType lhsTy = e->getLHS()->getType(); +QualType rhsTy = e->getRH

[clang] [CIR][Upstream] Local initialization for ArrayType (PR #132974)

2025-03-29 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/132974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after other reviews are applied. https://github.com/llvm/llvm-project/pull/134181 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-28 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Thanks for the updates, LGTM! 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-comm

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -759,6 +761,84 @@ def BrCondOp : CIR_Op<"brcond", }]; } +//===--===// +// While & DoWhileOp +//===--===// + +class WhileOpBase : CIR_Op

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-03-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -759,6 +762,46 @@ LogicalResult cir::BinOp::verify() { return mlir::success(); } +//===--===// +// ShiftOp +//===--===// +LogicalResult

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-03-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1117,6 +1117,91 @@ mlir::LogicalResult CIRToLLVMBinOpLowering::matchAndRewrite( return mlir::LogicalResult::success(); } +mlir::LogicalResult CIRToLLVMShiftOpLowering::matchAndRewrite( +cir::ShiftOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewrit

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-03-28 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited 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

[clang] [CIR] Upstream SelectOp and ShiftOp (PR #133405)

2025-03-29 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes requested changes to this pull request. Looks reasonable to add vector support later for shifts. Because `SelectOp` is independent of `ShiftOp`, one possibility would have been to split it in two PRs to land them faster, but wouldn't bother changing for this rou

[clang] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-04-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -405,3 +405,45 @@ float fpPostInc2() { // OGCG: store float %[[A_INC]], ptr %[[A]], align 4 // OGCG: store float %[[A_LOAD]], ptr %[[B]], align 4 // OGCG: %[[B_TO_OUTPUT:.*]] = load float, ptr %[[B]], align 4 + +_Float16 fp16UPlus(_Float16 f) { + return +f; +} + +// C

[clang] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-04-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -405,3 +405,45 @@ float fpPostInc2() { // OGCG: store float %[[A_INC]], ptr %[[A]], align 4 // OGCG: store float %[[A_LOAD]], ptr %[[B]], align 4 // OGCG: %[[B_TO_OUTPUT:.*]] = load float, ptr %[[B]], align 4 + +_Float16 fp16UPlus(_Float16 f) { + return +f; +} + +// C

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -265,3 +265,125 @@ void test_empty_while_true() { // OGCG: br label %[[WHILE_BODY:.*]] // OGCG: [[WHILE_BODY]]: // OGCG: ret void + +void unreachable_after_continue() { + for (;;) { +continue; +int x = 1; + } +} + +// CIR: cir.func @unreachable_after_continue +

[clang] [CIR] Upstream support for break and continue statements (PR #134181)

2025-04-03 Thread Bruno Cardoso Lopes via cfe-commits
@@ -265,3 +265,125 @@ void test_empty_while_true() { // OGCG: br label %[[WHILE_BODY:.*]] // OGCG: [[WHILE_BODY]]: // OGCG: ret void + +void unreachable_after_continue() { + for (;;) { +continue; +int x = 1; + } +} + +// CIR: cir.func @unreachable_after_continue +

[clang] [CIR] Upstream support for promoted types with unary plus/minus (PR #133829)

2025-04-03 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/133829 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { bcardosolopes wr

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -135,6 +135,55 @@ mlir::Location CIRGenFunction::getLoc(mlir::Location lhs, mlir::Location rhs) { return mlir::FusedLoc::get(locs, metadata, &getMLIRContext()); } +bool CIRGenFunction::ContainsLabel(const Stmt *s, bool ignoreCaseStmts) { + // Null statement, not a label

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: @Andres-Salamanca thanks for working on this. We usually write tests that exercise any possible different paths codegen can take. For next rounds: it's fine if you add less things in one go and make it more incremental with the use of (a) errorNYI and (b) assert on missing

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -442,6 +457,25 @@ class CIRGenFunction : public CIRGenTypeCache { mlir::LogicalResult emitDeclStmt(const clang::DeclStmt &s); LValue emitDeclRefLValue(const clang::DeclRefExpr *e); + /// Emit an if on a boolean condition to the specified blocks. + /// FIXME: Based on

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/134333 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -263,6 +264,72 @@ static void terminateBody(CIRGenBuilderTy &builder, mlir::Region &r, b->erase(); } +mlir::LogicalResult CIRGenFunction::emitIfStmt(const IfStmt &s) { + mlir::LogicalResult res = mlir::success(); + // The else branch of a consteval if statement is al

[clang] [CIR] Add if statement support (PR #134333)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -462,6 +462,58 @@ def ReturnOp : CIR_Op<"return", [ParentOneOf<["FuncOp", "ScopeOp", "DoWhileOp", let hasVerifier = 1; } +//===--===// +// IfOp +//===-

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -193,8 +334,23 @@ LValue CIRGenFunction::emitUnaryOpLValue(const UnaryOperator *e) { switch (op) { case UO_Deref: { -cgm.errorNYI(e->getSourceRange(), "UnaryOp dereference"); -return LValue(); +QualType t = e->getSubExpr()->getType()->getPointeeType(); +

[clang] [CIR] Upstream support for address of and dereference (PR #134317)

2025-04-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM pending discussion with Eli https://github.com/llvm/llvm-project/pull/134317 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: I have only minor inline comments, good direction. The PR is a bit big but I can see this requires touching everywhere in CIRGen and also LLVM lowering support, which is good end-to-end testing. If there are things there are not needed right now, it'

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Bruno Cardoso Lopes via cfe-commits
@@ -32,6 +32,16 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, attr.getType(), attr); } + cir::ConstantOp getConstantInt(mlir::Location loc, mlir::Type ty, + int64_t value) { +return create(loc, ty, cir::IntAt

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/132974 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] [Upstream local initialization for ArrayType (PR #132974)

2025-03-25 Thread Bruno Cardoso Lopes via cfe-commits
@@ -229,6 +236,40 @@ def CastOp : CIR_Op<"cast", let hasFolder = 1; } + +//===--===// +// PtrStrideOp +//===--===// + +def PtrStrideOp : CI

[clang] [CIR][NFC] Organize emit functions in CIRGenFunction.h (PR #133017)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/133017 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -67,6 +67,40 @@ class CIRBaseBuilderTy : public mlir::OpBuilder { return create(loc, attr.getType(), attr); } + mlir::TypedAttr getConstNullPtrAttr(mlir::Type t) { +assert(mlir::isa(t) && "expected cir.ptr"); +return getConstPtrAttr(t, 0); + } + + mlir::Typ

[clang] [CIR] Add BinOpOverflowOp and basic pointer arithmetic support (PR #133118)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1117,6 +1118,122 @@ mlir::LogicalResult CIRToLLVMBinOpLowering::matchAndRewrite( return mlir::LogicalResult::success(); } +mlir::LogicalResult CIRToLLVMBinOpOverflowOpLowering::matchAndRewrite( +cir::BinOpOverflowOp op, OpAdaptor adaptor, +mlir::ConversionPatter

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Overall looks fine! 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

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/133157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Fix warnings in ClangIR code (PR #133134)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/133134 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Looks straight-forward to me, one minor nit! https://github.com/llvm/llvm-project/pull/133157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -759,6 +761,84 @@ def BrCondOp : CIR_Op<"brcond", }]; } +//===--===// +// While & DoWhileOp +//===--===// + +class WhileOpBase : CIR_Op

[clang] [CIR] Upstream zero init for global variables (PR #133100)

2025-03-26 Thread Bruno Cardoso Lopes via cfe-commits
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

[clang] [CIR] Upstream CmpOp (PR #133159)

2025-03-26 Thread Bruno Cardoso Lopes via 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.

[clang] [CIR] Upstream support for while and do..while loops (PR #133157)

2025-03-28 Thread Bruno Cardoso Lopes via cfe-commits
@@ -759,6 +761,84 @@ def BrCondOp : CIR_Op<"brcond", }]; } +//===--===// +// While & DoWhileOp +//===--===// + +class WhileOpBase : CIR_Op

[clang] [CIR] Upstream initial support for unary op (PR #131369)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > The git history says the FIXME about "Pure" was added when @cmarcelo > introduced `UnaryOp` in the incubator, but there is no PR associated with the > commit so I don't know what discussions may have taken place. We floated the idea of implementing operators as part of `

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/132266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add binary operators (PR #132420)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/132420 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
@@ -293,7 +294,8 @@ void CIRGenFunction::startFunction(GlobalDecl gd, QualType returnType, mlir::Value addrVal = emitAlloca(cast(paramVar)->getName(), - convertType(paramVar->getType()), paramLoc, alignment); + convertType(param

[clang] [CIR] Emit allocas into the proper lexical scope (PR #132468)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes edited https://github.com/llvm/llvm-project/pull/132468 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream initial for-loop support (PR #132266)

2025-04-05 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. https://github.com/llvm/llvm-project/pull/132266 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    2   3   4   5   6   7