Changeset 5821


Ignore:
Timestamp:
Jan 6, 2018, 5:03:47 PM (5 months ago)
Author:
nmedfort
Message:

Bug fixes

Location:
icGREP/icgrep-devel/icgrep
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/UCD/unicode_set.cpp

    r5755 r5821  
    847847        append_quad(lo_quad, quads, runs);
    848848    }
    849 
    850849    assert (length > 0);
    851850    --length;
     
    853852    // Now check if we need to write out any Full blocks between the lo and hi code points; adjust our position
    854853    // in the original quad to suit.
    855     if (hi_index) {
     854    if (hi_index) {       
    856855        // Add in any full runs between the lo and hi quads
    857856        append_run(Full, hi_index - 1, runs);
     
    867866        }
    868867        length -= hi_index;
     868
    869869        // Write out the hi_quad value
    870870        if (LLVM_UNLIKELY(type == Full)) {
    871871            append_run(Full, 1, runs);
    872         } else {
     872        } else {           
    873873            if (type == Mixed) {
    874                 assert ((qi + hi_index) < qi_end);
     874                const auto qi_begin = qi;
     875                assert ((qi + hi_index) <= qi_end);
    875876                qi += hi_index;
    876                 hi_quad |= *qi++;
     877                if (length) {
     878                    quads.append<const bitquad_t *>(qi_begin, qi);
     879                    assert (qi != qi_end);
     880                    hi_quad |= *qi++;
     881                }
    877882            }
    878883            append_quad(hi_quad, quads, runs);
  • icGREP/icgrep-devel/icgrep/pablo/builder.cpp

    r5782 r5821  
    137137        return expr;
    138138    }
    139     else if (isa<Ones>(indexStream)) {
     139    else if (indexStream == nullptr || isa<Ones>(indexStream)) {
    140140        return createAdvance(expr, shiftAmount);
    141141    }
     
    151151        return expr;
    152152    }
    153     else if (isa<Ones>(indexStream)) {
     153    else if (indexStream == nullptr || isa<Ones>(indexStream)) {
    154154        return createAdvance(expr, shiftAmount, prefix);
    155155    }
  • icGREP/icgrep-devel/icgrep/pablo/optimizers/pablo_simplifier.cpp

    r5782 r5821  
    356356            block->setInsertPoint(stmt->getPrevNode());
    357357            return block->createZeroes(stmt->getType());
     358        } else if (LLVM_UNLIKELY(isa<ScanThru>(st->getScanFrom()))) {
     359            ScanThru * const nested = cast<ScanThru>(st->getScanFrom());
     360            if (LLVM_UNLIKELY(st->getScanThru() == nested->getScanThru())) {
     361                return nested;
     362            }
    358363        }
    359364    } else if (isa<MatchStar>(stmt)) {
     
    498503                    continue;
    499504                }
    500             } else if (LLVM_UNLIKELY(isa<ScanThru>(outer->getScanFrom()))) {
    501                 // Replace ScanThru(ScanThru(x, y), z) with ScanThru(x, y | z)
    502                 ScanThru * const inner = cast<ScanThru>(outer->getScanFrom());
    503                 block->setInsertPoint(stmt);
    504                 ScanThru * const scanThru = block->createScanThru(inner->getScanFrom(), block->createOr(inner->getScanThru(), outer->getScanThru()));
    505                 stmt->replaceWith(scanThru);
    506                 stmt = scanThru;
    507                 continue;
     505//            } else if (LLVM_UNLIKELY(isa<ScanThru>(outer->getScanFrom()))) {
     506//                // Replace ScanThru(ScanThru(x, y), z) with ScanThru(x, y | z)
     507//                // TODO: this transformation is valid if and only if there can be no instance of ...yzy... in the (y | z) stream
     508//                // but that degree of reasoning is too complex to perform linearly here
     509//                ScanThru * const inner = cast<ScanThru>(outer->getScanFrom());
     510//                block->setInsertPoint(stmt);
     511//                ScanThru * const scanThru = block->createScanThru(inner->getScanFrom(), block->createOr(inner->getScanThru(), outer->getScanThru()));
     512//                stmt->replaceWith(scanThru);
     513//                stmt = scanThru;
     514//                continue;
    508515            } else if (LLVM_UNLIKELY(isa<And>(outer->getScanFrom()))) {
    509516                // Suppose B is an arbitrary bitstream and A = Advance(B, 1). ScanThru(B ∧ ¬A, B) will leave a marker on the position
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r5816 r5821  
    5858using MarkerType = RE_Compiler::MarkerType;
    5959
    60 PabloAST * RE_Compiler::compile(RE * re, PabloAST * const initialCursors) {
     60PabloAST * RE_Compiler::compile(RE * const re, PabloAST * const initialCursors) {
    6161    const auto markers = initialCursors ? compile(re, initialCursors, mPB) : compile(re, mPB);
    6262    return markerVar(AdvanceMarker(markers, FinalPostPositionUnit, mPB));
    6363}
    6464
    65 inline MarkerType RE_Compiler::compile(RE * re, PabloAST * const cursors, PabloBuilder & pb) {
     65inline MarkerType RE_Compiler::compile(RE * const re, PabloAST * const cursors, PabloBuilder & pb) {
    6666    return process(re, makeMarker(FinalMatchUnit, cursors), pb);
    6767}
    6868
    69 inline MarkerType RE_Compiler::compile(RE * re, PabloBuilder & pb) {
     69inline MarkerType RE_Compiler::compile(RE * const re, PabloBuilder & pb) {
    7070    return process(re, makeMarker(FinalPostPositionUnit, pb.createOnes()), pb);
    7171}
    7272   
    73 MarkerType RE_Compiler::process(RE * re, MarkerType marker, PabloBuilder & pb) {
     73MarkerType RE_Compiler::process(RE * const re, MarkerType marker, PabloBuilder & pb) {
    7474    if (isa<Name>(re)) {
    7575        return compileName(cast<Name>(re), marker, pb);
     
    105105}
    106106
    107 MarkerType RE_Compiler::compileCC(CC * cc, MarkerType marker, PabloBuilder & pb) {
     107MarkerType RE_Compiler::compileCC(CC * const cc, MarkerType marker, PabloBuilder & pb) {
    108108    PabloAST * nextPos = markerVar(marker);
    109109    const cc::Alphabet * a = cc->getAlphabet();
     
    132132}
    133133
    134 inline MarkerType RE_Compiler::compileName(Name * name, MarkerType marker, PabloBuilder & pb) {
    135     const std::string nameString = name->getName();
     134inline MarkerType RE_Compiler::compileName(Name * const name, MarkerType marker, PabloBuilder & pb) {
     135    const auto & nameString = name->getName();
    136136    if (nameString == ".") {
    137137        return compileAny(marker, pb);
     
    159159}
    160160
    161 inline MarkerType RE_Compiler::compileName(Name * name, PabloBuilder & pb) {
     161inline MarkerType RE_Compiler::compileName(Name * const name, PabloBuilder & pb) {
    162162    MarkerType m;
    163163    if (LLVM_LIKELY(mCompiledName->get(name, m))) {
     
    171171}
    172172
    173 MarkerType RE_Compiler::compileSeq(Seq * seq, MarkerType marker, PabloBuilder & pb) {
     173MarkerType RE_Compiler::compileSeq(Seq * const seq, MarkerType marker, PabloBuilder & pb) {
    174174    // if-hierarchies are not inserted within unbounded repetitions
    175175    if (mStarDepth > 0) {
     
    179179        return marker;
    180180    } else {
    181         return compileSeqTail(seq->begin(), seq->end(), 0, marker, pb);
    182     }
    183 }
    184 
    185 MarkerType RE_Compiler::compileSeqTail(Seq::iterator current, Seq::iterator end, int matchLenSoFar, MarkerType marker, PabloBuilder & pb) {
     181        return compileSeqTail(seq->cbegin(), seq->cend(), 0, marker, pb);
     182    }
     183}
     184
     185MarkerType RE_Compiler::compileSeqTail(Seq::const_iterator current, const Seq::const_iterator end, const int matchLenSoFar, MarkerType marker, PabloBuilder & pb) {
    186186    if (current == end) {
    187187        return marker;
     
    189189        RE * r = *current;
    190190        marker = process(r, marker, pb);
    191         current++;
    192         return compileSeqTail(current, end, matchLenSoFar + minMatchLength(r), marker, pb);
     191        return compileSeqTail(++current, end, matchLenSoFar + minMatchLength(r), marker, pb);
    193192    } else {
    194193        Var * m = pb.createVar("m", pb.createZeroes());
     
    204203}
    205204
    206 MarkerType RE_Compiler::compileAlt(Alt * alt, const MarkerType base, PabloBuilder & pb) {
     205MarkerType RE_Compiler::compileAlt(Alt * const alt, const MarkerType base, PabloBuilder & pb) {
    207206    std::vector<PabloAST *>  accum(3, pb.createZeroes());
    208207    // The following may be useful to force a common Advance rather than separate
     
    225224}
    226225
    227 MarkerType RE_Compiler::compileAssertion(Assertion * a, MarkerType marker, PabloBuilder & pb) {
     226MarkerType RE_Compiler::compileAssertion(Assertion * const a, MarkerType marker, PabloBuilder & pb) {
    228227    RE * asserted = a->getAsserted();
    229228    if (a->getKind() == Assertion::Kind::Lookbehind) {
     
    261260}
    262261
    263 inline bool alignedUnicodeLength(const RE * lh, const RE * rh) {
     262inline bool alignedUnicodeLength(const RE * const lh, const RE * const rh) {
    264263    const auto lhl = getUnicodeUnitLengthRange(lh);
    265264    const auto rhl = getUnicodeUnitLengthRange(rh);
     
    268267
    269268MarkerType RE_Compiler::compileDiff(Diff * diff, MarkerType marker, PabloBuilder & pb) {
    270     RE * lh = diff->getLH();
    271     RE * rh = diff->getRH();
     269    RE * const lh = diff->getLH();
     270    RE * const rh = diff->getRH();
    272271    if (alignedUnicodeLength(lh, rh)) {
    273272        MarkerType t1 = process(lh, marker, pb);
     
    279278}
    280279
    281 MarkerType RE_Compiler::compileIntersect(Intersect * x, MarkerType marker, PabloBuilder & pb) {
    282     RE * lh = x->getLH();
    283     RE * rh = x->getRH();
     280MarkerType RE_Compiler::compileIntersect(Intersect * const x, MarkerType marker, PabloBuilder & pb) {
     281    RE * const lh = x->getLH();
     282    RE * const rh = x->getRH();
    284283    if (alignedUnicodeLength(lh, rh)) {
    285284        MarkerType t1 = process(lh, marker, pb);
     
    291290}
    292291
    293 MarkerType RE_Compiler::compileRep(Rep * rep, MarkerType marker, PabloBuilder & pb) {
    294     int lb = rep->getLB();
    295     int ub = rep->getUB();
     292MarkerType RE_Compiler::compileRep(Rep * const rep, MarkerType marker, PabloBuilder & pb) {
     293    const auto lb = rep->getLB();
     294    const auto ub = rep->getUB();
    296295    if (lb > 0) {
    297296        marker = processLowerBound(rep->getRE(), lb, marker, IfInsertionGap, pb);
     
    310309*/
    311310   
    312 PabloAST * RE_Compiler::consecutive_matches(PabloAST * repeated_j, int j, int repeat_count, PabloAST * indexStream, PabloBuilder & pb) {
    313     if (j == repeat_count) return repeated_j;
    314     int i = std::min(j, repeat_count - j);
    315     int k = j + i;
     311PabloAST * RE_Compiler::consecutive_matches(PabloAST * const repeated_j, const int j, const int repeat_count, PabloAST * const indexStream, PabloBuilder & pb) {
     312    if (j == repeat_count) {
     313        return repeated_j;
     314    }
     315    const int i = std::min(j, repeat_count - j);
     316    const int k = j + i;
    316317    if (/*j > IfInsertionGap*/ false) {
    317318        Var * repeated = pb.createVar("repeated", pb.createZeroes());
     
    319320        NameMap nestedMap(mCompiledName);
    320321        mCompiledName = &nestedMap;
    321        
    322         PabloAST * adv_i = nullptr;
    323         if (indexStream == nullptr) adv_i = nested.createAdvance(repeated_j, i);
    324         else adv_i = nested.createIndexedAdvance(repeated_j, indexStream, i);
     322        PabloAST * adv_i = nested.createIndexedAdvance(repeated_j, indexStream, i);
    325323        PabloAST * repeated_k = nested.createAnd(repeated_j, adv_i, "at" + std::to_string(k) + "of" + std::to_string(repeat_count));
    326324        nested.createAssign(repeated, consecutive_matches(repeated_k, k, repeat_count, indexStream, nested));
     
    328326        mCompiledName = nestedMap.getParent();
    329327        return repeated;
    330     }
    331     else {
    332         PabloAST * adv_i = nullptr;
    333         if (indexStream == nullptr) adv_i = pb.createAdvance(repeated_j, i);
    334         else adv_i = pb.createIndexedAdvance(repeated_j, indexStream, i);
     328    } else {
     329        PabloAST * adv_i = pb.createIndexedAdvance(repeated_j, indexStream, i);
    335330        PabloAST * repeated_k = pb.createAnd(repeated_j, adv_i, "at" + std::to_string(k) + "of" + std::to_string(repeat_count));
    336331        return consecutive_matches(repeated_k, k, repeat_count, indexStream, pb);
     
    339334
    340335
    341 inline PabloAST * RE_Compiler::reachable(PabloAST * repeated, int length, int repeat_count, PabloAST * indexStream, PabloBuilder & pb) {
    342     int i = length;
    343     int total_lgth = repeat_count * length;
     336inline PabloAST * RE_Compiler::reachable(PabloAST *  const repeated, const int length, const int repeat_count, PabloAST * const indexStream, PabloBuilder & pb) {
    344337    if (repeat_count == 0) {
    345338        return repeated;
    346     }
    347     PabloAST * reachable = nullptr;
    348     if (indexStream == nullptr) reachable = pb.createOr(repeated, pb.createAdvance(repeated, 1), "within1");
    349     else reachable = pb.createOr(repeated, pb.createIndexedAdvance(repeated, indexStream, 1), "within1");
    350     while ((i * 2) < total_lgth) {
    351         PabloAST * v = reachable;
    352         PabloAST * v2 = nullptr;
    353         if (indexStream == nullptr) v2 = pb.createAdvance(v, i);
    354         else v2 = pb.createIndexedAdvance(v, indexStream, i);
     339    }   
     340    const int total_length = repeat_count * length;
     341    PabloAST * const v2 = pb.createIndexedAdvance(repeated, indexStream, 1);
     342    PabloAST * reachable = pb.createOr(repeated, v2, "within1");
     343    int i = length;
     344    while ((i * 2) < total_length) {
     345        PabloAST * const extension = pb.createIndexedAdvance(reachable, indexStream, i);
    355346        i *= 2;
    356         reachable = pb.createOr(v, v2, "within" + std::to_string(i));
    357     }
    358     if (LLVM_LIKELY(i < total_lgth)) {
    359         PabloAST * v = reachable;
    360         PabloAST * v2 = nullptr;
    361         if (indexStream == nullptr) v2 = pb.createAdvance(v, total_lgth - i);
    362         else v2 = pb.createIndexedAdvance(v, indexStream, total_lgth - i);
    363         reachable = pb.createOr(v, v2, "within" + std::to_string(total_lgth));
     347        reachable = pb.createOr(reachable, extension, "within" + std::to_string(i));
     348    }
     349    if (LLVM_LIKELY(i < total_length)) {
     350        PabloAST * const extension = pb.createIndexedAdvance(reachable, indexStream, total_length - i);
     351        reachable = pb.createOr(reachable, extension, "within" + std::to_string(total_length));
    364352    }
    365353    return reachable;
    366354}
    367355
    368 MarkerType RE_Compiler::processLowerBound(RE * repeated, int lb, MarkerType marker, int ifGroupSize, PabloBuilder & pb) {
     356MarkerType RE_Compiler::processLowerBound(RE * const repeated, const int lb, MarkerType marker, const int ifGroupSize, PabloBuilder & pb) {
    369357    if (LLVM_UNLIKELY(lb == 0)) {
    370358        return marker;
     
    374362    //
    375363    // A bounded repetition with an upper bound of at least 2.
    376     if (!AlgorithmOptionIsSet(DisableLog2BoundedRepetition)) {
     364    if (LLVM_LIKELY(!AlgorithmOptionIsSet(DisableLog2BoundedRepetition))) {
    377365        // Check for a regular expression that satisfies on of the special conditions that
    378366        // allow implementation using the log2 technique.
     
    411399    }
    412400    // Fall through to general case.  Process the first item and insert the rest into an if-structure.
    413     auto group = ifGroupSize < lb ? ifGroupSize : lb;
     401    const auto group = ifGroupSize < lb ? ifGroupSize : lb;
    414402    for (auto i = 0; i < group; i++) {
    415403        marker = process(repeated, marker, pb);
     
    429417}
    430418   
    431 MarkerType RE_Compiler::processBoundedRep(RE * repeated, int ub, MarkerType marker, int ifGroupSize,  PabloBuilder & pb) {
     419MarkerType RE_Compiler::processBoundedRep(RE * const repeated, const int ub, MarkerType marker, const int ifGroupSize,  PabloBuilder & pb) {
    432420    if (LLVM_UNLIKELY(ub == 0)) {
    433421        return marker;
     
    435423    //
    436424    // A bounded repetition with an upper bound of at least 2.
    437     if (!AlgorithmOptionIsSet(DisableLog2BoundedRepetition) && (ub > 1)) {
     425    if ((ub > 1) && LLVM_LIKELY(!AlgorithmOptionIsSet(DisableLog2BoundedRepetition))) {
    438426        // Check for a regular expression that satisfies on of the special conditions that
    439427        // allow implementation using the log2 technique.
     
    474462    }
    475463    // Fall through to general case.  Process the first item and insert the rest into an if-structure.
    476     auto group = ifGroupSize < ub ? ifGroupSize : ub;
     464    const auto group = ifGroupSize < ub ? ifGroupSize : ub;
    477465    for (auto i = 0; i < group; i++) {
    478466        MarkerType a = process(repeated, marker, pb);
     
    484472        return marker;
    485473    }
    486     Var * m1a = pb.createVar("m", pb.createZeroes());
     474    Var * const m1a = pb.createVar("m", pb.createZeroes());
    487475    PabloBuilder nested = PabloBuilder::Create(pb);
    488476    NameMap nestedMap(mCompiledName);
     
    492480    pb.createIf(markerVar(marker), nested);
    493481    mCompiledName = nestedMap.getParent();
    494     return makeMarker(m1.pos, m1a);
    495 }
    496 
    497 MarkerType RE_Compiler::processUnboundedRep(RE * repeated, MarkerType marker, PabloBuilder & pb) {
     482    return makeMarker(markerPos(m1), m1a);
     483}
     484
     485MarkerType RE_Compiler::processUnboundedRep(RE * const repeated, MarkerType marker, PabloBuilder & pb) {
    498486    // always use PostPosition markers for unbounded repetition.
    499487    PabloAST * base = markerVar(AdvanceMarker(marker, InitialPostPositionUnit, pb));
    500     if (isByteLength(repeated)  && !AlgorithmOptionIsSet(DisableMatchStar)) {
    501         PabloAST * mask = markerVar(compile(repeated, pb));
    502         PabloAST * nonFinal = mNonFinal;
     488    if (isByteLength(repeated) && LLVM_LIKELY(!AlgorithmOptionIsSet(DisableMatchStar))) {
     489        PabloAST * mask = pb.createOr(markerVar(compile(repeated, pb)), mNonFinal);
    503490        // The post position character may land on the initial byte of a multi-byte character. Combine them with the masked range.
    504         PabloAST * unbounded = pb.createMatchStar(base, pb.createOr(mask, nonFinal), "unbounded");
     491        PabloAST * unbounded = pb.createMatchStar(base, mask, "unbounded");
    505492        return makeMarker(FinalPostPositionUnit, unbounded);
    506     } else if (isUnicodeUnitLength(repeated) && !AlgorithmOptionIsSet(DisableMatchStar) && !AlgorithmOptionIsSet(DisableUnicodeMatchStar)) {
    507         PabloAST * cc = markerVar(compile(repeated, pb));
    508         PabloAST * mstar = nullptr;
    509         PabloAST * nonFinal = mNonFinal;
    510         cc = pb.createOr(cc, nonFinal);
    511         mstar = pb.createMatchStar(base, cc);
    512         PabloAST * final = mFinal;
    513         return makeMarker(FinalPostPositionUnit, pb.createAnd(mstar, final, "unbounded"));
     493    } else if (isUnicodeUnitLength(repeated) && LLVM_LIKELY(!AlgorithmOptionIsSet(DisableMatchStar) && !AlgorithmOptionIsSet(DisableUnicodeMatchStar))) {
     494        PabloAST * mask = pb.createOr(markerVar(compile(repeated, pb)), mNonFinal);
     495        PabloAST * mstar = pb.createMatchStar(base, mask);
     496        return makeMarker(FinalPostPositionUnit, pb.createAnd(mstar, mFinal, "unbounded"));
    514497    } else if (mStarDepth > 0){
    515498        PabloBuilder * const outer = pb.getParent();
     
    550533
    551534inline MarkerType RE_Compiler::compileStart(MarkerType marker, pablo::PabloBuilder & pb) {
    552     PabloAST * sol = pb.createNot(pb.createAdvance(pb.createNot(mLineBreak), 1));
     535    PabloAST * const sol = pb.createNot(pb.createAdvance(pb.createNot(mLineBreak), 1));
    553536    MarkerType m = AdvanceMarker(marker, InitialPostPositionUnit, pb);
    554537    return makeMarker(InitialPostPositionUnit, pb.createAnd(markerVar(m), sol, "sol"));
  • icGREP/icgrep-devel/icgrep/re/re_compiler.h

    r5816 r5821  
    103103    MarkerType compileCC(CC * cc, MarkerType marker, pablo::PabloBuilder & pb);
    104104    MarkerType compileSeq(Seq * seq, MarkerType marker, pablo::PabloBuilder & pb);
    105     MarkerType compileSeqTail(Seq::iterator current, const Seq::iterator end, int matchLenSoFar, MarkerType marker, pablo::PabloBuilder & pb);
     105    MarkerType compileSeqTail(Seq::const_iterator current, const Seq::const_iterator end, int matchLenSoFar, MarkerType marker, pablo::PabloBuilder & pb);
    106106    MarkerType compileAlt(Alt * alt, MarkerType base, pablo::PabloBuilder & pb);
    107107    MarkerType compileAssertion(Assertion * a, MarkerType marker, pablo::PabloBuilder & pb);
  • icGREP/icgrep-devel/icgrep/re/re_name_resolve.cpp

    r5803 r5821  
    5151                return *f;
    5252            }
    53         } else if (Seq * seq = dyn_cast<Seq>(re)) {
    54             for (auto si = seq->begin(); si != seq->end(); ++si) {
    55                 *si = resolveUnicodeProperties(*si);
    56             }
    57         } else if (Alt * alt = dyn_cast<Alt>(re)) {
    58             for (auto ai = alt->begin(); ai != alt->end(); ++ai) {
    59                 *ai = resolveUnicodeProperties(*ai);
     53        } else if (Vector * vec = dyn_cast<Vector>(re)) {
     54            for (RE *& re : *vec) {
     55                re = resolveUnicodeProperties(re);
    6056            }
    6157        } else if (Rep * rep = dyn_cast<Rep>(re)) {
     
    9086                return *f;
    9187            }
    92         } else if (Seq * seq = dyn_cast<Seq>(re)) {
    93             for (auto si = seq->begin(); si != seq->end(); ++si) {
    94                 *si = resolve(*si);
    95             }
    96         } else if (Alt * alt = dyn_cast<Alt>(re)) {
    97             CC * unionCC = nullptr;
    98             std::stringstream name;
    99             for (auto ai = alt->begin(); ai != alt->end(); ) {
    100                 RE * item = resolve(*ai);
    101                 if (CC * cc = extractCC(item)) {
    102                     if (unionCC == nullptr) {
    103                         unionCC = cc;
    104                     } else {
    105                         unionCC = makeCC(unionCC, cc);
    106                         name << '+';
    107                     }
    108                     if (LLVM_LIKELY(isa<Name>(item))) {
    109                         Name * n = cast<Name>(item);
    110                         if (n->hasNamespace()) {
    111                             name << n->getNamespace() << ':';
    112                         }
    113                         name << n->getName();
    114                     } else if (isa<CC>(item)) {
    115                         name << cast<CC>(item)->canonicalName(CC_type::UnicodeClass);
    116                     }
    117                     ai = alt->erase(ai);
    118                 } else {
    119                     *ai++ = item;
    120                 }
    121             }
    122             if (unionCC) {
    123                 alt->push_back(resolve(makeName(name.str(), unionCC)));
    124             }
    125             if (alt->size() == 1) {
    126                 return alt->front();
     88        } else if (Vector * vec = dyn_cast<Vector>(re)) {
     89            for (RE *& re : *vec) {
     90                re = resolve(re);
    12791            }
    12892        } else if (Rep * rep = dyn_cast<Rep>(re)) {
Note: See TracChangeset for help on using the changeset viewer.