Energy-Aware Optimization For Embedded Systems With Chip Multiprocessor And Phase-Change Memory