Lesson 6--Branches Flashcards

1
Q

Types of branches

A
  • -Unconditional (ends of loops, etc.)
  • -Indirect (indirect jumps, case statements, etc.)
  • -Conditional (if then else, loops, etc.)
  • -Function (function calls)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How to mitigate branch delays

A

Speculation: Predicting branches, executing in anticipation.
Predication: Removing branches, converting code into one that depends on outcome of a condition for a commit.

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

3 Components of a branch

A
  • -Whether to take the branch
  • -Where to go
  • -When to go
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Two Step Branching

A
  • -Store the comparison results in branch/condition registers
  • -Delay can be filled with useful operation between compare and branch
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Three Step Branching

A
  • -Decouple the address computation from the branch
  • -Branch target register stores the results of the target address and comparison
  • -The compiler can move the compare and offset computations in any order
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

True or False: Unbundling increases code size.

A

True: 2 step leads to 14% code growth. 3 step leads to 28% growth.

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

True or False: In a VLIW architecture with unbundled branches, the branch targets must be computed once for all clusters

A

False. The branch will be executed in one cluster, not all.

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

True or False: The branch condition is computed in one cluster and broadcast to all other clusters

A

True

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

True or False: If the branch condition is taken, each cluster transfers control to one branch target.

A

False. Clusters only need to be notified of which branch is taken, but they do not affect control of other clusters.

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

True or False: All branch targets correspond to the same logical block

A

True.

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

Speculation

A

Ignore branches and move operations above them

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

Conservative Techniques

A

Unless legality of reordering can be proven, always serialize operations

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

Speculative Techniques

A

Executes ahead based on probabilistic assumptions, and fixes the execution if speculation is wrong.

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

Control speculation

A

Removes control dependence

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