compiler problems?thx 7, (10%) Consider the following three-address code. Please draw its control-flow graph a»10 if...
1) i 2 for (i2; i<=n; i++) 2) if i>n goto7) 3) t1 i 4 ali TRUE; count = 0; 4) alt1]= TRUE 5) i = i+ 1 (u)9 for (i-2; i<=s;i++) 6) goto (2) if (alil) //i has been found to be a prime 7 count = 0 count++; 8) s sqrt(n) for (j-2'i; i<=n; j = i+i) ail =FALSE; // no multiple of i is a prime 10) ifi>s goto (22) Fig 4.0 Figure 4 .0 is the...
2) Consider the following C function: ----------------------------------------------------------------------------- int vdiv(double * a, double * b, double *c, int siz) {// divide vectors element-wise: c=a/b; // replaces divide by almost 0 with 1e99 and returns count int result=0; int i=0; 1: while(i<siz) 2: { if( abs(b[i])<1e-10 ){ // close to 0 3: c[i]=1e99; 4: result++; 5: }else{ 6: c[i]=a[i]/b[i]; 7: } 8: i++; 9: } 10: return result; } -------------------------------------------------------------------------- Executable lines are numbered. -Find all basic blocks, -draw control flow graph...