[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2037,4 +2037,37 @@ def VecExtractOp : CIR_Op<"vec.extract", [Pure, let hasFolder = 1; } + +//===--===// +// VecSplat +//===--===// + +/

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2037,4 +2037,37 @@ def VecExtractOp : CIR_Op<"vec.extract", [Pure, let hasFolder = 1; } + +//===--===// +// VecSplat +//===--===// + +/

[clang] [CIR][LLVMLowering] Upstream binary operators for VectorType (PR #140099)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after you address Andy's comments https://github.com/llvm/llvm-project/pull/140099 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo

[clang] [CIR] Upstream support for C++ member function calls (PR #140290)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,45 @@ +//===- CirGenCXXABI.cpp - Interface to C++ ABIs ---===// +// +// 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] [CIR] Upstream support for C++ member function calls (PR #140290)

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

[clang] [CIR] Upstream support for C++ member function calls (PR #140290)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,45 @@ +//===- CirGenCXXABI.cpp - Interface to C++ ABIs ---===// bcardosolopes wrote: `CIRGenCXXABI.cpp` to match the name of the file? (Or I guess none because this isn't required anymore?) https://github.com/llvm/llvm-projec

[clang] [CIR] Upstream support for C++ member function calls (PR #140290)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -76,11 +77,30 @@ static void appendParameterTypes(const CIRGenTypes &cgt, cgt.getCGModule().errorNYI("appendParameterTypes: hasExtParameterInfos"); } +/// Derives the 'this' type for CIRGen purposes, i.e. ignoring method CVR +/// qualification. Either or both of `rd` and

[clang] [CIR] Upstream support for C++ member function calls (PR #140290)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -109,6 +109,14 @@ struct CallArg { class CallArgList : public llvm::SmallVector { public: void add(RValue rvalue, clang::QualType type) { emplace_back(rvalue, type); } + + /// Add all the arguments from another CallArgList to this one. After doing + /// this, the old Cal

[clang] [CIR] Upstream support for C++ member function calls (PR #140290)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Some nits / comments, but this LGTM to me: skeleton for member function calls added, errorNYI used for untested paths and some initial support for the more simple cases. https://github.com/llvm/llvm-project/pull/140290 __

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

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

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

2025-05-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -36,6 +37,76 @@ template constexpr bool isCombinedType = false; template constexpr bool isCombinedType> = true; +namespace { +struct DataOperandInfo { + mlir::Location beginLoc; + mlir::Value varValue; + llvm::StringRef name; + mlir::ValueRange bounds; + + DataOpera

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -36,6 +37,76 @@ template constexpr bool isCombinedType = false; template constexpr bool isCombinedType> = true; +namespace { +struct DataOperandInfo { + mlir::Location beginLoc; + mlir::Value varValue; + llvm::StringRef name; + mlir::ValueRange bounds; + + DataOpera

[clang] [OpenACC][CIR] Implement beginning of 'copy' lowering for compute con… (PR #140304)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. > @bcardosolopes : If it is alright, I'd like to just do the OpenACC clause > refactor in a followup patch. I'll work on it 'next', immediately after this > one. I'd originally done the visitor, then realized it needed to be accessed

[clang] [NFC][OpenACC] Refactor clause emission- (PR #140586)

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

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-19 Thread Bruno Cardoso Lopes via 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

[clang] [CIR] Add support for indirect calls (PR #139748)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM (pending error propagation) 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-c

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -135,4 +135,38 @@ cir.func @vector_insert_element_test() { // CHECK:cir.return // CHECK: } +cir.func @vector_splat_test() { +%0 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["a", init] +%1 = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["shl", init] +

[clang] [CIR] Upstream support for lowering cir.switch to LLVM (PR #140425)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM after you address Andy's nits. https://github.com/llvm/llvm-project/pull/140425 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cf

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

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

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2083,4 +2083,33 @@ def VecExtractOp : CIR_Op<"vec.extract", [Pure, let hasFolder = 1; } +//===--===// +// VecCmpOp +//===--===// + +def

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -2083,4 +2083,33 @@ def VecExtractOp : CIR_Op<"vec.extract", [Pure, let hasFolder = 1; } +//===--===// +// VecCmpOp +//===--===// + +def

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

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

[clang] [CIR] Upstream comparison ops for VectorType (PR #140597)

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

[clang] [CIR][NFC] Eliminate ArgInfo structure (PR #140612)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. 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

[clang] [CIR][NFC] Eliminate ArgInfo structure (PR #140612)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -542,8 +542,15 @@ CIRGenTypes::arrangeCIRFunctionInfo(CanQualType returnType, void *insertPos = nullptr; CIRGenFunctionInfo *fi = functionInfos.FindNodeOrInsertPos(id, insertPos); - if (fi) + if (fi) { +// We found a matching function info based on id. These asser

[clang] [CIR] Upstream support for iterator-based range for loops (PR #140636)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Pretty much straightforward - some skeletons with NYI + the actual range for support. LGTM https://github.com/llvm/llvm-project/pull/140636 ___ cfe-commits mailing list cfe-commits@lists.llv

[clang] Implement CIR switch case simplify with appropriate tests (PR #140649)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes commented: Overall looks good, some inline comments. https://github.com/llvm/llvm-project/pull/140649 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Implement CIR switch case simplify with appropriate tests (PR #140649)

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

[clang] Implement CIR switch case simplify with appropriate tests (PR #140649)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -159,6 +159,107 @@ struct SimplifySelect : public OpRewritePattern { } }; +/// Simplify `cir.switch` operations by folding cascading cases +/// into a single `cir.case` with the `anyof` kind. +/// +/// This pattern identifies cascading cases within a `cir.switch` operati

[clang] Implement CIR switch case simplify with appropriate tests (PR #140649)

2025-05-19 Thread Bruno Cardoso Lopes via cfe-commits
@@ -186,7 +288,7 @@ void CIRSimplifyPass::runOnOperation() { // Collect operations to apply patterns. llvm::SmallVector ops; getOperation()->walk([&](Operation *op) { -if (isa(op)) +if (isa(op)) bcardosolopes wrote: Can you double check if the te

[clang] [CIR] Implement switch case simplify (PR #140649)

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

[clang] [CIR] Upstream lowering of conditional operators to TernaryOp (PR #138156)

2025-05-21 Thread Bruno Cardoso Lopes via cfe-commits
@@ -948,6 +950,165 @@ void CIRGenFunction::emitIgnoredExpr(const Expr *e) { emitLValue(e); } +// Handle the case where the condition is a constant evaluatable simple integer, +// which means we don't have to separately handle the true/false blocks. +static std::optional han

[clang] [CIR] Allow use different Int types together in Vec Shift Op (PR #141111)

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

[clang] [CIR] Add alignment support for global, store, and load ops (PR #141163)

2025-05-23 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, long needed. Thanks for changing the incubator too. https://github.com/llvm/llvm-project/pull/141163 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-18 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM once all existing comments are addressed. https://github.com/llvm/llvm-project/pull/142041 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/

[clang] [CIR] Implement folder for VecSplatOp (PR #143771)

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

[clang] [CIR] Add support for member initialization from constructors (PR #144583)

2025-06-18 Thread Bruno Cardoso Lopes via cfe-commits
@@ -53,19 +53,135 @@ bool CIRGenFunction::isConstructorDelegationValid( return true; } +static void emitLValueForAnyFieldInitialization(CIRGenFunction &cgf, +CXXCtorInitializer *memberInit, +

[clang] [CIR] Add support for member initialization from constructors (PR #144583)

2025-06-18 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM module few nits https://github.com/llvm/llvm-project/pull/144583 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for member initialization from constructors (PR #144583)

2025-06-18 Thread Bruno Cardoso Lopes via cfe-commits
@@ -84,6 +200,34 @@ Address CIRGenFunction::loadCXXThisAddress() { return Address(loadCXXThis(), cxxThisAlignment); } +void CIRGenFunction::emitInitializerForField(FieldDecl *field, LValue lhs, + Expr *init) { + QualType fieldType

[clang] [CIR] Add support for member initialization from constructors (PR #144583)

2025-06-18 Thread Bruno Cardoso Lopes via cfe-commits
@@ -53,19 +53,135 @@ bool CIRGenFunction::isConstructorDelegationValid( return true; } +static void emitLValueForAnyFieldInitialization(CIRGenFunction &cgf, +CXXCtorInitializer *memberInit, +

[clang] [CIR] Add support for member initialization from constructors (PR #144583)

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

[clang] [CIR] Add support for member initialization from constructors (PR #144583)

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

[clang] [CIR] Add support for member initialization from constructors (PR #144583)

2025-06-18 Thread Bruno Cardoso Lopes via cfe-commits
@@ -53,19 +53,135 @@ bool CIRGenFunction::isConstructorDelegationValid( return true; } +static void emitLValueForAnyFieldInitialization(CIRGenFunction &cgf, +CXXCtorInitializer *memberInit, +

[clang] [CIR] Add support for bitfields in unions (PR #145096)

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

[clang] [CIR] Add support for __builtin_expect (PR #144726)

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

[clang] [CIR] Restore the underscore in dso_local (PR #145551)

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

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > To be clear, this is a matter of idealism. There's no doubt that I can write > code to handle both types, and all the information I want is available. A > program processing CIR probably won't have a problem with this. It's more of > an issue for a person reading the CIR

[clang] [CIR] Implement folder for VecSplatOp (PR #143771)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -142,7 +142,8 @@ void CIRCanonicalizePass::runOnOperation() { // Many operations are here to perform a manual `fold` in // applyOpPatternsGreedily. if (isa(op)) +VecExtractOp, VecShuffleOp, VecShuffleDynamicOp, VecSplatOp, +VecTernaryOp>(o

[clang] [CIR] Upstream support for IncompleteArrayType (PR #144138)

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

[clang] [CIR] Add Support For Library Builtins (PR #143984)

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

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,63 @@ +// 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

[clang] [CIR] Add Support For Library Builtins (PR #143984)

2025-06-16 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, one nit https://github.com/llvm/llvm-project/pull/143984 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Refactor constant pointer l-value handling (PR #144165)

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

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

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

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

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

[clang] [CIR] Add side effect attribute to call operations (PR #144201)

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

[clang] [CIR] Upstream ComplexRealPtrOp for ComplexType (PR #144235)

2025-06-17 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > I have concerns about the CIR representation here. I think we should be > aligning our representation of complex operations with the MLIR complex > dialect ... We'll still need to go to the memory representation when it gets > lowered to LLVM IR, but I would like to keep

[clang] [CIR] Handle global string literals as char array initializer (PR #144384)

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

[clang] [CIR] Add support for __builtin_assume (PR #144376)

2025-06-17 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Nice, LGTM 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

[clang] [CIR] Upstream ComplexType builtin_complex (PR #144225)

2025-06-17 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. I don't have anything else to add besides current reviews, LGTM once it's updated to incorporate the other landed change. https://github.com/llvm/llvm-project/pull/144225 ___ cfe-commits mai

[clang] [CIR] Upstream __real__ for ComplexType (PR #144261)

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

[clang] [CIR] Upstream __imag__ for ComplexType (PR #144262)

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

[clang] [CIR] Add support for __builtin_expect (PR #144726)

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

[clang] [CIR] Upstream support for builtin_vectorelements (PR #144877)

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

[clang] [CIR] Remove redundant operation trait and use AllTypesMatch instead (PR #144950)

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

[clang] [CIR] Clean up enum attributes (PR #144999)

2025-06-23 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Thanks for all these cleanups, great! https://github.com/llvm/llvm-project/pull/144999 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/

[clang] [CIR] Add support for DumpRecordLayouts (PR #145058)

2025-06-23 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Pretty straightforward, thanks! Do you mind backporting this to the incubator when you get the chance? https://github.com/llvm/llvm-project/pull/145058 ___ cfe-commits mailing list cfe-commi

[clang] [CIR] Add bitfield offset calculation for big-endian targets (PR #145067)

2025-06-23 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Nice to see this done Incrementally, LGTM. https://github.com/llvm/llvm-project/pull/145067 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [CIR] Upstream ChooseExpr for ComplexType (PR #145163)

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

[clang] [CIR] Add support for __builtin_expect (PR #144726)

2025-06-23 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM w one extra minor suggestion https://github.com/llvm/llvm-project/pull/144726 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-

[clang] [CIR] Add support for __builtin_expect (PR #144726)

2025-06-23 Thread Bruno Cardoso Lopes via cfe-commits
@@ -989,6 +989,19 @@ mlir::LogicalResult CIRToLLVMConstantOpLowering::matchAndRewrite( return mlir::success(); } +mlir::LogicalResult CIRToLLVMExpectOpLowering::matchAndRewrite( +cir::ExpectOp op, OpAdaptor adaptor, +mlir::ConversionPatternRewriter &rewriter) const

[clang] [CIR] Initial extra attributes for call operation (PR #145178)

2025-06-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -368,4 +368,34 @@ def CIR_VisibilityAttr : CIR_Attr<"Visibility", "visibility"> { }]; } +//===--===// +// ExtraFuncAttributesAttr +//===---

[clang] [CIR] Add support for constructor aliases (PR #145792)

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

[clang] [CIR] Add support for constructor aliases (PR #145792)

2025-06-26 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1772,7 +1772,8 @@ def FuncOp : CIR_Op<"func", [ OptionalAttr:$sym_visibility, UnitAttr:$comdat, OptionalAttr:$arg_attrs, - OptionalAttr:$res_attrs); + OptionalAt

[clang] [CIR] Upstream splat op for VectorType (PR #139827)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM once all comments are address (looks like you did already?) https://github.com/llvm/llvm-project/pull/139827 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [CIR] Add initial support for bitfields in structs (PR #142041)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
bcardosolopes wrote: > Why are we representing each member of a union individually but packing > bitfields away in integer fields? As you noticed, we went higher level for unions (kept the other types around) but didn't for bitfields. I don't see it as inconsistent because in my point of view

[clang] [CIR] Skip generation of a continue block when flattening TernaryOp (PR #142165)

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

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, one minor nit 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

[clang] [CIR] Upstream ShuffleOp for VectorType (PR #142288)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,35 @@ +//===--===// +// +// 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 ShuffleOp for VectorType (PR #142288)

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

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

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

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM w one nit 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

[clang] [CIR] Implement folder for VecShuffleDynamicOp (PR #142315)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: cir-opt %s -cir-canonicalize -o - | FileCheck %s + +!s32i = !cir.int + +module { + cir.func @fold_shuffle_dynamic_vector_op_test() { +%alloca = cir.alloca !cir.vector<4 x !s32i>, !cir.ptr>, ["r", init] +%vec = cir.const #cir.const_vector<[#cir.in

[clang] [CIR ] Add DLTI dialect support to module attributes (PR #142241)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM pending RUN line suggestion by Andy https://github.com/llvm/llvm-project/pull/142241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listin

[clang] [CIR] Upstream TernaryOp for VectorType (PR #142393)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM (it will be nice to have a folder too in some follow up PR) https://github.com/llvm/llvm-project/pull/142393 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [CIR] Defer definitions of global variables until they are used. (PR #142496)

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

[clang] [CIR][NFCI] Update RValue class to reflect changes in classic CodeGen (PR #142779)

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

[clang] [CIR] Update RValue class to reflect changes in classic CodeGen (PR #142779)

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

[clang] [CIR] Add support for derived class declarations (PR #142823)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. 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

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. Looks good, minor nit https://github.com/llvm/llvm-project/pull/142862 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Defer emitting function definitions (PR #142862)

2025-06-04 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1523,6 +1523,50 @@ cir::FuncOp CIRGenModule::getOrCreateCIRFunction( cir::FuncOp funcOp = createCIRFunction( invalidLoc ? theModule->getLoc() : getLoc(funcDecl->getSourceRange()), mangledName, mlir::cast(funcType), funcDecl); + + if (!dontDefer) { ---

[clang] [CIR] Defer emitting function definitions (PR #142862)

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

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-29 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1075,6 +1089,135 @@ void CIRGenModule::emitTentativeDefinition(const VarDecl *d) { emitGlobalVarDefinition(d); } +static bool shouldAssumeDSOLocal(const CIRGenModule &cgm, + cir::CIRGlobalValueInterface gv) { + if (gv.hasLocalLinkage())

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-29 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1021,8 +1020,7 @@ mlir::LogicalResult CIRToLLVMGlobalOpLowering::matchAndRewrite( const bool isConst = false; assert(!cir::MissingFeatures::addressSpace()); const unsigned addrSpace = 0; - assert(!cir::MissingFeatures::opGlobalDSOLocal()); - const bool isDsoLocal =

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-29 Thread Bruno Cardoso Lopes via cfe-commits
@@ -966,8 +966,7 @@ void CIRToLLVMGlobalOpLowering::setupRegionInitializedLLVMGlobalOp( const bool isConst = false; assert(!cir::MissingFeatures::addressSpace()); const unsigned addrSpace = 0; - assert(!cir::MissingFeatures::opGlobalDSOLocal()); - const bool isDsoLocal

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-29 Thread Bruno Cardoso Lopes via cfe-commits
@@ -1075,6 +1089,135 @@ void CIRGenModule::emitTentativeDefinition(const VarDecl *d) { emitGlobalVarDefinition(d); } +static bool shouldAssumeDSOLocal(const CIRGenModule &cgm, + cir::CIRGlobalValueInterface gv) { + if (gv.hasLocalLinkage())

[clang] [CIR] Upstream converting vector types (PR #142012)

2025-05-29 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. 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

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

2025-05-29 Thread Bruno Cardoso Lopes via cfe-commits
https://github.com/bcardosolopes approved this pull request. LGTM, some minor `auto` nits 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-commi

[clang] [CIR] Add support for global linkage and visibility (PR #141973)

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

[clang] [CIR][NFC] Fix warning about unhandled type (PR #142059)

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

<    4   5   6   7   8   9   10   >