Factor out part of LICM::sink into a helper function.