1. A method of managing migration of partitions, said method comprising: obtaining, by an optimizer executing in a processor, an indication that a partition executing an application using one or more extended mode features is to be migrated to a system in which at least one extended mode feature of the one or more extended features is unsupported; and removing, based on obtaining the indication, at least a portion of code of the application to facilitate migration of the partition to the system in which at least one extended mode feature is unsupported.