add consumer ir and cleanup