Local Optimizations-Part 2 and Code Generation