




Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Slides from the computer architecture course (cs 35101) held in spring 2008 at the university. The slides cover various compiler optimizations, including high-level optimizations, local and global optimizations, common subexpression elimination, strength reduction, constant propagation, copy propagation, dead store and dead code elimination, global loop optimizations, and code motion. The document also discusses why compilers cannot optimize optimally.
Typology: Study notes
1 / 8
This page cannot be seen from the preview
Don't miss anything!





Slides by Shannon I. Steinfadt [adapted from D. Patterson slides Revised 3rd Edition]
Front end per language High-level optimizations Global optimizer Code generator Dependencies Language dependent; machine independent Function Transform language to common intermediate form Intermediate representation Somewhat language dependent; largely machine dependent For example, loop transformations and procedure inlining (procedure integration) Small language dependencies; machine dependences slight (e.g. register counts / types) Including global and local optimizations + register allocation Highly machine dependent; language dependent Detailed instruction selection and machine-dependent optimizations; may include or be followed by assembler
int x = 14; int y = 7 - x / 2; return y * (28 / x + 2);
int x = 14; int y = 7 - 14 / 2; return y * (28 / 14 + 2);