chpt7-3 - . . . ( Intermediate code ) ( Intermediate...

Info iconThis preview shows pages 1–12. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . . . ( Intermediate code ) ( Intermediate representation ) ( Intermediate language ) 7.3 7.3.1 de DAG float a[10][20]; a[i][j+2]; t1 = a[i, j+2] t1 = j + 2 t2 = i * 20 t3 = t1 + t2 t4 = 4 * t3 t5 = addr a t6 = t5 + t4 t7 = *t6 r1 = [fp - 4] r2 = [r1 + 2] r3 = [fp - 8] r4 = r3 * 20 r5 = r4 + r2 r6 = 4 * r5 r7 = fp 216 f1 = [r7 + r6] : A B C D - * + E C D N ^ / + : (1) ( - C D T1 ) (2) ( * B T1 T2) (3) ( + A T2 T3) (4) ( - C D T4) (5) ( ^ T4 N T5) (6) ( / E T5 T6) (7) ( + T3 T6 T7) : A + B * ( C - D ) + E / ( C - D ) ^N : (1) ( - C D ) (2) ( * B (1) ) (3) ( + A (2) ) (4) ( - C D ) (5) ( ^ (4) N ) (6) ( / E (5) ) (7) ( + (3) (6) ) : A + B * ( C - D ) + E / ( C - D ) ^N : (1) ( - C D ) 1 (2) ( * B (1) ) 2 (3) ( + A (2) ) 3 (4) ( ^ (1) N ) 1 (5) ( / E (4) ) 4 (6) ( + (3) (5) ) 5 6 : A + B * ( C - D ) + E / ( C - D ) ^N DAG Abstract Syntax Tree Sif B then S 1 else S 2 if-then- else B S1 S2 directed acyclic graph (DAG)....
View Full Document

This note was uploaded on 11/23/2011 for the course CS Compile taught by Professor Weizhong during the Spring '05 term at Fudan University.

Page1 / 44

chpt7-3 - . . . ( Intermediate code ) ( Intermediate...

This preview shows document pages 1 - 12. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online