aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir.h
Commit message (Collapse)AuthorAgeFilesLines
* regalloc: start implementing linear scanlemon2025-09-081-1/+4
|
* regalloc fixes and rpolemon2023-07-091-1/+2
|
* add initializers (only static for initialier list rn)lemon2023-06-291-12/+4
| | | | and other fixes
* backend: fix mem2reg & regalloclemon2023-06-261-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | they were broken, especially for unstructured control flow. most significant fix is to register allocator for temporaries that are used before the first definition in the source order, e.g.: @1: %x = add %y, 1 b @3 @2 %y = ... b @1 it's legal for %x to use %y there (assuming @2 dominates @1) but from the point of view of the register allocator %y is defined and freed and then used again, which broke things. the fix is to introduce phis for this situation: @1: %y.1 = phi @2 %y %x = add %y.1, 1 b @3 @2 %y = ... b @1 then regalloc phi handling code makes it work
* fix regalloc thinking some ins are dead by adding ins.keeplemon2023-06-241-1/+2
|
* backend: fix regalloc to work with more complex dataflowlemon2023-06-241-5/+10
| | | | | | | | basically an allocation map at the beginning (in) and end (out) of each block is kept and after the first allocation pass another pass is ran to resolve allocation conflicts between each edge, plus another pass to finish lowering phi functions. also introduced `regset` and plenty of other miscellaneous fixes
* change RMORE -> RADDR; use RXXX (RNONE) for special args,also undeflemon2023-06-221-14/+15
|
* misc fixlemon2023-06-221-1/+2
|
* mem2reg: implement ssa construction; this breaks regalloc right nowlemon2023-06-211-14/+15
|
* explicitly store predecessors in each blocklemon2023-06-211-12/+13
|
* amd64/emit: ensure stack is 16-byte alignedlemon2023-06-201-0/+1
|
* add basic mem2reglemon2023-06-201-1/+11
| | | | | | | promotes uniform stack slots to temporaries currently only for immutable variables, next thing to implement is ssa construction
* don't lower params and args to registers in abi0lemon2023-06-201-1/+1
| | | | | it's better to do it later, currently in isel(), but perhaps in a pre-isel abi1 pass
* fix cls logic for comparison instrslemon2023-06-201-2/+4
| | | | | | | | previously instr.cls always represented the output dataclass. this doesn't work for comparisons because we know the output is always a boolean integer and we care about the actual comparison dataclass. so now .cls represents the operation dataclass, which matches the result class except for comparisons where the result is always KI4V
* backend: compile comparison instrs and brancheslemon2023-06-191-0/+1
|
* fix isel & emit for sym constantslemon2023-06-191-0/+1
|
* ELF output static datalemon2023-06-181-2/+3
|
* basic ELF outputlemon2023-06-171-0/+1
|
* misclemon2023-06-171-0/+6
|
* simpler handling of large constants in IRlemon2023-06-141-4/+8
|
* lowering of structcopylemon2023-06-131-0/+2
|
* use a hashtable for addr refslemon2023-06-131-1/+2
|
* lower allocas in isel() instead of emit() and misc fixeslemon2023-06-131-8/+9
|
* register renaming and suchlemon2023-06-121-1/+1
|
* remove RPARAM, add Oparam, lower args/rets to abi regs in abi0lemon2023-06-111-4/+9
|
* isel skeletonlemon2023-06-101-7/+19
|
* codegen skeletonlemon2023-06-061-0/+5
|
* encode calls a different way in the IRlemon2023-06-051-7/+8
|
* stylelemon2023-06-051-3/+2
|
* strlitslemon2023-06-051-5/+8
|
* abi lowering passlemon2023-06-041-17/+38
|
* basic ABI lowering of aggregateslemon2023-06-011-7/+26
|
* struct args and returnlemon2023-06-011-7/+14
|
* regalloc skeletonlemon2023-05-311-7/+32
|
* fix void conditional expr; condjump, condexprvalue optimizationslemon2023-05-311-0/+1
|
* phis?lemon2023-05-301-16/+24
|
* hmlemon2023-05-261-1/+1
|
* initial commitlemon2023-05-101-0/+117