Age | Commit message (Collapse) | Author | |
---|---|---|---|
2015-09-15 | time execution | Quentin Carbonneaux | |
2015-09-15 | cosmetics | Quentin Carbonneaux | |
2015-09-15 | cleanup overflow computation | Quentin Carbonneaux | |
2015-09-15 | fix spill code | Quentin Carbonneaux | |
2015-09-15 | add `Ret jump and dump elf files | Quentin Carbonneaux | |
2015-09-15 | remove default tests in Elf | Quentin Carbonneaux | |
2015-09-15 | add popd in the Heap module | Quentin Carbonneaux | |
2015-09-15 | add simple Makefile | Quentin Carbonneaux | |
2015-04-04 | write down some more ideas | Quentin Carbonneaux | |
2015-04-01 | do not freeze r when allocating for r2 | Quentin Carbonneaux | |
2015-03-31 | update TODO with fix commit | Quentin Carbonneaux | |
2015-03-31 | tentative fix of messed up spills for phis | Quentin Carbonneaux | |
2015-03-31 | add bugs | Quentin Carbonneaux | |
2015-03-31 | avoid evicting arguments | Quentin Carbonneaux | |
2015-03-31 | add move constant to spill | Quentin Carbonneaux | |
2015-03-31 | better support for constants | Quentin Carbonneaux | |
2015-03-27 | refine TODO | Quentin Carbonneaux | |
2015-03-27 | add a scratch TODO | Quentin Carbonneaux | |
2015-03-25 | expect reg in brz, might not be true | Quentin Carbonneaux | |
2015-03-25 | simplify label logic | Quentin Carbonneaux | |
2015-03-25 | branch code | Quentin Carbonneaux | |
2015-03-25 | more codegen | Quentin Carbonneaux | |
2015-03-25 | start writing some codegen | Quentin Carbonneaux | |
2015-02-20 | improvements to elf.ml | Quentin Carbonneaux | |
2015-02-20 | fix bugs in movgen | Quentin Carbonneaux | |
2015-02-20 | start work on movgen | Quentin Carbonneaux | |
2015-02-18 | cosmetics | Quentin Carbonneaux | |
2015-02-18 | add spill test | Quentin Carbonneaux | |
2015-02-18 | kind of working! | Quentin Carbonneaux | |
2015-02-18 | wip | Quentin Carbonneaux | |
2015-02-18 | wip | Quentin Carbonneaux | |
2015-02-15 | add notes | Quentin Carbonneaux | |
I start to believe that it is possible to simply reuse the regalloc I wrote. All the data structures seem fine. Here is a list modifications to make for sure: - Keep track of the mapping for live in variables for each block. - Make sure 'loc' (or a new function) returns registers for the arguments of base instructions. Spilling -------- When we need a register and none are left. If we are at the end of a block, simply spill anybody (the resolving will take care of adding the moves). If we are in a block, find somebody to spill and its next use, if the next use is in the same block, emit reload code, otherwise, decide to emit the reload at the end of the cheapest block (this means that we have to patch some mappings that were already stored). We let the resolve handle the insertion of the reload code. Example: +----------------------+ | | | | | +----+ +----+ | +----+ -+-> | b1 | --> | b2 | -+-> | b3 | --> +----+ +----+ +----+ ^ ^ Spill x First use of x (Was in r1) The cheapest position for reload code is at the beginning of b3, so we have to modify the mapping at the end of b1, beginning of b2, and end of b2 to change it from (x -> r1) to (x -> spill). Reloading --------- When a spilled variable is needed in register. In this case, we are necessarily inside a block (or at a branch) because that is the only place we require a variable to be in register. Here again we are constrained to insert the spill code before the next use of the variable, but more importantly, we must do it before the register chosen is *in use next*. | |||
2015-02-13 | finished interval building, untested | Quentin Carbonneaux | |
2015-02-13 | attempt a new linear scan implementation | Quentin Carbonneaux | |
2015-02-13 | remove debug code for heaps | Quentin Carbonneaux | |
2015-02-13 | implement binary heaps in lo3 | Quentin Carbonneaux | |
2015-01-22 | release also non-register locations | Quentin Carbonneaux | |
2015-01-22 | add some test programs | Quentin Carbonneaux | |
2015-01-22 | implement linear scan ideas in lo2.ml | Quentin Carbonneaux | |
2015-01-14 | start hacking new regalloc | Quentin Carbonneaux | |
2015-01-11 | more types | Quentin Carbonneaux | |
2015-01-09 | type surgery | Quentin Carbonneaux | |
2015-01-08 | try new presentation in lo2.ml | Quentin Carbonneaux | |
2015-01-06 | handle IBrz correctly | Quentin Carbonneaux | |
2015-01-06 | first ugly allocator that works | Quentin Carbonneaux | |
2015-01-05 | try to add code for phis | Quentin Carbonneaux | |
2015-01-05 | quick fix in loc2 for constants | Quentin Carbonneaux | |
2015-01-04 | more work on regalloc, still screwed | Quentin Carbonneaux | |
2015-01-01 | start register allocation | Quentin Carbonneaux | |
2014-12-30 | add irreducible cflow example | Quentin Carbonneaux | |