aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ir.c
Commit message (Collapse)AuthorAgeFilesLines
* C99 complex types MVP lemon2026-04-131-0/+1
| | | | | | | | | Missing: static eval of complex values, Silly inefficient implementation of equality comparisons between them The whole thing is pretty inefficient without proper aggregate mem2reg anyway
* backend: fix memory leak from not calling deluses() after replcuses in some ↵ lemon2026-04-111-6/+5
| | | | places
* backend: run mem2reg after inlining lemon2026-04-111-1/+5
|
* mkintcon: bugfix clamp i32 to i32 range lemon2026-04-091-2/+4
|
* abi: fix use bug preventing mem2reg optimization of struct return lemon2026-03-251-4/+4
|
* IR: emit inline function standalone bodies lazily lemon2026-03-231-2/+9
| | | | | | | If a function is stashed for inlining and inlined in all of its callsites or unused, it never ends up in the object file. If any symbol reference to it is emitted, then it must be de-inlined (rematerialized), and this is done near the end before emitting the actual object file.
* IR: mark free'd instructions as such lemon2026-03-231-15/+26
| | | | | That way they are not copied when inlining. Also rename ninstr -> ninstrtab. opnarg -> opnoper
* style: change uvlong -> u64int, vlong -> s64int lemon2026-03-221-1/+1
| | | | | Is much nicer. I don't know whether I want to do it for the other int types too. char and uchar are fine as bytes. u/short -> u/s16int, maybe.
* IR: add 3rd operand to Instr lemon2026-03-221-1/+1
| | | | | The motivation is for aarch64 msub/madd instrs, for isel to produce. But it should be useful for other things too.
* ir: do not always try to put small literals in .text lemon2026-03-191-1/+10
| | | | | OpenBSD enforces read xor execute (XOM) even in x86-64. Not aware of any other platforms that do this.
* Refactor: use typedefs and CamelCase for aggregate types lemon2026-03-181-92/+92
| | | | Looks nicer
* Refactor: move some utils from antcc.h to their own headers lemon2026-03-171-0/+1
|
* REFACTOR: finish renaming lemon2026-03-171-3/+3
|
* REFACTOR: move sources to src/ lemon2026-03-171-0/+689