Commit Graph

13 Commits

Author SHA1 Message Date
e1f7f46d3e 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.
2026-01-16 10:01:19 +00:00
11fc7a6ca9 mie: implement an interface system for ops
this system allows dialects to register named interfaces, which are collections of function
pointers. an op can then implement this interface, providing callbacks for the interface's
virtual function pointers.

C code can request a pointer to an op's implementation of a given interface and call
virtual functions with no knowledge required about the op itself. this functonality
will also be extended to types, attributes, and dialects themselves.
2026-01-14 18:17:38 +00:00
d19e8626da mie: stop using movable memory for mie_name instances.
any struct that contains a mie_name cannot be stored in movable memory
(i.e. any memory that may be re-allocated using realloc(), or whose
contents may be moved to a different buffer).

mie_names form part of a bst when they are added to a mie_name_map,
and moving them after this happens will result in the bst pointers
being invalidated. this causes some obscure and hard-to-debug
memory errors.

all structs that contain a mie_name (including named IR objects like
mie_register and mie_block) are no longer stored directly in vectors.
rather, vectors of pointers are used instead.
2026-01-12 10:40:57 +00:00
4a0fcef862 mie: add support for adding traits to types and ops 2026-01-11 14:14:43 +00:00
e76e7c17db mie: move op and type definition from dialect/ to ir/ and type/ respectively 2026-01-08 22:16:50 +00:00
f9a2cf3b8e mie: remove all legacy ir and select code 2025-12-21 13:51:26 +00:00
39f9f6800e mie: builder: fix incorrect result type for comparison operations 2025-11-15 22:35:24 +00:00
5bf893651e mie: update bluelib api usage 2025-11-06 10:38:50 +00:00
6b62e81ac0 mie: ir: implement generation and text output of phi instruction 2025-09-08 15:35:35 +01:00
e44af45bc3 mie: add null IR value 2025-09-08 15:33:25 +01:00
1901a8ae3b mie: move mie_type_to_string to type.c 2025-08-29 15:46:12 +01:00
44e242615b mie: move mie_ctx out of the ir subsystem 2025-08-16 20:53:40 +01:00
9ad4b91eaf mie: refactor ir api into a separate sub-directory 2025-06-02 11:31:19 +01:00