next up previous contents index
Next: 8.1.4 Loop Optimizations Up: 8.1 Optimizations Previous: 8.1.2 Dead-Code Elimination   Contents   Index


8.1.3 Copy-Propagation

int f() {  
  int i, j;  
  i = 10;  
  j = i;  
  return j;  
}
will be changed to

int f() {  
  int i, j;  
  i = 10;  
  j = 10;  
  return 10;  
}
Note: the dead stores created by this copy propagation will be eliminated by dead-code elimination.



2008-12-05