https://github.com/bcardosolopes approved this pull request.
https://github.com/llvm/llvm-project/pull/132266
___
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/132266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/132266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -165,6 +165,25 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr
*e) {
return LValue();
}
+mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) {
erichkeane wrote:
Sorry, I meant in 'clang' we consider Bool to be 8 bit(when stored)
@@ -165,6 +165,25 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr
*e) {
return LValue();
}
+mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) {
andykaylor wrote:
I'm not sure `Bool` is ever used to represent an `i8`. Typically the
@@ -280,3 +313,77 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const
ReturnStmt &s) {
return mlir::success();
}
+
+mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) {
+ cir::ForOp forOp;
+
+ // TODO: pass in an array of attributes.
+ auto forStmt
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/132266
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -165,6 +165,25 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr
*e) {
return LValue();
}
+mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) {
erichkeane wrote:
This should only be necessary in C, right? Where 'bool' isn't avail
@@ -280,3 +313,77 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const
ReturnStmt &s) {
return mlir::success();
}
+
+mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) {
+ cir::ForOp forOp;
+
+ // TODO: pass in an array of attributes.
+ auto forStmt
@@ -52,6 +52,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return cir::BoolAttr::get(getContext(), getBoolTy(), state);
}
+ /// Create a for operation.
+ cir::ForOp createFor(
+ mlir::Location loc,
+ llvm::function_ref condBuilder,
@@ -280,3 +313,77 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const
ReturnStmt &s) {
return mlir::success();
}
+
+mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) {
+ cir::ForOp forOp;
+
+ // TODO: pass in an array of attributes.
+ auto forStmt
@@ -280,3 +313,77 @@ mlir::LogicalResult CIRGenFunction::emitReturnStmt(const
ReturnStmt &s) {
return mlir::success();
}
+
+mlir::LogicalResult CIRGenFunction::emitForStmt(const ForStmt &s) {
+ cir::ForOp forOp;
+
+ // TODO: pass in an array of attributes.
+ auto forStmt
@@ -165,6 +165,25 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr
*e) {
return LValue();
}
+mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) {
erichkeane wrote:
Ah, I see. So even 8-bit 'bool' type is getting converted. It is a
@@ -52,6 +52,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return cir::BoolAttr::get(getContext(), getBoolTy(), state);
}
+ /// Create a for operation.
+ cir::ForOp createFor(
+ mlir::Location loc,
+ llvm::function_ref condBuilder,
@@ -165,6 +165,25 @@ LValue CIRGenFunction::emitDeclRefLValue(const DeclRefExpr
*e) {
return LValue();
}
+mlir::Value CIRGenFunction::evaluateExprAsBool(const Expr *e) {
andykaylor wrote:
Even for C, we want to generate a cir.bool value. The classic codege
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Andy Kaylor (andykaylor)
Changes
This change adds support for empty for-loops. This will be the infrastructre
needed for complete for loops, but that depends on compare operations, which
have not been upstreamed yet.
---
Patch is 46.30
@@ -52,6 +52,15 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return cir::BoolAttr::get(getContext(), getBoolTy(), state);
}
+ /// Create a for operation.
+ cir::ForOp createFor(
+ mlir::Location loc,
+ llvm::function_ref condBuilder,
llvmbot wrote:
@llvm/pr-subscribers-clangir
Author: Andy Kaylor (andykaylor)
Changes
This change adds support for empty for-loops. This will be the infrastructre
needed for complete for loops, but that depends on compare operations, which
have not been upstreamed yet.
---
Patch is 46.3
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/132266
This change adds support for empty for-loops. This will be the infrastructre
needed for complete for loops, but that depends on compare operations, which
have not been upstreamed yet.
>From 20c016291947451b
19 matches
Mail list logo