On a class of preconditioners for solving the Helmholtz equation