[clang] [CIR] Fix assertion order in 'Address' (PR #157477)

2025-09-08 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/157477 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Consildate CIRGenExprCXX.cpp files (PR #157169)

2025-09-06 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/157169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Consildate CIRGenExprCXX.cpp files (PR #157169)

2025-09-05 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/157169 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Finish record layout for classes with virtual bases (PR #156770)

2025-09-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/156770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Finish record layout for classes with virtual bases (PR #156770)

2025-09-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/156770 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -379,6 +395,23 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { /*mem_order=*/cir::MemOrderAttr{}); } + cir::LoadOp createAlignedLoad(mlir::Location loc, mlir::Type ty, +mlir::Value ptr, llvm::MaybeA

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -549,3 +652,32 @@ bool CIRGenItaniumCXXABI::isVirtualOffsetNeededForVTableField( return false; return needsVTTParameter(cgf.curGD); } + +mlir::Value CIRGenItaniumCXXABI::getVirtualBaseClassOffset( +mlir::Location loc, CIRGenFunction &cgf, Address thisAddr, +co

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -723,6 +811,52 @@ void CIRGenFunction::emitCXXDestructorCall(const CXXDestructorDecl *dd, delegating, thisAddr, thisTy); } +mlir::Value CIRGenFunction::getVTTParameter(GlobalDecl gd, bool forVirtualBase, +

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -329,10 +330,35 @@ static Address applyNonVirtualAndVirtualOffset( loc, addr, baseValueTy, nonVirtualOffset.getQuantity(), assumeNotNull); } + } else { +baseOffset = virtualOffset; + } + + // Apply the base offset. cir.ptr_stride adjusts by a

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -723,6 +811,52 @@ void CIRGenFunction::emitCXXDestructorCall(const CXXDestructorDecl *dd, delegating, thisAddr, thisTy); } +mlir::Value CIRGenFunction::getVTTParameter(GlobalDecl gd, bool forVirtualBase, +

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/156521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -329,10 +330,35 @@ static Address applyNonVirtualAndVirtualOffset( loc, addr, baseValueTy, nonVirtualOffset.getQuantity(), assumeNotNull); } + } else { +baseOffset = virtualOffset; + } + + // Apply the base offset. cir.ptr_stride adjusts by a

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm, with minor nits https://github.com/llvm/llvm-project/pull/156521 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add support for constructors with VTT parameters (PR #156521)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -287,6 +287,10 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy { cir::ConstantOp getUInt32(uint32_t c, mlir::Location loc) { return getConstantInt(loc, getUInt32Ty(), c); } + cir::ConstantOp getSInt64(uint64_t c, mlir::Location loc) { +cir::IntType sInt6

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-09-03 Thread Henrich Lauko via cfe-commits
@@ -416,18 +420,26 @@ def CIR_LoadOp : CIR_Op<"load", [ // Load address from memory at address %0. %3 is used by at least one // operation that dereferences a pointer. %3 = cir.load deref %0 : !cir.ptr> + +// Perform a volatile load from address in %0. +%4 =

[clang] [CIR] Upstream FPToFPBuiltin ACosOp (PR #156356)

2025-09-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/156356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-03 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm, with minor nits https://github.com/llvm/llvm-project/pull/155697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -2431,6 +2431,51 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { ]; } +//===--===// +// CopyOp +//===--===// + +def C

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -118,6 +118,44 @@ DeletionKind cir::StoreOp::removeBlockingUses( return DeletionKind::Delete; } +//===--===// +// Interfaces for CopyOp +//===--

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -2431,6 +2431,51 @@ def CIR_CallOp : CIR_CallOpBase<"call", [NoRegionArguments]> { ]; } +//===--===// +// CopyOp +//===--===// + +def C

[clang] [CIR] Emit copy for aggregate initialization (PR #155697)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/155697 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][NFC] Reorder GenExprComplex and add errors for unhandled visitors (PR #156241)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/156241 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream FPToFPBuiltin ACosOp (PR #156356)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/156356 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [OpenACC] Add NYI for pointer/VLA arguments to recipes (PR #156465)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/156465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -452,24 +464,32 @@ def CIR_StoreOp : CIR_Op<"store", [ a volatile store. Store's can be marked atomic by using `atomic()`. -`align` can be used to specify an alignment that's different from the +`alignment` can be used to specify an alignment that's differen

[clang] [CIR] Upstream FPToFPBuiltin ACosOp (PR #156356)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -3732,6 +3732,15 @@ class CIR_UnaryFPToFPBuiltinOp let llvmOp = llvmOpName; } +def CIR_ACosOp : CIR_UnaryFPToFPBuiltinOp<"acos", "ACosOp"> { + let summary = "Computes the arcus cosine of the specified value"; + let description = [{ +`cir.acos`computes the arcus cosi

[clang] [CIR] Add support for emitting VTTs and related ojects (PR #155721)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/155721 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-09-02 Thread Henrich Lauko via cfe-commits
@@ -416,18 +420,26 @@ def CIR_LoadOp : CIR_Op<"load", [ // Load address from memory at address %0. %3 is used by at least one // operation that dereferences a pointer. %3 = cir.load deref %0 : !cir.ptr> + +// Perform a volatile load from address in %0. +%4 =

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm, with minor nits https://github.com/llvm/llvm-project/pull/156124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add handling for volatile loads and stores (PR #156124)

2025-09-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/156124 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-23 Thread Henrich Lauko via cfe-commits
@@ -3800,4 +3800,58 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Upstream Re-Throw with no return (PR #154994)

2025-08-23 Thread Henrich Lauko via cfe-commits
@@ -3800,4 +3800,58 @@ def CIR_VAArgOp : CIR_Op<"va_arg"> { }]; } +//===--===// +// ThrowOp +//===--===// + +def CIR_ThrowOp : CIR_Op<"thro

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-21 Thread Henrich Lauko via cfe-commits
@@ -496,6 +496,46 @@ def CIR_GlobalViewAttr : CIR_Attr<"GlobalView", "global_view", [ }]; } +//===--===// +// VTableAttr +//===--===// + +

[clang] [CIR] Add support for derived classes in type info conversion safety … (PR #154385)

2025-08-20 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/154385 ___ 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 classes in type info conversion safety … (PR #154385)

2025-08-20 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/154385 ___ 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 classes in type info conversion safety … (PR #154385)

2025-08-20 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/154385 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-20 Thread Henrich Lauko via cfe-commits
@@ -424,6 +424,44 @@ cir::ConstVectorAttr::verify(function_ref emitError, return elementTypeCheck; } +//===--===// +// CIR VTableAttr +//===--

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-20 Thread Henrich Lauko via cfe-commits
@@ -424,6 +424,44 @@ cir::ConstVectorAttr::verify(function_ref emitError, return elementTypeCheck; } +//===--===// +// CIR VTableAttr +//===--

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-20 Thread Henrich Lauko via cfe-commits
@@ -424,6 +424,44 @@ cir::ConstVectorAttr::verify(function_ref emitError, return elementTypeCheck; } +//===--===// +// CIR VTableAttr +//===--

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-20 Thread Henrich Lauko via cfe-commits
@@ -496,6 +496,46 @@ def CIR_GlobalViewAttr : CIR_Attr<"GlobalView", "global_view", [ }]; } +//===--===// +// VTableAttr +//===--===// + +

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-20 Thread Henrich Lauko via cfe-commits
@@ -424,6 +424,44 @@ cir::ConstVectorAttr::verify(function_ref emitError, return elementTypeCheck; } +//===--===// +// CIR VTableAttr +//===--

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-20 Thread Henrich Lauko via cfe-commits
@@ -496,6 +496,46 @@ def CIR_GlobalViewAttr : CIR_Attr<"GlobalView", "global_view", [ }]; } +//===--===// +// VTableAttr +//===--===// + +

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-20 Thread Henrich Lauko via cfe-commits
@@ -496,6 +496,46 @@ def CIR_GlobalViewAttr : CIR_Attr<"GlobalView", "global_view", [ }]; } +//===--===// +// VTableAttr +//===--===// + +

[clang] [CIR] Add CIR vtable attribute (PR #154415)

2025-08-20 Thread Henrich Lauko via cfe-commits
@@ -496,6 +496,46 @@ def CIR_GlobalViewAttr : CIR_Attr<"GlobalView", "global_view", [ }]; } +//===--===// +// VTableAttr +//===--===// + +

