New extension of instruction set and new add-on function unit can improve the performance of microprocessor greatly.All the applications should be recompiled and rebuilt
otherwise they can't benefit from those new instructions.This paper proposes a framework of multi-level dynamic optimization
which introduces instruction scheduling and optimizing for the architecture extension based on trace-cache in runtime.Experimental results show that it can enlarge the instruction window to select hot codes and scheduling methods efficiently and effectively
and leverage the performance of original application without the need of recompiling.In addition
this framework is flexible and scalable to new optimizing chance and various platforms.