Ignore:
Timestamp:
Oct 31, 2014, 6:04:25 PM (5 years ago)
Author:
nmedfort
Message:

More Pablo IR manipulation functionality; finished use analysis optimizer (requires boost). Removed remaining LLVM optimization passes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/printer_pablos.cpp

    r4276 r4280  
    6161}
    6262
    63 std::string PabloPrinter::print(const Statement * stmt)
    64 {
    65     if (const Assign * an = dyn_cast<const Assign>(stmt)) {
     63std::string PabloPrinter::print(const Statement * stmt) {
     64    if (stmt == nullptr) {
     65        return "<null>";
     66    }
     67    else if (const Assign * an = dyn_cast<const Assign>(stmt)) {
    6668        std::string result = "Assign('" + an->getName()->str() + "'," + print(an->getExpr());
    6769        if (an->isOutputAssignment()) {
     
    8385
    8486std::string PabloPrinter::print(const PabloAST *expr) {
    85     if (isa<const Zeroes>(expr)) {
     87    if (expr == nullptr) {
     88        return "<null>";
     89    }
     90    else if (isa<const Zeroes>(expr)) {
    8691        return "Zeroes";
    8792    }
     
    116121        return "ScanThru(" + print(sthru->getScanFrom()) + ", " + print(sthru->getScanThru()) + ")";
    117122    }
     123    else if (isa<Statement>(expr)) {
     124        return print(cast<Statement>(expr));
     125    }
    118126    return "???";
    119127}
Note: See TracChangeset for help on using the changeset viewer.