github-actions[bot] wrote:
@dkolsen-pgi Congratulations on having your first Pull Request (PR) merged into
the LLVM Project!
Your changes will be combined with recent changes from other authors, then
tested by our [build bots](https://lab.llvm.org/buildbot/). If there is a
problem with a bu
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/113483
___
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.
Thanks David!
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
smeenai wrote:
I created https://github.com/llvm/clangir/issues/1062 to track the location
discussion in the incubator so that we can come back to it when the time is
right.
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing lis
https://github.com/lanza approved this pull request.
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
@lanza and @bcardosolopes are code owners here, so we need a +1 from one of you
two. I'll squash/merge for David after that happens (and when he/I are ready
for it:) ).
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commi
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AaronBallman approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
bcardosolopes wrote:
> Again though, a `FIXME: at one point we should capture macro expansions here
> so we can diagnose expansions more thoroughly` is perhaps not a bad addition
> here.
+1
https://github.com/llvm/llvm-project/pull/113483
___
cfe-co
@@ -52,10 +62,33 @@ class CIRGenModule : public CIRGenTypeCache {
/// A "module" matches a c/cpp source file: containing a list of functions.
mlir::ModuleOp theModule;
+ clang::DiagnosticsEngine &diags;
+
const clang::TargetInfo ⌖
public:
+ mlir::ModuleOp getModule
@@ -52,10 +62,33 @@ class CIRGenModule : public CIRGenTypeCache {
/// A "module" matches a c/cpp source file: containing a list of functions.
mlir::ModuleOp theModule;
+ clang::DiagnosticsEngine &diags;
+
const clang::TargetInfo ⌖
public:
+ mlir::ModuleOp getModule
https://github.com/dkolsen-pgi updated
https://github.com/llvm/llvm-project/pull/113483
>From fd38921f9899e3e5ae538a94f123433119919731 Mon Sep 17 00:00:00 2001
From: David Olsen
Date: Wed, 23 Oct 2024 11:01:40 -0700
Subject: [PATCH 1/5] [CIR] Call code gen; create empty cir.func op
Finish hook
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -52,10 +62,33 @@ class CIRGenModule : public CIRGenTypeCache {
/// A "module" matches a c/cpp source file: containing a list of functions.
mlir::ModuleOp theModule;
+ clang::DiagnosticsEngine &diags;
+
const clang::TargetInfo ⌖
public:
+ mlir::ModuleOp getModule
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -53,6 +53,7 @@ class CIRGenerator : public clang::ASTConsumer {
~CIRGenerator() override;
void Initialize(clang::ASTContext &astCtx) override;
bool HandleTopLevelDecl(clang::DeclGroupRef group) override;
+ mlir::ModuleOp getModule();
dkolsen-pgi wrote
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -31,9 +34,14 @@ void CIRGenerator::Initialize(ASTContext &astCtx) {
this->astCtx = &astCtx;
- cgm = std::make_unique(*mlirCtx, astCtx, codeGenOpts, diags);
+ mlirCtx = std::make_unique();
+ mlirCtx->getOrLoadDialect();
dkolsen-pgi wrote:
Fixed. Chan
https://github.com/dkolsen-pgi updated
https://github.com/llvm/llvm-project/pull/113483
>From fd38921f9899e3e5ae538a94f123433119919731 Mon Sep 17 00:00:00 2001
From: David Olsen
Date: Wed, 23 Oct 2024 11:01:40 -0700
Subject: [PATCH 1/4] [CIR] Call code gen; create empty cir.func op
Finish hook
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -52,10 +62,33 @@ class CIRGenModule : public CIRGenTypeCache {
/// A "module" matches a c/cpp source file: containing a list of functions.
mlir::ModuleOp theModule;
+ clang::DiagnosticsEngine &diags;
+
const clang::TargetInfo ⌖
public:
+ mlir::ModuleOp getModule
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -53,6 +53,7 @@ class CIRGenerator : public clang::ASTConsumer {
~CIRGenerator() override;
void Initialize(clang::ASTContext &astCtx) override;
bool HandleTopLevelDecl(clang::DeclGroupRef group) override;
+ mlir::ModuleOp getModule();
dkolsen-pgi wrote
@@ -31,9 +34,14 @@ void CIRGenerator::Initialize(ASTContext &astCtx) {
this->astCtx = &astCtx;
- cgm = std::make_unique(*mlirCtx, astCtx, codeGenOpts, diags);
+ mlirCtx = std::make_unique();
+ mlirCtx->getOrLoadDialect();
lanza wrote:
There's a `loadDia
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -31,9 +34,14 @@ void CIRGenerator::Initialize(ASTContext &astCtx) {
this->astCtx = &astCtx;
- cgm = std::make_unique(*mlirCtx, astCtx, codeGenOpts, diags);
+ mlirCtx = std::make_unique();
+ mlirCtx->getOrLoadDialect();
AaronBallman wrote:
I'm surpris
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -53,6 +53,7 @@ class CIRGenerator : public clang::ASTConsumer {
~CIRGenerator() override;
void Initialize(clang::ASTContext &astCtx) override;
bool HandleTopLevelDecl(clang::DeclGroupRef group) override;
+ mlir::ModuleOp getModule();
AaronBallman wrot
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -13,4 +13,22 @@
#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
#define LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
+#include "mlir/IR/Builders.h"
+#include "mlir/IR/BuiltinOps.h"
+#include "mlir/IR/BuiltinTypes.h"
+#include "mlir/IR/Dialect.h"
+#include "mlir/IR/OpDefinition.h"
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -10,4 +10,57 @@
//
//===--===//
-#include
+#include "clang/CIR/Dialect/IR/CIRDialect.h"
+
+#include "mlir/Support/LogicalResult.h"
+
+#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -13,4 +13,22 @@
#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
#define LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
+#include "mlir/IR/Builders.h"
AaronBallman wrote:
I think we'd usually have the clang includes first though so there's less
chance of accidental
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
AaronBallman wrote:
Yeah, this was part of
https://github.com/llvm/llvm-project/pull/86080#discussion_r1535454524 and is
actually s
@@ -52,10 +62,33 @@ class CIRGenModule : public CIRGenTypeCache {
/// A "module" matches a c/cpp source file: containing a list of functions.
mlir::ModuleOp theModule;
+ clang::DiagnosticsEngine &diags;
+
const clang::TargetInfo ⌖
public:
+ mlir::ModuleOp getModule
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -16,4 +16,87 @@
include "clang/CIR/Dialect/IR/CIRDialect.td"
+include "mlir/Interfaces/ControlFlowInterfaces.td"
+include "mlir/Interfaces/FunctionInterfaces.td"
+include "mlir/Interfaces/InferTypeOpInterface.td"
+include "mlir/Interfaces/LoopLikeInterface.td"
+include "ml
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -13,4 +13,22 @@
#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
#define LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
+#include "mlir/IR/Builders.h"
+#include "mlir/IR/BuiltinOps.h"
+#include "mlir/IR/BuiltinTypes.h"
+#include "mlir/IR/Dialect.h"
+#include "mlir/IR/OpDefinition.h"
@@ -13,4 +13,22 @@
#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
#define LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
+#include "mlir/IR/Builders.h"
dkolsen-pgi wrote:
`git clang-format` will alphabetize a block of includes that are not separated
by blank lines.
https://github.com/dkolsen-pgi updated
https://github.com/llvm/llvm-project/pull/113483
>From fd38921f9899e3e5ae538a94f123433119919731 Mon Sep 17 00:00:00 2001
From: David Olsen
Date: Wed, 23 Oct 2024 11:01:40 -0700
Subject: [PATCH 1/3] [CIR] Call code gen; create empty cir.func op
Finish hook
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -10,4 +10,57 @@
//
//===--===//
-#include
+#include "clang/CIR/Dialect/IR/CIRDialect.h"
+
+#include "mlir/Support/LogicalResult.h"
+
+#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -10,4 +10,57 @@
//
//===--===//
-#include
+#include "clang/CIR/Dialect/IR/CIRDialect.h"
+
+#include "mlir/Support/LogicalResult.h"
+
+#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"
https://github.com/erichkeane commented:
A few nits along the way. Thanks for the patch!
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
erichkeane wrote:
Parm capitalization on this function is odd, usually we use capitals for this
in clang? Was this discussed on the
erichkeane wrote:
> > Does https://mlir.llvm.org/docs/Dialects/Builtin/#fusedloc suit the
> > situation [of recording locations of macro expansions]?
>
> Maybe? Right now I think `FusedLoc` is used by ClangIR to represent a source
> range. Maybe it also could be used for macro expansion locati
@@ -10,4 +10,57 @@
//
//===--===//
-#include
+#include "clang/CIR/Dialect/IR/CIRDialect.h"
+
+#include "mlir/Support/LogicalResult.h"
+
+#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"
SchrodingerZhu wrote:
Does https://mlir.llvm.org/docs/Dialects/Builtin/#fusedloc
suit the situation?
On Thu, Oct 31, 2024 at 15:48, David Olsen ***@***.***> wrote:
@dkolsen-pgi commented on this pull request. In
clang/lib/CIR/CodeGen/CIRGenModule.cpp: > @@ -24,9 +27,140 @@
CIRGenModule::CI
dkolsen-pgi wrote:
> Does https://mlir.llvm.org/docs/Dialects/Builtin/#fusedloc suit the situation
> [of recording locations of macro expansions]?
Maybe? Right now I think `FusedLoc` is used by ClangIR to represent a source
range. Maybe it also could be used for macro expansion locations. I
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -53,6 +53,7 @@ class CIRGenerator : public clang::ASTConsumer {
~CIRGenerator() override;
void Initialize(clang::ASTContext &astCtx) override;
bool HandleTopLevelDecl(clang::DeclGroupRef group) override;
+ mlir::ModuleOp getModule();
erichkeane wrote:
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -13,4 +13,22 @@
#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
#define LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
+#include "mlir/IR/Builders.h"
erichkeane wrote:
These should be alphabetical, but IDK if capitalization is considered? But by
pure alphabetism,
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -13,4 +13,22 @@
#ifndef LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
#define LLVM_CLANG_CIR_DIALECT_IR_CIRDIALECT_H
+#include "mlir/IR/Builders.h"
+#include "mlir/IR/BuiltinOps.h"
+#include "mlir/IR/BuiltinTypes.h"
+#include "mlir/IR/Dialect.h"
+#include "mlir/IR/OpDefinition.h"
@@ -16,4 +16,87 @@
include "clang/CIR/Dialect/IR/CIRDialect.td"
+include "mlir/Interfaces/ControlFlowInterfaces.td"
+include "mlir/Interfaces/FunctionInterfaces.td"
+include "mlir/Interfaces/InferTypeOpInterface.td"
+include "mlir/Interfaces/LoopLikeInterface.td"
+include "ml
@@ -10,4 +10,57 @@
//
//===--===//
-#include
+#include "clang/CIR/Dialect/IR/CIRDialect.h"
+
+#include "mlir/Support/LogicalResult.h"
+
+#include "clang/CIR/Dialect/IR/CIROpsDialect.cpp.inc"
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
@@ -53,6 +53,7 @@ class CIRGenerator : public clang::ASTConsumer {
~CIRGenerator() override;
void Initialize(clang::ASTContext &astCtx) override;
bool HandleTopLevelDecl(clang::DeclGroupRef group) override;
+ mlir::ModuleOp getModule();
erichkeane wrote:
https://github.com/dkolsen-pgi ready_for_review
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/dkolsen-pgi updated
https://github.com/llvm/llvm-project/pull/113483
>From fd38921f9899e3e5ae538a94f123433119919731 Mon Sep 17 00:00:00 2001
From: David Olsen
Date: Wed, 23 Oct 2024 11:01:40 -0700
Subject: [PATCH 1/2] [CIR] Call code gen; create empty cir.func op
Finish hook
dkolsen-pgi wrote:
> Is it at all possible to write a test to exercise the new functionality,
Yes, The change that I just committed includes updating the existing test to
verify that a `cir.func` op is generated correctly.
https://github.com/llvm/llvm-project/pull/113483
_
@@ -0,0 +1,38 @@
+//===- CIRAttrs.cpp - MLIR CIR Attributes
-===//
+//
+// 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
https://github.com/dkolsen-pgi updated
https://github.com/llvm/llvm-project/pull/113483
>From fd38921f9899e3e5ae538a94f123433119919731 Mon Sep 17 00:00:00 2001
From: David Olsen
Date: Wed, 23 Oct 2024 11:01:40 -0700
Subject: [PATCH 1/2] [CIR] Call code gen; create empty cir.func op
Finish hook
https://github.com/keryell edited
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/keryell commented:
Nice!
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,38 @@
+//===- CIRAttrs.cpp - MLIR CIR Attributes
-===//
+//
+// 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
@@ -24,9 +27,149 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context,
clang::ASTContext &astctx,
const clang::CodeGenOptions &cgo,
DiagnosticsEngine &diags)
-: astCtx(astctx), langOpts(ast
dkolsen-pgi wrote:
> Is it at all possible to write a test to exercise the new functionality,
Yes, I am planning to write a CIR code gen test as part of this PR, to verify
that a `cir.func` op is created. But there is some broken or missing
functionality that I need to fix first before I can
@@ -37,14 +40,39 @@ class CIRGenConsumer : public clang::ASTConsumer {
const LangOptions &LangOptions,
const FrontendOptions &FEOptions,
std::unique_ptr OS)
- : OutputStream(std::move(OS)), FS(VFS),
+ : Action(Action)
https://github.com/smeenai edited
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/smeenai commented:
Very minor nits :)
Is it at all possible to write a test to exercise the new functionality, or
will it just run into an NYI?
https://github.com/llvm/llvm-project/pull/113483
___
cfe-commits mailing list
cfe-commi
1 - 100 of 108 matches
Mail list logo