aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ir_mem2reg.c
Commit message (Collapse)AuthorAgeFilesLines
* mem2reg: improve on f9e3a52eaalemon2026-03-221-2/+18
| | | | | Move the alloca to the beginning of the block and do a 2nd pass on those odd cases.
* mem2reg: fix rare edge case with weird control flowlemon2026-03-221-0/+6
| | | | | | | | | mem2reg was assuming alloca's appeared before all their uses. When this didn't happen it broke the logic re. sealed blocks. Normally this doesn't happen in most natural code. Even with gotos, RPO would assure this in most cases, the exception I found is a goto that jumps into a loop past a variable declaration that is earlier in the loop. Then even RPO would keep the alloca itself past the first uses, breaking things.
* IR: add 3rd operand to Instrlemon2026-03-221-2/+2
| | | | | The motivation is for aarch64 msub/madd instrs, for isel to produce. But it should be useful for other things too.
* Refactor: use typedefs and CamelCase for aggregate typeslemon2026-03-181-47/+47
| | | | Looks nicer
* Refactor: move some utils from antcc.h to their own headerslemon2026-03-171-0/+1
|
* REFACTOR: move sources to src/lemon2026-03-171-0/+317