Question: Optimize the code by eliminating common sub expression, performing reduction in strength on induction variable and eliminating all the induction variables. dp = 0 ;

Optimize the code by eliminating common sub expression, performing reduction in strength on induction variable and eliminating all the induction variables.
dp =0;
i =0;
L : t1= i *8;
t2= A[t1];
t3= i *8;
t4= B[t3];
t5= t2* t4;
dp = dp + t5;
i = i+1;
if i < n goto L;

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!