Changeset 6292


Ignore:
Timestamp:
Jan 19, 2019, 2:44:56 PM (3 months ago)
Author:
cameron
Message:

Merge branch 'master' of https://cs-git-research.cs.surrey.sfu.ca/cameron/parabix-devel

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

Legend:

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

    r5933 r6292  
    288288                }
    289289            } else if (LLVM_UNLIKELY(isa<Zeroes>(op[i]) || isa<Ones>(op[i]))) {
    290                 if (isa<And>(stmt) ^ isa<Zeroes>(op)) {
     290                if (isa<And>(stmt) ^ isa<Zeroes>(op[i])) {
    291291                    return op[1 - i];
    292292                } else {
     
    315315                op[i] = n->getExpr();
    316316            } else if (LLVM_UNLIKELY(isa<Zeroes>(op[i]) || isa<Ones>(op[i]))) {
    317                 negated ^= isa<Ones>(op);
     317                negated ^= isa<Ones>(op[i]);
    318318                expr = op[1 - i];
    319319            }
  • icGREP/icgrep-devel/icgrep/re/re_analysis.cpp

    r6198 r6292  
    183183        return isByteLength(e->getLH()) && isByteLength(e->getRH());
    184184    } else if (const CC * cc = dyn_cast<CC>(re)) {
     185        if (cc->empty()) return false;
    185186        const cc::Alphabet * a = cc->getAlphabet();
    186187        if (a == &cc::Unicode) {
     
    235236    } else if (isa<Any>(re)) {
    236237        return true;
    237     } else if (isa<CC>(re)) {
    238         return true;
     238    } else if (const CC * cc = dyn_cast<CC>(re)) {
     239        return !(cc->empty());
    239240    } else if (const Name * n = dyn_cast<Name>(re)) {
    240241        // Eventually names might be set up for not unit length items.
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r6201 r6292  
    121121
    122122MarkerType RE_Compiler::compileCC(CC * const cc, MarkerType marker, PabloBuilder & pb) {
     123    if (cc->empty()) {
     124        return makeMarker(FinalMatchUnit, pb.createZeroes());
     125    }
    123126    PabloAST * nextPos = markerVar(marker);
    124127    const cc::Alphabet * a = cc->getAlphabet();
Note: See TracChangeset for help on using the changeset viewer.