Merge "Refactor register allocation to be pluggable"