src/passmanager.cc
/**
     * @brief   Searches for the pass with the given name
     * @param   passName String representing the name of the pass to be added to the compiler
     * @param   aliasName String representing the name of the pass to be used internally for searching
     * @return   AbstracPass Object reference to the pass 
     */
@brief   Searches for the pass with the given name
@param   passName String representing the name of the pass to be added to the compiler
@param   aliasName String representing the name of the pass to be used internally for searching
@return   AbstracPass Object reference to the pass
@brief Searches for the pass with the given name @param passName String representing the name of the pass to be added to the compiler @param aliasName String representing the name of the pass to be used internally for searching @return AbstracPass Object reference to the pass
AbstractPass* PassManager::createPass(std::string passName, std::string aliasName)
{
    DOUT("In PassManager::createPass");
    bool passfound = false;
    AbstractPass* pass;
    if (passName == "Reader") {pass = new ReaderPass(aliasName); passfound = true;}
    if (passName == "Writer") {pass = new WriterPass(aliasName); passfound = true;}
    if (passName == "RotationOptimizer") {pass = new RotationOptimizerPass(aliasName); passfound = true;}
    if (passName == "DecomposeToffoli") {pass = new DecomposeToffoliPass(aliasName); passfound = true;}
    if (passName == "Scheduler") {pass = new SchedulerPass(aliasName); passfound = true;}
    if (passName == "BackendCompiler") {pass = new BackendCompilerPass(aliasName); passfound = true;}
    if (passName == "ReportStatistics") {pass = new ReportStatisticsPass(aliasName); passfound = true;}
    if (passName == "Visualizer") {pass = new VisualizerPass(aliasName); passfound = true;}
    if (passName == "CCLPrepCodeGeneration") {pass = new CCLPrepCodeGeneration(aliasName); passfound = true;}
    if (passName == "CCLDecomposePreSchedule") {pass = new CCLDecomposePreSchedule(aliasName); passfound = true;}
    if (passName == "WriteQuantumSim") {pass = new WriteQuantumSimPass(aliasName); passfound = true;}
    if (passName == "CliffordOptimize") {pass = new CliffordOptimizePass(aliasName); passfound = true;}
    if (passName == "Map") {pass = new MapPass(aliasName); passfound = true;}
    if (passName == "RCSchedule") {pass = new RCSchedulePass(aliasName); passfound = true;}
    if (passName == "LatencyCompensation") {pass = new LatencyCompensationPass(aliasName); passfound = true;}
    if (passName == "InsertBufferDelays") {pass = new InsertBufferDelaysPass(aliasName); passfound = true;}
    if (passName == "CCLDecomposePostSchedule") {pass = new CCLDecomposePostSchedulePass(aliasName); passfound = true;}
    if (passName == "QisaCodeGeneration") {pass = new QisaCodeGenerationPass(aliasName); passfound = true;}
    if (passName == "Visualizer") {pass = new VisualizerPass(aliasName); passfound = true;}
    if (!passfound) 
    {
        EOUT(" !!!Error: Pass " << aliasName << " not found!!!");
        exit(1);
    }
    return pass;
}
AbstractPass * PassManager :: createPass ( std :: string passName , std :: string aliasName ) { DOUT ( " " ) ; bool passfound = false ; AbstractPass * pass ; if ( passName == " " ) { pass = new ReaderPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new WriterPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new RotationOptimizerPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new DecomposeToffoliPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new SchedulerPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new BackendCompilerPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new ReportStatisticsPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new VisualizerPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new CCLPrepCodeGeneration ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new CCLDecomposePreSchedule ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new WriteQuantumSimPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new CliffordOptimizePass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new MapPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new RCSchedulePass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new LatencyCompensationPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new InsertBufferDelaysPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new CCLDecomposePostSchedulePass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new QisaCodeGenerationPass ( aliasName ) ; passfound = true ; } if ( passName == " " ) { pass = new VisualizerPass ( aliasName ) ; passfound = true ; } if ( ! passfound ) { EOUT ( " " << aliasName << " " ) ; exit ( 1 ) ; } return pass ; }
@brief   Searches for the pass with the given name
 @param   passName String representing the name of the pass to be added to the compiler
 @param   aliasName String representing the name of the pass to be used internally for searching
 @return   AbstracPass Object reference to the pass
@brief Searches for the pass with the given name @param passName String representing the name of the pass to be added to the compiler @param aliasName String representing the name of the pass to be used internally for searching @return AbstracPass Object reference to the pass
/// @todo-rn: check that aliasname has not been used before! /** Search between available passes in OpenQL. 
     * @note PassManager::createPass defines the collection of passes available in OpenQL. Whenever a new pass is added to the compiler, this list should be extended in order for the pass to be found.
     */