Consider the following code. For this question, count only register…

Consider the following code. For this question, count only register dependencies within one loop iteration.

I1: Load R1 = Memory(R2)
I2: R1 = R1 + 1
I3: Store Memory(R2) = R1
I4: R2 = R2 + 8
I5: R4 = R4 - 1
I6: Branch if R4 != 0

Let A be the number of true (RAW) dependencies, B the number of anti (WAR) dependencies, and C the number of output (WAW) dependencies. Find A + B + C.

Attempted by 26 students.

Sign up free to check your answer

Sign up free

Explore the full course: Gate Guidance By Sanchit Sir

Loading lesson…