Program & Compiler Optimization Flashcards
LICM
Loop invariant code motion. A value or part of a value that doesn’t change through out a loop iteration. Can just the column of an array or the row exp a[i] or a[i][j].
Name the types of compiler optimization
LICM, function inlining, constant propogation, ..
What is a compiler?
It generates code to the program at an intermediary stage similaar to assembly before it is turned into assembly instructions (ISA)
What is an optimizing compiler?
It is a compiler that has an additional step before the intermediary stage where it generates and adds additional code to the program to improve performance
The equation used to measure performance improvement?
execution time = no. of instruction x CPI x cycle period
How to reduce CPI?
How to reduce no. of instructions?
Program optimizations
Loop unrolling. Using a profiler to find bottlenecks