Static Analysis for Efficient Affine Arithmetic on GPUs