flume/planner/pass_manager.cpp
// TODO(wenxiang): applying passes in topological order according to invalidating relations.
applying passes in topological order according to invalidating relations.
applying passes in topological order according to invalidating relations .
bool PassManager::RunPasses(const PassSet& passes) {
    bool is_changed = false;
    while (!Includes(m_valid_passes, passes)) {
        PassSet ready_passes = CollectReadyPasses(passes);
        BOOST_FOREACH(std::string pass, SelectSafePasses(ready_passes)) {
            is_changed |= RecursiveRunPass(pass);
        }
        BOOST_FOREACH(std::string pass, ready_passes) {
            is_changed |= RecursiveRunPass(pass);
        }
    }
    return is_changed;
}
bool PassManager :: RunPasses ( const PassSet & passes ) { bool is_changed = false ; while ( ! Includes ( m_valid_passes , passes ) ) { PassSet ready_passes = CollectReadyPasses ( passes ) ; BOOST_FOREACH ( std :: string pass , SelectSafePasses ( ready_passes ) ) { is_changed |= RecursiveRunPass ( pass ) ; } BOOST_FOREACH ( std :: string pass , ready_passes ) { is_changed |= RecursiveRunPass ( pass ) ; } } return is_changed ; }
TODO(wenxiang): applying passes in topological order according to invalidating relations.
TODO ( wenxiang ) : applying passes in topological order according to invalidating relations .
// run all passes in order // first apply passes who are immune from other passes