[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Erich Keane via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Bruno Cardoso Lopes via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Shoaib Meenai via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Nathan Lanza via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Erich Keane via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Erich Keane via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Aaron Ballman via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Bruno Cardoso Lopes via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Bruno Cardoso Lopes via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread David Olsen via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread David Olsen via 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/5] [CIR] Call code gen; create empty cir.func op Finish hook

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-05 Thread Aaron Ballman via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread Eli Friedman via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-04 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-03 Thread Eli Friedman via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via 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/4] [CIR] Call code gen; create empty cir.func op Finish hook

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread David Olsen via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Nathan Lanza via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -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"

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Erich Keane via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via 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"

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -24,9 +27,135 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-11-01 Thread Aaron Ballman via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -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"

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -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.

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via 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/3] [CIR] Call code gen; create empty cir.func op Finish hook

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via 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"

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via 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"

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via 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"

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Schrodinger ZHU Yifan via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -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:

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -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,

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -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"

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via 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"

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -24,9 +27,140 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread Erich Keane via cfe-commits
@@ -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:

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via cfe-commits
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 _

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-31 Thread David Olsen via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Ronan Keryell via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Ronan Keryell via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Ronan Keryell via 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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Shoaib Meenai via cfe-commits
@@ -24,9 +27,149 @@ CIRGenModule::CIRGenModule(mlir::MLIRContext &context, clang::ASTContext &astctx, const clang::CodeGenOptions &cgo, DiagnosticsEngine &diags) -: astCtx(astctx), langOpts(ast

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread David Olsen via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Shoaib Meenai via cfe-commits
@@ -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)

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Shoaib Meenai via cfe-commits
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

[clang] [CIR] Call code gen; create empty cir.func op (PR #113483)

2024-10-28 Thread Shoaib Meenai via 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   2   >