The Spalart-Allmaras turbulence model is one of the most popular models applied to compressors, but it often over-predicts compressor blockage size and hence under-predicts the compressor stall margin. In this paper, a novel modification to the SA model is proposed to improve the prediction of compressor near-stall flows. The modification is based on the dimensionless vortical pressure gradient, which identifies blockage cells featured by 3D swirling low-momentum flows under adverse pressure gradients. It unblocks the compressor passage by enhancing the eddy viscosity in the identified blockage cells; whereas in canonical 2D flows the modification is automatically switched off. The model coefficients are calibrated via Bayesian inference, which considers the uncertainties involved in experiments and CFD. The rotor exit radial profile data of NASA Rotor 67 at the peak efficiency (PE) and near stall (NS) conditions at the design speed are used for calibration. Validation on the NASA Rotor 67 case shows that the proposed model not only predicts a better agreement with the measured near-tip profiles compared to the original SA model, but also predicts more accurate stall margins at all operating speeds. Further validations are conducted on the TUDa-GLR-OpenStage transonic axial compressor and the low-speed BUAA Stage B rotor, where stall is driven by the rotor tip blockage cell. Results show that the proposed model predicts a more accurate stall margin at all operating speeds of TUDa-GLR-OpenStage and a more accurate tip blockage size of BUAA Stage B rotor. Finally, the proposed model is validated on the LMFA NACA65 cascade featured by corner separation. In combination with the quadratic constitutive relation (QCR), significant improvement in predicting the static pressure rise coefficient, the total pressure loss coefficient, the flow angle and the blade loading is achieved, indicating the model predicts a more accurate corner separation size. The proposed model, termed as SA-PG(omega) in this work, is a promising engineering tool for future RANS simulations of compressor near-stall flows.