Ignore:
Timestamp:
Mar 13, 2018, 1:17:42 PM (13 months ago)
Author:
cameron
Message:

Byte-Bit grep kernel optimizes when an RE begins with an initial trigraph

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/re/re_analysis.cpp

    r5902 r5908  
    482482}
    483483
     484bool hasTriCCwithinLimit(RE * r, unsigned byteCClimit, RE * & prefixRE, RE * & suffixRE) {
     485    if (Seq * seq = dyn_cast<Seq>(r)) {
     486        if (seq->size() < 4) return false;
     487        prefixRE = makeSeq(seq->begin(), seq->begin()+3);
     488        if (byteTestsWithinLimit(prefixRE, byteCClimit)) {
     489            suffixRE = makeSeq(seq->begin()+3, seq->end());
     490            return true;
     491        }
     492        return false;
     493    }
     494    return false;
     495}
    484496
    485497void UndefinedNameError(const Name * n) {
Note: See TracChangeset for help on using the changeset viewer.