Live Range Splitting

Listing: Live Range Splitting, Before Optimization
void func(int x, int y)
{ 

 int a; 

 int b;

 int c; 

 a = x * y; 

 otherfunc(a);

 b = x + y; 

 otherfunc(b);

 c = x - y; 

 otherfunc(c); 

}
Listing: Live Range Splitting, After Optimization
void func_optimized(int x, int y) 

{ 

 int temp; 

 temp = x * y; 

 otherfunc(temp);

 temp = x + y; 

 otherfunc(temp); 

 temp = x - y;

 otherfunc(temp); 

}