Age | Commit message (Collapse) | Author | |
---|---|---|---|
2015-09-15 | forbid two memory operands for comparisons | Quentin Carbonneaux | |
2015-09-15 | fix a bug in setloc | Quentin Carbonneaux | |
The way we detected if limit had spilled a variable was incorrect. This is because two consecutive calls to limit could require a spill of the same variable. Instead, we now use a return value from limit. Note that this is still not so ideal. Indeed, it works properly only when limit spills one value only, if not, we should return a bitset. In the current use scheme of limit, this invariant is true but ideally we would like to call limit with *all arguments added at once*, not one after the other. | |||
2015-09-15 | add very nice spilling stress test | Quentin Carbonneaux | |
2015-09-15 | minor change in rpo walking | Quentin Carbonneaux | |
2015-09-15 | simplify frequent pred detection in rega | Quentin Carbonneaux | |
2015-09-15 | factor some comparison emitting code | Quentin Carbonneaux | |
2015-09-15 | add some more specific comments | Quentin Carbonneaux | |
2015-09-15 | the only wrong use count is the one of r | Quentin Carbonneaux | |
2015-09-15 | I forgot cmp as flag setting instruction! | Quentin Carbonneaux | |
2015-09-15 | jez becomes jnz, complete cmp+jmp contraction | Quentin Carbonneaux | |
2015-09-15 | implement smarter compare+branch | Quentin Carbonneaux | |
2015-09-15 | split cmp in two sizes | Quentin Carbonneaux | |
2015-09-15 | get rid of the iteration macro | Quentin Carbonneaux | |
2015-09-15 | fix two bugs in isel | Quentin Carbonneaux | |
2015-09-15 | fix 2 bad bugs in rega and improve substraction | Quentin Carbonneaux | |
The substraction contrained the register allocator to allocate a different register for the result and the second operand, now, we use a neg trick to compile it down. The machinery that was setup is, regardless, interesting and will have to be used for floating point computations (division). The first bug in rega made broke the explicited loop invariant: we were using register allocation unavailable information from other blocks. It's still unclear how we got wrong results from that considering mappings are all 0-initialized. The second bug is a stupid one, one sizeof operator was missing from a memcpy... | |||
2015-09-15 | use nreg only when != NReg | Quentin Carbonneaux | |
2015-09-15 | use a temporary for constant comparisons | Quentin Carbonneaux | |
2015-09-15 | fix limit bug in spill | Quentin 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-15 | remove useless TODO for now | Quentin Carbonneaux | |
2015-09-15 | quick fix for comparisons with constants | Quentin Carbonneaux | |
2015-09-15 | start work on comparisons | Quentin 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-15 | use cmp $0, it works with spill slots | Quentin Carbonneaux | |
2015-09-15 | use correct sizes during reg allocation | Quentin Carbonneaux | |
2015-09-15 | print registers with numbers | Quentin Carbonneaux | |
2015-09-15 | adapt emit to new Ref setting | Quentin Carbonneaux | |
2015-09-15 | use regs of the correct type in isel | Quentin Carbonneaux | |
2015-09-15 | use a new Ref type for registers | Quentin 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-15 | patch isel to use symbol types | Quentin Carbonneaux | |
2015-09-15 | silence clang warning | Quentin Carbonneaux | |
2015-09-15 | avoid name conflicts in enums | Quentin Carbonneaux | |
2015-09-15 | start change of representation for registers | Quentin Carbonneaux | |
2015-09-15 | start work on word/long handling | Quentin Carbonneaux | |
2015-09-15 | replace IA with X for x64 instructions | Quentin Carbonneaux | |
2015-09-15 | avoid keyword clash by using cons for constants | Quentin Carbonneaux | |
2015-09-15 | cosmetic modifications to parse.c | Quentin Carbonneaux | |
2015-09-15 | clean the commutativity + fix bug in emit | Quentin 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-15 | cosmetics | Quentin Carbonneaux | |
2015-09-15 | compress parsref code a little | Quentin Carbonneaux | |
2015-09-15 | start improving constants support | Quentin Carbonneaux | |
2015-09-15 | add TODO | Quentin Carbonneaux | |
2015-09-15 | add support for in-block reg. contraints | Quentin Carbonneaux | |
2015-09-15 | perform isel before code emission | Quentin Carbonneaux | |
2015-09-15 | emit some x86-sepcific instructions | Quentin Carbonneaux | |
2015-09-15 | compile emit module | Quentin Carbonneaux | |
2015-09-15 | add a code emitter for at&t syntax | Quentin Carbonneaux | |
2015-09-15 | silence clang warning | Quentin Carbonneaux | |
2015-09-15 | add crippled dce to the allocator | Quentin Carbonneaux | |
2015-09-15 | complete a crude register allocator | Quentin Carbonneaux | |
2015-09-15 | start work on parallel moves | Quentin Carbonneaux | |
2015-09-15 | initiate work on reg allocation | Quentin Carbonneaux | |