Program & Compiler Optimization Flashcards

1
Q

LICM

A

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].

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Name the types of compiler optimization

A

LICM, function inlining, constant propogation, ..

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a compiler?

A

It generates code to the program at an intermediary stage similaar to assembly before it is turned into assembly instructions (ISA)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is an optimizing compiler?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

The equation used to measure performance improvement?

A

execution time = no. of instruction x CPI x cycle period

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

How to reduce CPI?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to reduce no. of instructions?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Program optimizations

A

Loop unrolling. Using a profiler to find bottlenecks

How well did you know this?
1
Not at all
2
3
4
5
Perfectly