pub struct MlirBackend { /* private fields */ }Expand description
MLIR code generation backend.
Implementations§
Source§impl MlirBackend
impl MlirBackend
Sourcepub fn compile_add_func(&mut self, name: &str, bits: u32)
pub fn compile_add_func(&mut self, name: &str, bits: u32)
Add a simple integer add function.
Sourcepub fn compile_decl(
&mut self,
name: &str,
arg_types: Vec<MlirType>,
ret_type: MlirType,
)
pub fn compile_decl( &mut self, name: &str, arg_types: Vec<MlirType>, ret_type: MlirType, )
Compile a declaration to a simple wrapper function.
Sourcepub fn emit_module(&self) -> String
pub fn emit_module(&self) -> String
Emit the full MLIR module as text.
Sourcepub fn run_passes(&self) -> String
pub fn run_passes(&self) -> String
Generate the mlir-opt pass pipeline string.
Sourcepub fn module_mut(&mut self) -> &mut MlirModule
pub fn module_mut(&mut self) -> &mut MlirModule
Get the module (for further manipulation).
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MlirBackend
impl RefUnwindSafe for MlirBackend
impl Send for MlirBackend
impl Sync for MlirBackend
impl Unpin for MlirBackend
impl UnsafeUnpin for MlirBackend
impl UnwindSafe for MlirBackend
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more