All Flashcards

1
Q

Dominating

A

A dominates B if you have to go trough B to get to A.

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

Dominator set

A

A set of all dominating nodes.

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

Immediate dominator set

A

From the dominator set the one that is closed.

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

Post-dominator table

A

A is post-dominator table of B if to get from B to the exit you have to go trough A.

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

Spanning tree

A

Representation of a CFG where two rules are followed: 1. If there’s an edge to an unvisited node, we mark the edge and follow it
2. If there’s no edge to an unvisited node, we go back to the parent.

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

Advancing edge

A

An edge going from A to B where B is a decendant of A in a the spanning tree.

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

Retreating edge

A

An edge going from A to B where A is the decendant of B in the spanning tree

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

Cross-edge

A

An edge where A is not an ancestor of B or B of A in a spanning tree

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

Back edge

A

An edge from A to B where B dominates A.

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

Function inlining

A

Instead of function call, we replace the function call with the body of the function

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

Function cloning

A

Create different versions of functions for different calls to reduce static arguments

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

Constant folding

A

Evaluating expressions at runtime (x = 1 + 2 -> x = 3)

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

Constant propogation

A

Replace uses of variables with constants if the variables are constant

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

Copy propagation

A

Copies of variables are replaced by the values it has been copied from. So x = y; y = x + 1 -> x = y; y = y + 1

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

Algebraic simplification

A

things like a * 1 -> a

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

Common Subexpressions elimination

A

If a expression is calculated multiple times, it is reused instead

17
Q

Dead Code Elimination

A

If a variable isn’t read from.

18
Q

Strength reduction

A

Some operations take more computation (mul, div) replace them with simpler ones (add, sub)

19
Q

Loop-invariant code motion

A

If a statement/expression doesn’t change in a loop, take it out of the loop.