Intermediate Code Generation
Dr. Noman Islam
Introduction
Value Number method
Method for constructing the nodes of a graph
Three address code
Addresses and instructions
Common three address instructions
Example
do i=i+1; while(a[i]<v) ;
Quadruples
Example
Triples
Indirect triples
if ( f l a g ) x = -1; e l s e x = 1;
y = x * a;
has two control-flow paths in which the variable x gets defined.
if ( f l a g ) xi = -1; e l s e x2 = 1; x 3 = ϕ ( x 1 , x 2 ) ;
Types and declarations
Type expressions