Push the refactoring through GPUIR.  Next step: to actually use it for repacking.