def _cire(cluster, context, space, sregistry, options, platform):
    variants = [modes[mode](sregistry, options).make_schedule(cluster, context) for mode in space]
    if (not any((i.schedule for i in variants))):
        return [cluster]
    (schedule, exprs) = pick_best(variants)
    schedule = optimize_schedule(cluster, schedule, platform, sregistry, options)
    (clusters, subs) = lower_schedule(cluster, schedule, sregistry, options)
    clusters.append(rebuild(cluster, exprs, subs, schedule))
    return clusters
def _cire(cluster, context, space, sregistry, options, platform):
    variants = [modes[mode](sregistry, options).make_schedule(cluster, context) for mode in space]
    if (not any((i.schedule for i in variants))):
        return [cluster]
    (schedule, exprs) = pick_best(variants)
    schedule = optimize_schedule(cluster, schedule, platform, sregistry, options)
    (clusters, subs) = lower_schedule(cluster, schedule, sregistry, options)
    clusters.append(rebuild(cluster, exprs, subs, schedule))
    return clusters