retagged by
1,061 views
7 votes
7 votes

Consider the following code fragment:

Identify all data dependencies (potential data hazards) in the given code snippet within one loop iteration. Let the number of true data dependencies be $\mathrm{X}$, the number of anti-dependencies be $\mathrm{Y}, \&$ the number of output dependencies be $\text{Z}$.

What is $\mathrm{X}+2 \mathrm{Y}+3 \mathrm{Z}?$

retagged by

1 Answer

2 votes
2 votes

Finding ALL Data Dependencies in the Program: Finding RAW, WAW, WAR Dependencies

Pipeline Complete Playlist: GO Classes Pipeline Complete Course

$$
\mathrm{X}=3 ; \mathrm{Y}=2 ; \mathrm{Z}=1 \text {. }
$$
True Data Dependencies (within one loop iteration):

  • $\textsf{Register R1: I1 (LD) I2 (DADDI)}$
  • $\textsf{Register R1: I2 (DADDI) I3 (SD)}$
  • $\textsf{Register R4: I5 (DADDI) I6 (BNE)}$
edited by
Answer:

Related questions

0 votes
0 votes
2 answers
1
1 votes
1 votes
4 answers
3