mie: ir: replace mie_module ir object with a builtin generic "module" op
the builtin.module op behaves exactly like any other op, and is designed to be a container for other ops of any type. it can be used as the top-level container for other ops (other top-level containers can be used instead). this also changes the file format. now, an ir file can only contain a single top-level op. any other ops in the ir must be contained directly or indirectly by this top-level op.
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
#include <mie/ir/module.h>
|
||||
#include <mie/ir/op.h>
|
||||
#include <mie/print/printer.h>
|
||||
|
||||
void mie_printer_print_module(
|
||||
struct mie_printer *printer, const struct mie_module *mod)
|
||||
{
|
||||
for (size_t i = 0; i < MIE_VECTOR_COUNT(mod->m_ops); i++) {
|
||||
mie_printer_print_op(printer, &mod->m_ops.items[i]);
|
||||
b_stream_write_char(printer->p_stream, '\n');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user