reorder compilation phases