Week 9: Lecture - Compiler Optimizations, SIMD and Vectorization

Hello everyone and welcome to my blog!

During this week we have talked about Compiler Optimizations, SIMD and Vectorization.

We discussed what compiler optimizations are. Compiler optimizations are alterations made to code by a compiler to achieve the same result as the original input code but with improved performance. This can mean reduced code size, reduced execution size, or improved execution speed; often, these goals are in conflict and optimizing for one (such as speed) will come at the cost of another (such as code size). 

Also we covered GCC optimization options, LLVM optimization options, examples of common optimizations. In addition, we discussed code rewriting optimization, in particular, strength reduction, hoisting, pre-calculation of constants, loop unswitching. Moreover, we talked about loop splitting, in particular, loop interchange, loop unrolling, inlining, common subexpression elimination, jump threading, short-circuit evaluation, test reordering, dead store elimination. Furthermore, we studied machine-code level optimization, in particular, block rearrangement and instruction selection. Last but not least, we discussed debugging with optimizations enabled. 
 

Comments