Switched to a more compact ir generation method.