SSA/Control flow analysis Flashcards

1
Q

A dominates B

A

to reach block B, must have gone through block A

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

dominance frontier

A

For a block X, the set of nodes Y s.t. X dominates an immediate predecessor of Y but does not strictly dominate Y

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

SSA

A

static single assignment form

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

Goal of SSA form

A

build an intermediate representation of the program in which each variable is assigned a value in at most 1 program point

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

How to convert to SSA form?

A

make new variables to carry over the effect of the original program

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

Phi Functions

A

If have conditions and two different branches that assign different values to the same variable, then must pick one

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

How to compute Phi function replacement

A

want to figure out where there are multiple assignments that reach a node; can put a phi func for each assignment at every node in dominance frontier

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

Pruned Phi Functions

A

Suppose useless phi function nodes (cases where the result is never used downstream)

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

meet operation

A

union of sets (of

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

Why are reaching definitions useful?

A

Answers the question, where could this variable have been defined

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

Forward analysis

A

Start at the beginning of a function’s CFG, work along the control edges (reaching definitions)

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

Backward anlysis

A

Start at the end of a function’s CFG, work against the control edges (live variables)

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