5. Procedural Analysis
There was no inter-procedural analysis done. If V is passed as a parameter, then it is considered a use, even if it is not used inside that function. The reason for this is that binding variables to the procedures they were defined in makes the analysis far more complex. This makes for a conservative estimate of swapability. This is a limitation of the algorithm.
Example 5.1
parameter use, not good for swapping (V is defined)
f(int x)
	{
		x = 4;
	}
main
	{
		int V;
		x = V;
		f(V);
	}
Example 5.2
parameter use, not good for swapping (V is used)
f(int x)
	{
		print(x);
	}
main
	{
		int V;
		x = V;
		f(V);
	}