Skip to content

Commit

Permalink
Add more dialects to ods (#534)
Browse files Browse the repository at this point in the history
There are some dialects that fail to parse with the macro, and i don't
know much about the inner workings of the macro, ill try to look into it
maybe
  • Loading branch information
edg-l authored May 3, 2024
1 parent 2f4659c commit d43b64e
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
"tblgen",
"tosa",
"unranked",
"irdl",
"IRDL",
"DLTI",
"vulkan"
]
}
22 changes: 21 additions & 1 deletion melior/src/dialect/ods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ melior_macro::dialect! {
name: "async",
table_gen: r#"include "mlir/Dialect/Async/IR/AsyncOps.td""#
}
melior_macro::dialect! {
name: "amx",
table_gen: r#"include "mlir/Dialect/AMX/AMX.td""#
}
melior_macro::dialect! {
name: "builtin",
table_gen: r#"include "mlir/IR/BuiltinOps.td""#
Expand All @@ -39,10 +43,18 @@ melior_macro::dialect! {
name: "bufferization",
table_gen: r#"include "mlir/Dialect/Bufferization/IR/BufferizationOps.td""#
}
melior_macro::dialect! {
name: "complex",
table_gen: r#"include "mlir/Dialect/Complex/IR/ComplexBase.td" include "mlir/Dialect/Complex/IR/ComplexOps.td""#
}
melior_macro::dialect! {
name: "cf",
table_gen: r#"include "mlir/Dialect/ControlFlow/IR/ControlFlowOps.td""#
}
melior_macro::dialect! {
name: "dlti",
table_gen: r#"include "mlir/Dialect/DLTI/DLTI.td""#
}
melior_macro::dialect! {
name: "func",
table_gen: r#"include "mlir/Dialect/Func/IR/FuncOps.td""#
Expand All @@ -51,6 +63,10 @@ melior_macro::dialect! {
name: "index",
table_gen: r#"include "mlir/Dialect/Index/IR/IndexOps.td""#
}
melior_macro::dialect! {
name: "irdl",
table_gen: r#"include "mlir/Dialect/IRDL/IR/IRDL.td""#
}
melior_macro::dialect! {
name: "llvm",
// spell-checker: disable-next-line
Expand Down Expand Up @@ -112,6 +128,10 @@ melior_macro::dialect! {
name: "vector",
table_gen: r#"include "mlir/Dialect/Vector/IR/VectorOps.td""#
}
melior_macro::dialect! {
name: "x86vector",
table_gen: r#"include "mlir/Dialect/X86Vector/X86Vector.td""#
}

#[cfg(test)]
mod tests {
Expand Down Expand Up @@ -238,7 +258,7 @@ mod tests {
block.append_operation(
llvm::AllocaOperation::builder(&context, location)
.array_size(alloca_size)
.elem_type(TypeAttribute::new(integer_type.into()))
.elem_type(TypeAttribute::new(integer_type))
.res(dialect::llvm::r#type::pointer(&context, 0))
.build()
.into(),
Expand Down

0 comments on commit d43b64e

Please sign in to comment.