aboutsummaryrefslogtreecommitdiffhomepage
path: root/ir.c
Commit message (Collapse)AuthorAgeFilesLines
* alloc changeslemon2025-09-171-2/+1
|
* mem2reg: fix deltrivialphis buglemon2025-09-151-3/+6
|
* a little refactoring and cleanuplemon2025-09-151-2/+2
|
* c: function-local static varslemon2025-09-121-0/+2
|
* oopslemon2025-09-111-1/+1
|
* preprocessor: more awful hackslemon2025-09-111-0/+2
|
* bugfixlemon2025-09-091-1/+1
|
* fixes, delnopslemon2025-09-091-2/+32
|
* regalloc: start implementing linear scanlemon2025-09-081-3/+19
|
* regalloc fixes and rpolemon2023-07-091-9/+20
|
* add initializers (only static for initialier list rn)lemon2023-06-291-39/+8
| | | | and other fixes
* backend: fix mem2reg & regalloclemon2023-06-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* ir: dattab shouldn't reset for every functionlemon2023-06-241-1/+1
| | | | this was causing later functions' data to override earlier data
* fix replcuseslemon2023-06-241-17/+16
|
* backend: fix regalloc to work with more complex dataflowlemon2023-06-241-9/+61
| | | | | | | | 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-5/+5
|
* misc fixlemon2023-06-221-4/+43
|
* mem2reg: implement ssa construction; this breaks regalloc right nowlemon2023-06-211-41/+106
|
* explicitly store predecessors in each blocklemon2023-06-211-60/+60
|
* add basic mem2reglemon2023-06-201-0/+1
| | | | | | | promotes uniform stack slots to temporaries currently only for immutable variables, next thing to implement is ssa construction
* backend: compile comparison instrs and brancheslemon2023-06-191-0/+9
|
* add endian.h for endian dependent stufflemon2023-06-181-31/+4
|
* fix memory bugslemon2023-06-181-4/+6
|
* ELF output static datalemon2023-06-181-14/+16
|
* basic ELF outputlemon2023-06-171-0/+17
|
* misclemon2023-06-171-13/+19
|
* less memsetlemon2023-06-151-3/+9
|
* simpler handling of large constants in IRlemon2023-06-141-7/+4
|
* lowering of structcopylemon2023-06-131-2/+3
|
* use a hashtable for addr refslemon2023-06-131-3/+25
|
* lower allocas in isel() instead of emit() and misc fixeslemon2023-06-131-6/+6
|
* remove RPARAM, add Oparam, lower args/rets to abi regs in abi0lemon2023-06-111-1/+2
|
* isel skeletonlemon2023-06-101-8/+14
|
* codegen skeletonlemon2023-06-061-1/+2
|
* encode calls a different way in the IRlemon2023-06-051-18/+3
|
* stylelemon2023-06-051-2/+2
|
* strlitslemon2023-06-051-9/+15
|
* command line switch for debug optionslemon2023-06-051-3/+0
|
* abi lowering passlemon2023-06-041-25/+95
|
* basic ABI lowering of aggregateslemon2023-06-011-23/+60
|
* struct args and returnlemon2023-06-011-7/+6
|
* regalloc skeletonlemon2023-05-311-1/+23
|
* fix void conditional expr; condjump, condexprvalue optimizationslemon2023-05-311-0/+21
|
* phis?lemon2023-05-301-14/+39
|
* bool fixeslemon2023-05-281-1/+1
|
* hmlemon2023-05-261-5/+5
|
* initial commitlemon2023-05-101-0/+221