[clang] [CIR][Dialect] Add SourceLangAttr (PR #152511)

2025-08-19 Thread Henrich Lauko via cfe-commits
@@ -495,6 +498,25 @@ void CIRGenModule::setNonAliasAttributes(GlobalDecl gd, mlir::Operation *op) { assert(!cir::MissingFeatures::setTargetAttributes()); } +cir::SourceLanguage CIRGenModule::getCIRSourceLanguage() const { + using ClangStd = clang::LangStandard; + using CI

[clang] [CIR][Dialect] Add SourceLangAttr (PR #152511)

2025-08-19 Thread Henrich Lauko via cfe-commits
@@ -495,6 +498,25 @@ void CIRGenModule::setNonAliasAttributes(GlobalDecl gd, mlir::Operation *op) { assert(!cir::MissingFeatures::setTargetAttributes()); } +cir::SourceLanguage CIRGenModule::getCIRSourceLanguage() const { + using ClangStd = clang::LangStandard; + using CI

[clang] [CIR][Dialect] Add SourceLangAttr (PR #152511)

2025-08-19 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm, with minor nits https://github.com/llvm/llvm-project/pull/152511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR][Dialect] Add SourceLangAttr (PR #152511)

2025-08-19 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/152511 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [MLIR] Default valued enum parameter (PR #154168)

2025-08-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/154168 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] XXX (PR #154168)

2025-08-18 Thread Henrich Lauko via cfe-commits
xlauko wrote: * **#154168** https://app.graphite.dev/github/pr/llvm/llvm-project/154168?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/15416

[clang] [mlir] XXX (PR #154168)

2025-08-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko created https://github.com/llvm/llvm-project/pull/154168 None >From 4b75153b6542eb7dc906d378a00aadee10359a64 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 15 Jul 2025 14:17:46 +0200 Subject: [PATCH] XXX --- clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp | 1 - ml

[clang] [CIR] Implement Statement Expressions (PR #153677)

2025-08-18 Thread Henrich Lauko via cfe-commits
@@ -1178,11 +1178,11 @@ static void pushTemporaryCleanup(CIRGenFunction &cgf, ->getBaseElementTypeUnsafe() ->getAs()) { // Get the destructor for the reference temporary. -auto *classDecl =

[clang] [CIR] Implement MemberExpr support for ComplexType (PR #154027)

2025-08-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/154027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Implement MemberExpr support for ComplexType (PR #154027)

2025-08-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/154027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko commented: Why does this adds `-std=c++20` to tests? This removes lot of lowering prepare tests, is it intentional? Can we add `RUN:` with enabled lowering and keep tests? https://github.com/llvm/llvm-project/pull/154107 ___

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-18 Thread Henrich Lauko via cfe-commits
@@ -15,53 +15,29 @@ struct HasDtor { ~HasDtor(); }; -// CHECK: acc.private.recipe @privatization__ZTSA5_7HasDtor : !cir.ptr> init { +// CHECK: acc.private.recipe @privatization__ZTSA5_7HasDtor : !cir.ptr> init { // CHECK-NEXT: ^bb0(%[[ARG:.*]]: !cir.ptr> {{.*}}): -// CH

[clang] [CIR] Run LoweringPrepare pass only for non CIR output (PR #154107)

2025-08-18 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/154107 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -858,6 +853,21 @@ mlir::Value ComplexExprEmitter::emitBinMul(const BinOpInfo &op) { return builder.createComplexCreate(op.loc, newReal, newImag); } +mlir::Value ComplexExprEmitter::emitBinDiv(const BinOpInfo &op) { + assert(!cir::MissingFeatures::fastMathFlags()); + as

[clang] [CIR] Upstream DivOp for ComplexType (PR #153796)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -858,6 +853,21 @@ mlir::Value ComplexExprEmitter::emitBinMul(const BinOpInfo &op) { return builder.createComplexCreate(op.loc, newReal, newImag); } +mlir::Value ComplexExprEmitter::emitBinDiv(const BinOpInfo &op) { + assert(!cir::MissingFeatures::fastMathFlags()); + as

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -3415,4 +3415,126 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> { }]; } +//===--===// +// Variadic Operations +//===--

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -3415,4 +3415,126 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> { }]; } +//===--===// +// Variadic Operations +//===--

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -3415,4 +3415,126 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> { }]; } +//===--===// +// Variadic Operations +//===--

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -384,6 +384,19 @@ class ScalarExprEmitter : public StmtVisitor { return Visit(e->getReplacement()); } + mlir::Value VisitVAArgExpr(VAArgExpr *ve) { +QualType Ty = ve->getType(); + +if (Ty->isVariablyModifiedType()) { xlauko wrote: ```sugges

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -384,6 +384,19 @@ class ScalarExprEmitter : public StmtVisitor { return Visit(e->getReplacement()); } + mlir::Value VisitVAArgExpr(VAArgExpr *ve) { +QualType Ty = ve->getType(); + +if (Ty->isVariablyModifiedType()) { + cgf.cgm.errorNYI(ve->getSourceRang

[clang] [CIR] Implement__builtin_va_arg (PR #153834)

2025-08-16 Thread Henrich Lauko via cfe-commits
@@ -384,6 +384,19 @@ class ScalarExprEmitter : public StmtVisitor { return Visit(e->getReplacement()); } + mlir::Value VisitVAArgExpr(VAArgExpr *ve) { +QualType Ty = ve->getType(); xlauko wrote: ```suggestion QualType ty = ve->getType(); ```

[clang] [CIR] Upstream EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -42,7 +42,47 @@ enum CleanupKind : unsigned { /// A stack of scopes which respond to exceptions, including cleanups /// and catch blocks. class EHScopeStack { + friend class CIRGenFunction; + public: + // TODO(ogcg): Switch to alignof(uint64_t) instead of 8 + enum { Scop

[clang] [CIR] Upstream EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,43 @@ +//===--===// +// +// 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 EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm, with minor nits https://github.com/llvm/llvm-project/pull/152215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Upstream EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,43 @@ +//===--===// +// +// 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 EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -42,7 +42,47 @@ enum CleanupKind : unsigned { /// A stack of scopes which respond to exceptions, including cleanups /// and catch blocks. class EHScopeStack { + friend class CIRGenFunction; + public: + // TODO(ogcg): Switch to alignof(uint64_t) instead of 8 + enum { Scop

[clang] [CIR] Upstream EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -42,7 +42,47 @@ enum CleanupKind : unsigned { /// A stack of scopes which respond to exceptions, including cleanups /// and catch blocks. class EHScopeStack { + friend class CIRGenFunction; + public: + // TODO(ogcg): Switch to alignof(uint64_t) instead of 8 + enum { Scop

[clang] [CIR] Upstream EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,43 @@ +//===--===// +// +// 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 EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -33,6 +34,54 @@ using namespace clang::CIRGen; void EHScopeStack::Cleanup::anchor() {} +/// Push an entry of the given size onto this protected-scope stack. +char *EHScopeStack::allocate(size_t size) { + size = llvm::alignTo(size, ScopeStackAlignment); + if (!startOfBuff

[clang] [CIR] Upstream EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -0,0 +1,43 @@ +//===--===// +// +// 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 EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
@@ -33,6 +34,54 @@ using namespace clang::CIRGen; void EHScopeStack::Cleanup::anchor() {} +/// Push an entry of the given size onto this protected-scope stack. +char *EHScopeStack::allocate(size_t size) { + size = llvm::alignTo(size, ScopeStackAlignment); + if (!startOfBuff

[clang] [CIR] Upstream EHScopeStack memory allocator (PR #152215)

2025-08-07 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/152215 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Add CIRGen for cir.unreachable and cir.trap (PR #151363)

2025-08-04 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm https://github.com/llvm/llvm-project/pull/151363 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Use getDefiningOp() instead of dyn_cast(getDefiningOp()) (NFC) (PR #151217)

2025-08-02 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/151217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Use getDefiningOp() instead of dyn_cast(getDefiningOp()) (NFC) (PR #151217)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151217 >From 320cabcdefda70ba4f3af33f633cf43b834bc1d4 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:49:22 +0200 Subject: [PATCH] [CIR] Use getDefiningOp() instead of dyn_cast(getDefiningOp()) (NFC) T

[clang] [CIR] Use getDefiningOp() instead of dyn_cast(getDefiningOp()) (NFC) (PR #151217)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151217 >From 4d76a80344df0e4543c86613e5c36c02d230b962 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:49:22 +0200 Subject: [PATCH] [CIR] Use getDefiningOp() instead of dyn_cast(getDefiningOp()) (NFC) T

[clang] [CIR] Use getDefiningOp() instead of dyn_cast(getDefiningOp()) (NFC) (PR #151217)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/151217 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko closed https://github.com/llvm/llvm-project/pull/151216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From 88e5e8bd20d36c63d4110a70f9276a8095549668 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From 05b0240952b59ec86eee40b13aebedb335818038 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From 376046571e736227c8ce8bb39b90d4570429bdc0 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From 8b41e899143aeb3873384cc2b0d31c012dfd5df7 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/151216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
xlauko wrote: ### Merge activity * **Aug 1, 6:06 PM UTC**: [Graphite](https://app.graphite.dev/github/pr/llvm/llvm-project/151216) rebased this pull request as part of a merge. https://github.com/llvm/llvm-project/pull/151216 ___ cfe-commits mailin

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From 23121724bf565468a2c0e632a24ce48054ecd31e Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From 3f272554fd86f5a0b778202c687a79498279edf6 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From cce12ad93d03ab26260ec65e4cd98ccdee61844e Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From fddf5271b65e657e4f1034fd4a1add17979058c8 Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
@@ -291,6 +291,21 @@ def CIR_ConstantOp : CIR_Op<"const", [ return ptrAttr.isNullValue(); return false; } + +template +T getValueAttr() { return mlir::dyn_cast(getValue()); } + +llvm::APInt getIntValue() { xlauko wrote: They are

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
xlauko wrote: @andykaylor ping https://github.com/llvm/llvm-project/pull/151216 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Simplify ConstantOp accesses and its getDefiningOp (PR #151216)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko updated https://github.com/llvm/llvm-project/pull/151216 >From 1770a46e81bc67fad2cef89d5fb273c47fd909df Mon Sep 17 00:00:00 2001 From: xlauko Date: Tue, 29 Jul 2025 21:38:48 +0200 Subject: [PATCH] [CIR] Simplify ConstantOp accesses and its getDefiningOp - Replaces dy

[clang] [CIR] Handle expression with cleanups (PR #151600)

2025-08-01 Thread Henrich Lauko via cfe-commits
@@ -1096,6 +1096,154 @@ void CIRGenFunction::emitAnyExprToMem(const Expr *e, Address location, llvm_unreachable("bad evaluation kind"); } +static Address createReferenceTemporary(CIRGenFunction &cgf, +const MaterializeTemporaryExpr *m

[clang] [CIR] Handle expression with cleanups (PR #151600)

2025-08-01 Thread Henrich Lauko via cfe-commits
@@ -1096,6 +1096,154 @@ void CIRGenFunction::emitAnyExprToMem(const Expr *e, Address location, llvm_unreachable("bad evaluation kind"); } +static Address createReferenceTemporary(CIRGenFunction &cgf, +const MaterializeTemporaryExpr *m

[clang] [CIR] Handle expression with cleanups (PR #151600)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko approved this pull request. lgtm with minor nits https://github.com/llvm/llvm-project/pull/151600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [CIR] Handle expression with cleanups (PR #151600)

2025-08-01 Thread Henrich Lauko via cfe-commits
@@ -1096,6 +1096,154 @@ void CIRGenFunction::emitAnyExprToMem(const Expr *e, Address location, llvm_unreachable("bad evaluation kind"); } +static Address createReferenceTemporary(CIRGenFunction &cgf, +const MaterializeTemporaryExpr *m

[clang] [CIR] Handle expression with cleanups (PR #151600)

2025-08-01 Thread Henrich Lauko via cfe-commits
https://github.com/xlauko edited https://github.com/llvm/llvm-project/pull/151600 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

  1   2   3   4   5   6   7   >