Ignore:
Timestamp:
Jan 31, 2018, 12:13:25 AM (19 months ago)
Author:
nmedfort
Message:

Bug fix for Pablo Repeat and Operator

File:
1 edited

Legend:

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

    r5837 r5855  
    3535
    3636void PabloPrinter::print(const PabloKernel * kernel, raw_ostream & out) {
     37    out << kernel->getName() << "\n\n";
    3738    print(kernel->getEntryScope(), out, true);
    3839}
     
    177178    if (expr == nullptr) {
    178179        out << "<null-expr>";
     180    } else if (isa<Integer>(expr)) {
     181        out << cast<Integer>(expr)->value();
    179182    } else if (isa<Zeroes>(expr)) {
    180183        out << "0";
     
    231234        print(op->getRH(), out);
    232235    } else if (const Statement * stmt = dyn_cast<Statement>(expr)) {
     236        assert (stmt->getParent());
    233237        out << stmt->getName();
    234     } else if (isa<Integer>(expr)) {
    235         out << cast<Integer>(expr)->value();
     238    } else if (LLVM_UNLIKELY(isa<PabloKernel>(expr))) {
     239        print(cast<PabloKernel>(expr), out);
    236240    } else {
    237241        out << "???";
     
    241245void PabloPrinter::print(const PabloBlock * block, raw_ostream & strm, const bool expandNested, const unsigned indent) {
    242246    for (const Statement * stmt : *block) {
     247        assert (stmt->getParent() == block);
    243248        print(stmt, strm, expandNested, indent);
    244249        if (LLVM_LIKELY(!isa<Branch>(stmt) || !expandNested)) {
Note: See TracChangeset for help on using the changeset viewer.