Constify the Optnone checks in IR passes.