Lecture 10: Optimization
5.1-5.6 of textbook (CS:APP)

Sample code used in lecture to illustrate
some machine-independent optimizations

optimize.c -- simple illustration of various optimizations
alias.c    -- simple illustration of alias optimization blocker

Compiled for x86-64 with various optimization levels
<n> = 0, 1, or 2.
Compare the assembly files optimize<n>.s to see if
the hand-optimization was applied by the compiler
--------------------------------------------------
gcc -O<n> -S -o optimize<n>.s optimize.c

gcc -O2 -o alias alias.c
--------------------------------------------------
