Code Generation and Optimization for Embedded Processors