https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/155486
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/155469
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bcardosolopes wrote:
Thanks for the PR.
I expect a change to existing tests or a new test that exercises what's missing!
https://github.com/llvm/llvm-project/pull/155333
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cg
@@ -496,6 +496,72 @@ def CIR_GlobalViewAttr : CIR_Attr<"GlobalView",
"global_view", [
}];
}
+//===--===//
+// VTableAttr
+//===--===//
+
+
@@ -0,0 +1,52 @@
+#include "PassDetail.h"
bcardosolopes wrote:
You need LLVM header here!
https://github.com/llvm/llvm-project/pull/154596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/bcardosolopes approved this pull request.
LGTM, minor suggestion
https://github.com/llvm/llvm-project/pull/154415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/154415
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/154596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM after nit
https://github.com/llvm/llvm-project/pull/154596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/154596
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM! Any chance you could backport this to incubator?
https://github.com/llvm/llvm-project/pull/154540
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
@@ -110,9 +110,10 @@ class CIRGenConsumer : public clang::ASTConsumer {
if (!FEOptions.ClangIRDisablePasses) {
// Setup and run CIR pipeline.
+ bool EnableLoweringPrepare = Action != CIRGenAction::OutputType::EmitCIR;
bcardosolopes wrote:
Altho
https://github.com/bcardosolopes approved this pull request.
LGTM with the other proposed changes
https://github.com/llvm/llvm-project/pull/154060
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/c
@@ -26,6 +28,98 @@ static AsmFlavor inferFlavor(const CIRGenModule &cgm, const
AsmStmt &s) {
return isa(&s) ? AsmFlavor::x86_intel : gnuAsmFlavor;
}
+// FIXME(cir): This should be a common helper between CIRGen
bcardosolopes wrote:
Works for me!
https://g
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/153834
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/153847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bcardosolopes wrote:
> Depends on #153819.
For making the review process a bit more convenient I suggest you use some
stacked approach, see https://llvm.org/docs/GitHub.html#stacked-pull-requests
https://github.com/llvm/llvm-project/pull/153834
___
c
https://github.com/bcardosolopes approved this pull request.
LGTM, nothing to add on top of Andy's comments
https://github.com/llvm/llvm-project/pull/153819
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
@@ -3415,4 +3415,81 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs",
"FAbsOp"> {
}];
}
+//===--===//
+// Variadic Operations
+//===--=
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/153819
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3415,4 +3415,81 @@ def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs",
"FAbsOp"> {
}];
}
+//===--===//
+// Variadic Operations
+//===--=
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/153814
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM pending a nit/question
https://github.com/llvm/llvm-project/pull/153814
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit
@@ -187,12 +244,85 @@ void AtomicInfo::emitCopyIntoMemory(RValue rvalue) const {
}
}
+static void emitAtomicOp(CIRGenFunction &cgf, AtomicExpr *expr, Address dest,
+ Address ptr, Address val1, uint64_t size,
+ cir::MemOrder ord
@@ -1649,7 +1651,26 @@ void cir::FuncOp::print(OpAsmPrinter &p) {
// TODO(CIR): The properties of functions that require verification haven't
// been implemented yet.
-mlir::LogicalResult cir::FuncOp::verify() { return success(); }
+mlir::LogicalResult cir::FuncOp::verify() {
@@ -1649,7 +1651,26 @@ void cir::FuncOp::print(OpAsmPrinter &p) {
// TODO(CIR): The properties of functions that require verification haven't
// been implemented yet.
-mlir::LogicalResult cir::FuncOp::verify() { return success(); }
+mlir::LogicalResult cir::FuncOp::verify() {
https://github.com/bcardosolopes approved this pull request.
LGTM after nit
https://github.com/llvm/llvm-project/pull/153701
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/153701
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -561,7 +558,6 @@ cir::FuncOp CIRGenFunction::generateCode(clang::GlobalDecl
gd, cir::FuncOp fn,
emitImplicitAssignmentOperatorBody(args);
} else if (body) {
if (mlir::failed(emitFunctionBody(body))) {
-fn.erase();
bcardosolopes wrote
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/153698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1097,6 +1117,24 @@ mlir::LogicalResult
CIRToLLVMCallOpLowering::matchAndRewrite(
getTypeConverter(), op.getCalleeAttr());
}
+mlir::LogicalResult CIRToLLVMReturnAddrOpLowering::matchAndRewrite(
+cir::ReturnAddrOp op, OpAdaptor adaptor,
+
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/153698
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -23,16 +25,57 @@ using namespace clang;
using namespace clang::CIRGen;
using namespace cir;
-void CIRGenFunction::emitCompoundStmtWithoutScope(const CompoundStmt &s) {
- for (auto *curStmt : s.body()) {
-if (emitStmt(curStmt, /*useCurrentScope=*/false).failed())
-
@@ -561,7 +558,6 @@ cir::FuncOp CIRGenFunction::generateCode(clang::GlobalDecl
gd, cir::FuncOp fn,
emitImplicitAssignmentOperatorBody(args);
} else if (body) {
if (mlir::failed(emitFunctionBody(body))) {
-fn.erase();
bcardosolopes wrote
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/153630
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,136 @@
+//===--- CIRGenAsm.cpp - Inline Assembly Support for CIR CodeGen -===//
+//
+// 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
https://github.com/bcardosolopes approved this pull request.
LGTM modulo minor nits
https://github.com/llvm/llvm-project/pull/153546
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/153546
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM!
@tommymcm note that after this land you can also put a PR up for your array
initialization improvements upstream.
https://github.com/llvm/llvm-project/pull/153499
___
cfe-commits mai
@@ -2406,6 +2406,208 @@ OpFoldResult RotateOp::fold(FoldAdaptor adaptor) {
return IntAttr::get(input.getContext(), input.getType(), resultValue);
}
+//===--===//
+// InlineAsmOp
+//===---
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/153254
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -66,6 +66,62 @@ clang::CIRGen::CIRGenBuilderTy::getConstFP(mlir::Location
loc, mlir::Type t,
return create(loc, cir::FPAttr::get(t, fpVal));
}
+void CIRGenBuilderTy::computeGlobalViewIndicesFromFlatOffset(
+int64_t offset, mlir::Type ty, cir::CIRDataLayout layout,
+
https://github.com/bcardosolopes approved this pull request.
LGTM, minor nit
https://github.com/llvm/llvm-project/pull/153254
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2391,6 +2396,45 @@ mlir::LogicalResult
CIRToLLVMTrapOpLowering::matchAndRewrite(
return mlir::success();
}
+static mlir::Value
+getValueForVTableSymbol(mlir::Operation *op,
+mlir::ConversionPatternRewriter &rewriter,
+cons
https://github.com/bcardosolopes approved this pull request.
LGTM, minor suggestion that can be addressed (or not) as follow up.
https://github.com/llvm/llvm-project/pull/153243
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/153243
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -50,6 +50,43 @@ class CIR_UnitAttr traits = []>
let isOptional = 1;
}
+//===--===//
+// SourceLanguageAttr
+//===--===//
+
+def CIR_Sour
@@ -495,6 +498,27 @@ void CIRGenModule::setNonAliasAttributes(GlobalDecl gd,
mlir::Operation *op) {
assert(!cir::MissingFeatures::setTargetAttributes());
}
+cir::SourceLanguage CIRGenModule::getCIRSourceLanguage() const {
+ using ClangStd = clang::LangStandard;
+ using CI
@@ -50,6 +50,43 @@ class CIR_UnitAttr traits = []>
let isOptional = 1;
}
+//===--===//
+// SourceLanguageAttr
+//===--===//
+
+def CIR_Sour
@@ -495,6 +498,27 @@ void CIRGenModule::setNonAliasAttributes(GlobalDecl gd,
mlir::Operation *op) {
assert(!cir::MissingFeatures::setTargetAttributes());
}
+cir::SourceLanguage CIRGenModule::getCIRSourceLanguage() const {
+ using ClangStd = clang::LangStandard;
+ using CI
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/152354
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -515,5 +515,35 @@ def BitfieldInfoAttr : CIR_Attr<"BitfieldInfo",
"bitfield_info"> {
];
}
+//===--===//
+// AddressPointAttr
+//===--==
https://github.com/bcardosolopes approved this pull request.
LGTM, nothing to add on top of existing comments
https://github.com/llvm/llvm-project/pull/152215
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
@@ -3143,6 +3143,45 @@ def CIR_AssumeOp : CIR_Op<"assume"> {
}];
}
+def CIR_AssumeAlignedOp : CIR_Op<"assume_aligned", [
+ Pure, AllTypesMatch<["pointer", "result"]>
+]> {
+ let summary = "Tell the optimizer that a pointer is aligned";
+ let description = [{
+The `cir
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/152152
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM, pending a nit
https://github.com/llvm/llvm-project/pull/152152
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes closed
https://github.com/llvm/llvm-project/pull/152093
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/152093
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/151750
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,108 @@
+//===- CIRLoweringEmitter.cpp - Generate lowering of builtins --=-*- C++
-*--=//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,108 @@
+//===- CIRLoweringEmitter.cpp - Generate lowering of builtins --=-*- C++
-*--=//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,108 @@
+//===- CIRLoweringEmitter.cpp - Generate lowering of builtins --=-*- C++
-*--=//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -410,3 +410,7 @@ def calculate_arch_features(arch_string):
# possibly be present in system and user configuration files, so disable
# default configs for the test runs.
config.environment["CLANG_NO_DEFAULT_CONFIG"] = "1"
+
+# Check if clangir is enabled.
+if config.clang_ena
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/148730
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/151150
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/151076
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/151073
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,55 @@
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-pc-linux-gnu -fclangir -emit-cir
%s -o %t.cir
+// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
+// RUN: %clang_cc1 -std=c++17 -triple x86_64-pc-linux-gnu -fclangir -emit-llvm
%s -o %t-cir.ll
+// RUN: File
https://github.com/bcardosolopes approved this pull request.
Awesome! (Same nit from test spacing)
https://github.com/llvm/llvm-project/pull/151069
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/
https://github.com/bcardosolopes approved this pull request.
LGTM with an ultra nit
https://github.com/llvm/llvm-project/pull/151066
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/151066
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,130 @@
+// RUN: %clang_cc1 -std=c++11 -triple aarch64-none-linux-android21 -fclangir
-emit-cir %s -o %t.cir
+// RUN: FileCheck --check-prefix=CIR --input-file=%t.cir %s
+// RUN: %clang_cc1 -std=c++11 -triple aarch64-none-linux-android21 -fclangir
-emit-llvm %s -o %t-c
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/150997
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/150834
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bcardosolopes wrote:
> Regarding the option for running the LoweringPrepare pass only if the target
> file is not CIR, I will need modifications on Complex unary, cast and
> ArrayCtor.
Seems like a natural incremental change to me.
https://github.com/llvm/llvm-project/pull/150834
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/150759
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -22,15 +24,97 @@ struct LoweringPreparePass : public
LoweringPrepareBase {
void runOnOperation() override;
void runOnOp(Operation *op);
+ void lowerArrayCtor(ArrayCtor op);
};
} // namespace
-void LoweringPreparePass::runOnOp(Operation *op) {}
+void LoweringPrep
@@ -2219,6 +2219,50 @@ def CIR_TrapOp : CIR_Op<"trap", [Terminator]> {
let assemblyFormat = "attr-dict";
}
+//===--===//
+// ArrayCtor
+//===--
@@ -805,4 +805,50 @@ bool CIRGenFunction::shouldNullCheckClassCastValue(const
CastExpr *ce) {
return true;
}
+/// Computes the length of an array in elements, as well as the base
+/// element type and a properly-typed first element pointer.
+mlir::Value
+CIRGenFunction::emi
@@ -2219,6 +2219,50 @@ def CIR_TrapOp : CIR_Op<"trap", [Terminator]> {
let assemblyFormat = "attr-dict";
}
+//===--===//
+// ArrayCtor
+//===--
https://github.com/bcardosolopes approved this pull request.
LGTM after existing comments are addressed, nothing else to add on my part.
https://github.com/llvm/llvm-project/pull/148999
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://li
@@ -1053,6 +1053,68 @@ LValue CIRGenFunction::emitMemberExpr(const MemberExpr
*e) {
llvm_unreachable("Unhandled member declaration!");
}
+/// Evaluate an expression into a given memory location.
+void CIRGenFunction::emitAnyExprToMem(const Expr *e, Address location,
+
https://github.com/bcardosolopes approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/148962
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -515,5 +515,35 @@ def BitfieldInfoAttr : CIR_Attr<"BitfieldInfo",
"bitfield_info"> {
];
}
+//===--===//
+// AddressPointAttr
+//===--==
https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/148704
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -72,4 +72,14 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> {
let dependentDialects = ["cir::CIRDialect"];
}
+def LoweringPrepare : Pass<"cir-lowering-prepare"> {
+ let summary = "Preparation work before lowering to LLVM dialect";
+ let description = [{
+This pass d
@@ -72,4 +72,14 @@ def CIRFlattenCFG : Pass<"cir-flatten-cfg"> {
let dependentDialects = ["cir::CIRDialect"];
}
+def LoweringPrepare : Pass<"cir-lowering-prepare"> {
+ let summary = "Preparation work before lowering to LLVM dialect";
bcardosolopes wrote:
`
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/148545
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes approved this pull request.
We need to update some of the entries because they are old now, so a few
comments on that, otherwise LGTM
https://github.com/llvm/llvm-project/pull/148545
___
cfe-commits mailing list
cfe-co
@@ -9543,6 +9543,48 @@ bool
SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(
if (DiagKind == -1)
return false;
+ if (this->S.Context.getLangOpts().CPlusPlus26 && inUnion() &&
+ CSM == CXXSpecialMemberKind::Destructor) {
+// [class.dtor]/7 In C++26, a d
@@ -9543,6 +9543,48 @@ bool
SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(
if (DiagKind == -1)
return false;
+ if (this->S.Context.getLangOpts().CPlusPlus26 && inUnion() &&
+ CSM == CXXSpecialMemberKind::Destructor) {
+// [class.dtor]/7 In C++26, a d
https://github.com/bcardosolopes commented:
Added more reviewers and some nits
https://github.com/llvm/llvm-project/pull/146815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/bcardosolopes edited
https://github.com/llvm/llvm-project/pull/146815
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9543,6 +9543,48 @@ bool
SpecialMemberDeletionInfo::shouldDeleteForSubobjectCall(
if (DiagKind == -1)
return false;
+ if (this->S.Context.getLangOpts().CPlusPlus26 && inUnion() &&
+ CSM == CXXSpecialMemberKind::Destructor) {
+// [class.dtor]/7 In C++26, a d
https://github.com/bcardosolopes approved this pull request.
Nice, tks!
https://github.com/llvm/llvm-project/pull/147628
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1669,6 +1669,90 @@ def GetGlobalOp : CIR_Op<"get_global",
}];
}
+//===--===//
+// SetBitfieldOp
+//===--===//
+
+def SetBitfieldOp : CI
@@ -1669,6 +1669,90 @@ def GetGlobalOp : CIR_Op<"get_global",
}];
}
+//===--===//
+// SetBitfieldOp
+//===--===//
+
+def SetBitfieldOp : CI
@@ -2384,6 +2385,82 @@ mlir::LogicalResult
CIRToLLVMComplexImagOpLowering::matchAndRewrite(
return mlir::success();
}
+mlir::LogicalResult CIRToLLVMSetBitfieldOpLowering::matchAndRewrite(
+cir::SetBitfieldOp op, OpAdaptor adaptor,
+mlir::ConversionPatternRewriter &r
@@ -2066,6 +2066,11 @@ LogicalResult cir::ComplexRealOp::verify() {
}
OpFoldResult cir::ComplexRealOp::fold(FoldAdaptor adaptor) {
+ if (auto complexCreateOp = dyn_cast_or_null(
+ getOperand().getDefiningOp())) {
+return complexCreateOp.getOperand(0);
+ }
--
bcardosolopes wrote:
> if transformations like this should be implemented in cir-simplify
For this specific one I agree with @xlauko, it could have already come out of
CIRGen like this without any hurting source fidelity. For anything slightly
more cir-simplify should be used. We just went thr
1 - 100 of 1048 matches
Mail list logo