Predication Flashcards

1
Q

What is predication?

A

We do the work of both the T and NT paths, and then throw away the wrong path

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

When should we use predication?

A

When the cost is smaller! If branch prediction averages 25 cycles and predication costs 10, then predication is better. Example: small if-else statements

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

What is If-Conversion?

A

the process a compiler uses to transform small if-statements to not have a branch (so that the hardware uses predication)

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

How do we implement if-converesion?

A

Conditional move:
Ex. MOVZ Rd, Rs, Rt (move Rs into Rd if Rt is equal to 0)
This is not a branch instruction!

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

What are the problems with conditional moves?

A

We need more registers and more instructions are executed

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

How do we solve the problems of conditional moves?

A

Full predication (every instruction has a condition for it to be executed)

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

How is full predication implemented?

A

Usually represented in the hardware by adding conditional bits to the instruction

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