Changes between Version 5 and Version 6 of Commentary/Compiler/Backends/NCG/RegisterAllocator
- Timestamp:
- 09/17/07 10:35:22 (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Commentary/Compiler/Backends/NCG/RegisterAllocator
v5 v6 22 22 23 23 24 25 24 == References == 26 25 27 If you decide to do some hacking on the register allocator ,I would take a look at (at least) these papers first:26 If you decide to do some hacking on the register allocator I would take a look at (at least) these papers first: 28 27 29 28 '''Iterated Register Coalescing'''[[BR]] … … 40 39 41 40 41 == Hacking/Debugging == 42 43 {{{-fasm-lint}}}[[BR]] 44 Breaking the allocator can result in compiled programs crashing randomly (if you're lucky) or producing the wrong output, which can hard to debug. 45 When working on the allocator, make sure to always turn on {{{-fasm-lint}}} this will call {{{GraphOps.validateGraph}}} after every spill/color stage. {{{validateGraph}}} checks that all the edges point to valid nodes, that no conflicting nodes have the same color, and if the graph is supposed to be colored then all nodes are really colored. 46 47 The main dump flags are 48 49 {{{-ddump-asm-regalloc-stages}}}[[BR]] 42 50 43 51 52 {{{-ddump-asm-stats}}}[[BR]] 44 53 54 55 {{{-ddump-asm}}}[[BR]] 56 57 {{{-ddump-to-file}}}[[BR]] 58 59 60 == Possible Improvements == 61 62 * work lists 63 64 * spill code 65 66 * spill candidates 67 68 * aliasing register sets 69 70
