Sorting metrics for customized phosphorus diffusion gettering