Reimplement memory assignment in phase.cpp.