Cosmological CPT violation will rotate the polarized direction of CMB photons, convert partial CMB E mode into B mode and vice versa. It will generate non-zero EB, TB spectra and change the EE, BB, TE spectra. This phenomenon gives us a way to detect the CPT-violation signature from CMB observations, and also provides a new mechanism to produce B mode polarization. In this paper, we perform a global analysis on tensor-to-scalar ratio $r$ and polarization rotation angles based on current CMB datasets with both low $ell$ (Planck, BICEP2/Keck Array) and high $ell$ (POLARBEAR, SPTpol, ACTPol). Benefited from the high precision of CMB data, we obtain the isotropic rotation angle $bar{alpha} = -0.01^circ pm 0.37^circ $ at 68% C.L., the variance of the anisotropic rotation angles $C^{alpha}(0)<0.0032,mathrm{rad}^2$, the scale invariant power spectrum $D^{alphaalpha}_{ell in [2, 350]}<4.71times 10^{-5} ,mathrm{rad}^2$ and $r<0.057$ at 95% C.L.. Our result shows that with the polarization rotation effect, the 95% upper limit on $r$ gets tightened by 17%.