=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
https://git
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
===
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
===
https://github.com/erichkeane commented:
>rdar://138644831
DO we have to!?!
I don't object to the commit itself once @Fznamznon and @shafik are happy.
https://github.com/llvm/llvm-project/pull/125671
___
cfe-commits mailing list
cfe-commits@lists.llv
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
===
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
https://git
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier ,
=?utf-8?q?Félix?= Cloutier
Message-ID:
In-Reply-To:
===
@@ -3492,10 +3492,13 @@ VarDecl *BindingDecl::getHoldingVar() const {
return VD;
}
-llvm::ArrayRef BindingDecl::getBindingPackExprs() const {
+llvm::ArrayRef BindingDecl::getBindingPackDecls() const {
assert(Binding && "expecting a pack expr");
- auto *RP = cast(Binding)
erichkeane wrote:
> @erichkeane thanks. I've changed the title/commit message.
You did not unfortunately, so the commit has just:
```[Clang] fix diagnostic to correctly handle singular and plural cases for
redundant qualifiers on base class type
Fixes https://github.com/llvm/llvm-project/iss
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
https://github.com/erichkeane approved this pull request.
Please improve the commit message to better explain what is going on, else LGTM.
https://github.com/llvm/llvm-project/pull/125943
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/124834
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
}
}
+static bool isValidCodeModelAttr(Sema &S, StringRef Str) {
+ if (S.Context.getTargetInfo().getTriple().isLoongArch()) {
+return Str == "normal" || Str == "medium" || St
@@ -4870,14 +4870,16 @@ def note_ovl_candidate_inconsistent_deduction_types :
Note<
"candidate template ignored: deduced values %diff{"
"of conflicting types for parameter %0 (%1 of type $ vs. %3 of type $)|"
"%1 and %3 of conflicting types for parameter %0}2,4">;
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
}
}
+static bool isValidCodeModelAttr(Sema &S, StringRef Str) {
+ if (S.Context.getTargetInfo().getTriple().isLoongArch()) {
+return Str == "normal" || Str == "medium" || St
@@ -62,6 +62,10 @@ def CodeModelDocs : Documentation {
let Content = [{
The ``model`` attribute allows overriding the translation unit's
code model (specified by ``-mcmodel``) for a specific global variable.
+
+On LoongArch, allowed values are "normal", "medium", "extreme".
-
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
@@ -5404,6 +5404,151 @@ third argument, can only occur at file scope.
a = b[i] * c[i] + e;
}
+Extensions for controlling atomic code generation
+=
+
+The ``[[clang::atomic]]`` statement attribute enables users to control ho
erichkeane wrote:
> The code and test coverage looks good. There are a couple of comments that
> have not been addressed.
>
> And there is @zygoloid suggestion to generalize
> `SubstNonTypeTemplateParmPackExpr` - do we want to do that now or address it
> after the fact?
>
> Maybe trying to l
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/125791
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2949,15 +2950,34 @@ static void handleSectionAttr(Sema &S, Decl *D, const
ParsedAttr &AL) {
}
}
+static bool isValidCodeModelAttr(Sema &S, StringRef Str) {
+ if (S.Context.getTargetInfo().getTriple().isLoongArch()) {
+return Str == "normal" || Str == "medium" || St
@@ -84,6 +138,19 @@ mlir::LogicalResult
CIRToLLVMGlobalOpLowering::matchAndRewrite(
SmallVector attributes;
if (init.has_value()) {
+auto setupRegionInitializedLLVMGlobalOp = [&]() {
erichkeane wrote:
Ah, hrmph. That is unfortunately a much nicer ve
@@ -6697,6 +6697,10 @@ static bool canPassInRegisters(Sema &S, CXXRecordDecl *D,
if (D->isDependentType() || D->isInvalidDecl())
return false;
+ for (const CXXMethodDecl *MD : D->methods()) {
erichkeane wrote:
I'm not sure where the RIGHT place for thi
@@ -92,6 +159,16 @@ mlir::LogicalResult
CIRToLLVMGlobalOpLowering::matchAndRewrite(
mlir::dyn_cast(init.value())) {
// Initializer is a constant array: convert it to a compatible llvm init.
init = rewriter.getIntegerAttr(llvmType, intAttr.getValu
@@ -0,0 +1,51 @@
+#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H
+#define LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H
+
+#include "clang/CIR/Dialect/IR/CIRAttrs.h"
+
+namespace cir {
+
+template class CirAttrVisitor {
+public:
+ // FIXME: Create a TableGen list to automatical
@@ -55,14 +104,19 @@ struct ConvertCIRToLLVMPass
StringRef getArgument() const override { return "cir-flat-to-llvm"; }
};
+/// Replace CIR global with a region initialized LLVM global and update
+/// insertion point to the end of the initializer block.
+
mlir::LogicalResult
@@ -0,0 +1,51 @@
+#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H
+#define LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H
+
+#include "clang/CIR/Dialect/IR/CIRAttrs.h"
+
+namespace cir {
+
+template class CirAttrVisitor {
+public:
+ // FIXME: Create a TableGen list to automatical
@@ -35,6 +36,54 @@ using namespace llvm;
namespace cir {
namespace direct {
+class CIRAttrToValue : public CirAttrVisitor {
+public:
+ mlir::Value lowerCirAttrAsValue(mlir::Operation *parentOp,
+ mlir::Attribute attr,
+
@@ -0,0 +1,51 @@
+#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H
+#define LLVM_CLANG_CIR_DIALECT_IR_CIRATTRVISITOR_H
+
+#include "clang/CIR/Dialect/IR/CIRAttrs.h"
+
+namespace cir {
+
+template class CirAttrVisitor {
+public:
+ // FIXME: Create a TableGen list to automatical
@@ -35,6 +36,54 @@ using namespace llvm;
namespace cir {
namespace direct {
+class CIRAttrToValue : public CirAttrVisitor {
+public:
+ mlir::Value lowerCirAttrAsValue(mlir::Operation *parentOp,
+ mlir::Attribute attr,
+
@@ -84,6 +138,19 @@ mlir::LogicalResult
CIRToLLVMGlobalOpLowering::matchAndRewrite(
SmallVector attributes;
if (init.has_value()) {
+auto setupRegionInitializedLLVMGlobalOp = [&]() {
erichkeane wrote:
I think I'd prefer this get extracted to a functi
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/125658
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3832,6 +3832,9 @@ def warn_type_attribute_wrong_type : Warning<
"'%0' only applies to %select{function|pointer|"
"Objective-C object or block pointer}1 types; type here is %2">,
InGroup;
+def warn_attribute_on_void_param: Warning<
+ "attribute %0 cannot be applied to
@@ -3832,6 +3832,9 @@ def warn_type_attribute_wrong_type : Warning<
"'%0' only applies to %select{function|pointer|"
"Objective-C object or block pointer}1 types; type here is %2">,
InGroup;
+def warn_attribute_on_void_param: Warning<
+ "attribute %0 cannot be applied to
@@ -1190,6 +1190,11 @@ void Sema::ActOnPragmaAttributePop(SourceLocation
PragmaLoc,
void Sema::AddPragmaAttributes(Scope *S, Decl *D) {
if (PragmaAttributeStack.empty())
return;
+
+ if (ParmVarDecl *P = dyn_cast(D))
+if (P->getIdentifier() == nullptr && P->getType()
https://github.com/erichkeane commented:
1 nit, otherwise no real concerns. I don't know enough about this feature to
be great at reviewing, and the nit might be just a fallout from what we already
have, but otherwise it seems reasonable enough to me.
Glad to see we have a ast-dump test that
@@ -5439,3 +5441,21 @@ OpenACCAsteriskSizeExpr *
OpenACCAsteriskSizeExpr::CreateEmpty(const ASTContext &C) {
return new (C) OpenACCAsteriskSizeExpr({}, C.IntTy);
}
+
+ConvertVectorExpr *ConvertVectorExpr::CreateEmpty(const ASTContext &C,
+
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/125522
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,19 @@
+//===--- AtomicOptions.def - Atomic Options database -*- 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
@@ -764,6 +764,73 @@ void Parser::ParseGNUAttributeArgs(
ScopeLoc, Form);
}
+void Parser::ParseAtomicAttribute(
erichkeane wrote:
I'm very much beginning to dislike the syntax for this, if it needs this much
special handling. We s
@@ -5958,6 +5968,58 @@ void Clang::ConstructJob(Compilation &C, const JobAction
&JA,
RenderFloatingPointOptions(TC, D, OFastEnabled, Args, CmdArgs, JA);
+ if (Arg *AtomicArg = Args.getLastArg(options::OPT_fatomic_EQ)) {
erichkeane wrote:
IMO, we need a s
@@ -1096,6 +1100,177 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+/// Atomic control options
+class AtomicOptionsOverride;
+class AtomicOptions {
+public:
+ using storage_type = uint16_t;
+
+ static constexpr unsign
@@ -1096,6 +1100,177 @@ inline void FPOptions::applyChanges(FPOptionsOverride
FPO) {
*this = FPO.applyOverrides(*this);
}
+/// Atomic control options
+class AtomicOptionsOverride;
+class AtomicOptions {
+public:
+ using storage_type = uint16_t;
+
+ static constexpr unsign
@@ -22,16 +35,164 @@ using namespace llvm;
namespace cir {
namespace direct {
+// This pass requires the CIR to be in a "flat" state. All blocks in each
+// function must belong to the parent region. Once scopes and control flow
+// are implemented in CIR, a pass will be run b
@@ -22,16 +35,164 @@ using namespace llvm;
namespace cir {
namespace direct {
+// This pass requires the CIR to be in a "flat" state. All blocks in each
+// function must belong to the parent region. Once scopes and control flow
+// are implemented in CIR, a pass will be run b
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl,
FunctionDeclBits.IsLateTemplateParsed = ILT;
}
+ bool isInstantiatedFromMemberTemplate() const {
+return FunctionDeclBits.IsInstantiatedFromMemberTemplate;
+ }
+ void setInstantiatedFromMemberTempl
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/125266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -2298,6 +2298,13 @@ class FunctionDecl : public DeclaratorDecl,
FunctionDeclBits.IsLateTemplateParsed = ILT;
}
+ bool isInstantiatedFromMemberTemplate() const {
+return FunctionDeclBits.IsInstantiatedFromMemberTemplate;
+ }
+ void setInstantiatedFromMemberTempl
@@ -2525,8 +2525,11 @@ void TextNodeDumper::VisitCXXRecordDecl(const
CXXRecordDecl *D) {
OS << " instantiated_from";
dumpPointer(Instance);
}
- if (const auto *CTSD = dyn_cast(D))
+ if (const auto *CTSD = dyn_cast(D)) {
dumpTemplateSpecializationKind(CTSD->get
https://github.com/erichkeane approved this pull request.
I think the 'strict patch match' is valuable in the AST since the paper
introduces it as a term of art. I hate our ast-print formats at times, but
this is fine to me.
https://github.com/llvm/llvm-project/pull/125372
___
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/125372
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3492,10 +3492,13 @@ VarDecl *BindingDecl::getHoldingVar() const {
return VD;
}
-llvm::ArrayRef BindingDecl::getBindingPackExprs() const {
+llvm::ArrayRef BindingDecl::getBindingPackDecls() const {
assert(Binding && "expecting a pack expr");
- auto *RP = cast(Binding)
https://github.com/erichkeane commented:
A few nits, else this is great, thank you!
https://github.com/llvm/llvm-project/pull/125394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4278,25 +4276,21 @@ class DecompositionDecl final
// Provide a flattened range to visit each binding.
auto flat_bindings() const {
llvm::ArrayRef Bindings = bindings();
-llvm::ArrayRef PackExprs;
+llvm::ArrayRef PackBindings;
// Split the bindings int
@@ -1197,25 +1197,17 @@ Decl
*TemplateDeclInstantiator::VisitDecompositionDecl(DecompositionDecl *D) {
for (auto *NewBD : NewBindings)
NewBD->setInvalidDecl();
- if (OldResolvedPack) {
-// Mark the holding vars (if any) in the pack as instantiated since
-//
@@ -4278,25 +4276,21 @@ class DecompositionDecl final
// Provide a flattened range to visit each binding.
auto flat_bindings() const {
llvm::ArrayRef Bindings = bindings();
-llvm::ArrayRef PackExprs;
+llvm::ArrayRef PackBindings;
// Split the bindings int
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/125394
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
https://github.com/erichkeane commented:
Share some of Corentin's concerns, else just a few comments.
https://github.com/llvm/llvm-project/pull/125453
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listin
@@ -1909,7 +1909,19 @@ class Sema final : public SemaBase {
/// '\#pragma clang attribute push' directives to the given declaration.
void AddPragmaAttributes(Scope *S, Decl *D);
- void PrintPragmaAttributeInstantiationPoint();
+ using DiagFuncRef =
+ llvm::function_
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/125453
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,16 +34,156 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
https://github.com/erichkeane approved this pull request.
LGTM, but Bruno has an open, and I would love more details to one of the
comments (re-flat CIR) if it is a sensible request.
https://github.com/llvm/llvm-project/pull/125260
___
cfe-commits mai
@@ -22,16 +34,156 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/125260
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -22,16 +34,156 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -1,8 +1,10 @@
// Smoke test for ClangIR-to-LLVM IR code generation
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o
- | FileCheck %s
-// TODO: Add checks when proper lowering is implemented.
-// For now, we're just creating an empty mod
@@ -31,6 +33,24 @@ namespace direct {
std::unique_ptr
lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp mlirModule,
llvm::LLVMContext &llvmCtx);
+
+class CIRToLLVMGlobalOpLowering
+: public mlir::OpConversionPattern {
+ mlir::DataLayout const &dataLa
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -1,8 +1,10 @@
// Smoke test for ClangIR-to-LLVM IR code generation
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o
- | FileCheck %s
-// TODO: Add checks when proper lowering is implemented.
-// For now, we're just creating an empty mod
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -50,8 +50,8 @@ struct testRecoverStrictnessStruct { };
#pragma clang attribute pop
-#pragma clang attribute push (__attribute__((abi_tag("a"))), apply_to =
any(function, record(unless(is_union)), variable, enum))
-// expected-error@-1 {{attribute 'abi_tag' cannot be appli
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -1,8 +1,10 @@
// Smoke test for ClangIR-to-LLVM IR code generation
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -fclangir -emit-llvm %s -o
- | FileCheck %s
-// TODO: Add checks when proper lowering is implemented.
-// For now, we're just creating an empty mod
@@ -22,13 +34,127 @@ using namespace llvm;
namespace cir {
namespace direct {
+struct ConvertCIRToLLVMPass
+: public mlir::PassWrapper> {
+ void getDependentDialects(mlir::DialectRegistry ®istry) const override {
+registry.insert();
+ }
+ void runOnOperation() final
@@ -31,6 +33,24 @@ namespace direct {
std::unique_ptr
lowerDirectlyFromCIRToLLVMIR(mlir::ModuleOp mlirModule,
llvm::LLVMContext &llvmCtx);
+
+class CIRToLLVMGlobalOpLowering
+: public mlir::OpConversionPattern {
+ mlir::DataLayout const &dataLa
@@ -5570,8 +5570,10 @@ ExprResult Sema::BuildCXXDefaultArgExpr(SourceLocation
CallLoc,
/*SkipImmediateInvocations=*/NestedDefaultChecking))
return ExprError();
+ Expr *RewrittenExpr = Init == Param->getDefaultArg() ? nullptr : Init;
erichkeane
https://github.com/erichkeane commented:
I'm WAY happier with this. I don't have the ability to review the SA stuff
well enough to give an approval, but the rest of the stuff is good. 1 Nit,
else LGTM.
https://github.com/llvm/llvm-project/pull/117437
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/117437
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/125128
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
> It turns out we weren't handling one case: the value-initialization of a
> field inside a struct.
>
> I'm not sure why this falls under `IK_Direct` rather than `IK_Value` in
> Clang, but it seems to work.
Looks like (according to item 6 here)
https://en.cppreference.com/w
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/124650
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
I don't have a great solution for this unfortuantely, but `HasRebuiltInit`
doesn't seem right to me, it looks like we're just trying to smuggle a bit
around for a few . First, it doesn't seem clear to me why the 'rebuilt-ness'
of an initializer should have anything to do wit
@@ -7986,6 +7986,12 @@ void Parser::ParseParameterDeclarationClause(
if (getLangOpts().HLSL)
MaybeParseHLSLAnnotations(DS.getAttributes());
+if (ParmDeclarator.getDeclarationAttributes().size() &&
erichkeane wrote:
```suggestion
if (!ParmDec
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/124920
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 2134 matches
Mail list logo