regalloc2
regalloc2 copied to clipboard
A new register allocator
The fuzzing strategy we use for regalloc2 doesn't minimize well, which can make isolating a failure somewhat tedious. If the textual format emitted by regalloc2-tool looked enough like c to...
Since the input CFG is required to not have critical edges, such blockparams are useless. The incoming blockparams can simply be replaced with the vreg from the (unique) predecessor. It's...
Previously, each live range would carry a list of uses in a `SmallVec`, which was an inefficient use of memory. This PR instead keeps a single `Vec` for all uses...
This PR removes the redundant move eliminator by changing where we store spill allocations: switching from allocating spills to bundles to instead spilling vregs for their full lifetime. Changes to...
This PR steals space from the last currently unused register class to allow `PReg` to represent more registers, but only in `RegClass::Int`. ### But why? I'm using regalloc2's support for...
Right now, we just give error messages like `BB(Block(0))`, meaning that there is some error somewhere in block 0. If one enables logging, then one gets messages like "block 0...
There are currently special cases for when an instruction uses a fixed register and clobbers it, but when an instruction uses an unconstrained register and clobbers all registers there is...
Two core data-structure elements, `Operand` and `Use`, are both designed to fit a relatively large amount of information in one `u32`. This is a performance optimization that we have found...
It seems like there are currently two options when expressing which registers an `Operand` can use: * use `reg_def`/`reg_use`/..., in this case the operand can be allocated to any physical...
I used [heaptrack](https://github.com/KDE/heaptrack) to analyze the memory allocation patterns of my compiler which uses regalloc2. I used a large benchmark (LLVM library) which has 1257955 basic blocks in 104913 functions....