Beispiel

Eingabe ($ \approx$ Java):
{ int i; 
  float prod; 
  float [20] a; 
  float [20] b;
  prod = 0;
  i = 1;
  do {
    prod = prod 
      + a[i]*b[i];
    i = i+1;
  } while (i <= 20);
}
Ausgabe

(Drei-Adress-Code):

L1: prod = 0
L3: i = 1
L4: t1 = i * 8
    t2 = a [ t1 ]
    t3 = i * 8
    t4 = b [ t3 ]
    t5 = t2 * t4
    prod = prod + t5
L6: i = i + 1
L5: if i <= 20 goto L4
L2:



Johannes Waldmann 2012-01-30