summary refs log tree commit diff
path: root/lisc/spill.c
AgeCommit message (Collapse)Author
2015-09-15fix limit bug in spillQuentin Carbonneaux
I think this was not a big issue because the register allocator does not consume a register when it encounters obviously dead code.
2015-09-15start work on comparisonsQuentin Carbonneaux
There are two things I overlooked so far. 1. Binary instructions like cmp that do not have a result in registers need the size suffix sometimes, for example when comparing a spill location with a constant. 2. The register allocator needs to be adapted to support the comparison instruction: it is not possible to compare two spill locations without using a register.
2015-09-15use cmp $0, it works with spill slotsQuentin Carbonneaux
2015-09-15use a new Ref type for registersQuentin Carbonneaux
This might not be a good idea, the problem was that many spurious registers would be added to the Bits data-structures during compilation (and would always remain 0). However, doing the above modification de-uniformizes the handling of temps and regs, this makes the code longer and not really nicer. Also, additional Bits structures are required to track the registers independently. Overall this might be a bad idea to revert.
2015-09-15clean the commutativity + fix bug in emitQuentin Carbonneaux
The commutativity information only makes sense for arithmetic expressions. To account for that, I introduced a new tri-valued boolean type B3. Memory operations, for example, will receive an undefined commutativity trit. The code emitter was buggy when rega emitted instructions like 'rax = add 1, rax', this is now fixed using the commutativity information (we rewrite it in 'rax = add rax, 1').
2015-09-15add a code emitter for at&t syntaxQuentin Carbonneaux
2015-09-15simplify spillerQuentin Carbonneaux
It seems that this logic of shuffling stuff around between blocks should be handled by the register allocator instead: it *will* have to shuffle between registers, so we might as well mix some spill locations in.
2015-09-15finish spiller, now needs testing!Quentin Carbonneaux
2015-09-15standardize error messageQuentin Carbonneaux
2015-09-15factor some spilling logicQuentin Carbonneaux
2015-09-15comment and fix if(BSET(..)) bugQuentin Carbonneaux
2015-09-15add slot addressing and some more spillingQuentin Carbonneaux
2015-09-15prepare for block processingQuentin Carbonneaux
2015-09-15refine assertion in cost computationQuentin Carbonneaux
2015-09-15rework spilling code for jump argumentsQuentin Carbonneaux
2015-09-15refine precision of loop use setsQuentin Carbonneaux
2015-09-15move some debug output out of mainQuentin Carbonneaux
2015-09-15simplify tests for hdQuentin Carbonneaux
2015-09-15nicer debug, bug fixed in loop detectionQuentin Carbonneaux
2015-09-15attempt to fix loop uses/pressure in spillQuentin Carbonneaux
2015-09-15correct phi usage accountingQuentin Carbonneaux
2015-09-15simplificationsQuentin Carbonneaux
2015-09-15attempt more correct loop markingQuentin Carbonneaux
2015-09-15start working with loops in spill.cQuentin Carbonneaux
2015-09-15start work on spillerQuentin Carbonneaux