Ignore:
Timestamp:
Jan 27, 2017, 2:22:06 PM (2 years ago)
Author:
nmedfort
Message:

Optimized Symbol Generation (and fixed potential bug that could allow duplicate names being constructed); made PabloKernel? extend PabloAST (temporarily removed PabloAST::getName() to avoid diamond problem); added an internal scalar to PabloKernel? struct for each Count to avoid InOut? output scalar variable problem; allowed CodeMotionPass? to move code within the same scope but across a branch statement. Began work on separating Kernels into either Block-Oriented or Segment-Oriented kernels.

File:
1 edited

Legend:

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

    r5270 r5283  
    4343        out << " = ";
    4444        print(assign->getValue(), out);
    45     } else if (const If * ifNode = dyn_cast<If>(stmt)) {
    46         out << "If ";
    47         print(ifNode->getCondition(), out);
     45    } else if (const Branch * br = dyn_cast<Branch>(stmt)) {
     46        if (isa<If>(br)) {
     47            out << "If ";
     48        } else if (isa<While>(br)) {
     49            out << "While ";
     50        }
     51        print(br->getCondition(), out);
    4852        if (expandNested) {
    4953            out << ":\n";
    50             print(ifNode->getBody(), out, true, indent + BlockIndenting);
    51         }
    52     } else if (const While * whileNode = dyn_cast<While>(stmt)) {
    53         out << "While ";
    54         print(whileNode->getCondition(), out);
    55         if (expandNested) {
    56             out << ":\n";
    57             print(whileNode->getBody(), out, true, indent + BlockIndenting);
     54            print(br->getBody(), out, true, indent + BlockIndenting);
    5855        }
    5956    } else {
     
    144141        out << "1";
    145142    } else if (const Var * var = dyn_cast<Var>(expr)) {
    146         out << var->getName()->value();
     143        out << var->getName();
    147144    } else if (const If * ifstmt = dyn_cast<If>(expr)) {
    148145        out << "If ";
     
    188185        print(op->getRH(), out);
    189186    } else if (const Statement * stmt = dyn_cast<Statement>(expr)) {
    190         out << stmt->getName()->value();
     187        out << stmt->getName();
    191188    } else if (isa<Integer>(expr)) {
    192189        out << cast<Integer>(expr)->value();
Note: See TracChangeset for help on using the changeset viewer.