Changeset 5914 for icGREP


Ignore:
Timestamp:
Mar 18, 2018, 11:50:40 AM (10 months ago)
Author:
cameron
Message:

Optimization for regexps ending $

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

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.cpp

    r5865 r5914  
    547547        // The shift amount is greater than the total popcount.   We will consume popcount
    548548        // bits from the shiftIn value only, and produce a carry out value of the selected bits.
    549         // elements that we deal with.   This simplifies some of the logic.
    550549        Value * carry = CreateBitCast(shiftIn, iBitBlock);
    551550        Value * result = UndefValue::get(vecTy);
  • icGREP/icgrep-devel/icgrep/grep/grep_engine.cpp

    r5913 r5914  
    210210   
    211211    mREs = REs;
     212    bool allAnchored = true;
    212213    for(unsigned i = 0; i < mREs.size(); ++i) {
     214        if (!hasEndAnchor(mREs[i])) allAnchored = false;
    213215        mREs[i] = resolveModesAndExternalSymbols(mREs[i]);
    214216        mREs[i] = re::exclude_CC(mREs[i], mBreakCC);
     
    217219        mREs[i] = regular_expression_passes(mREs[i]);
    218220    }
     221    if (allAnchored && (mGrepRecordBreak != GrepRecordBreakKind::Unicode)) mMoveMatchesToEOL = false;
    219222
    220223}
  • icGREP/icgrep-devel/icgrep/kernels/grep_kernel.cpp

    r5908 r5914  
    1818#include <pablo/pe_var.h>           // for Var
    1919#include <pablo/pe_zeroes.h>        // for Zeroes
     20#include <pablo/pe_infile.h>
    2021#include <pablo/boolean.h>
    2122#include <pablo/pe_count.h>
     
    433434    const auto toCount = pb->createExtract(getInputStreamVar("toCount"), pb->getInteger(0));
    434435    pablo::Var * countResult = getOutputScalarVar("countResult");
    435     pb->createAssign(countResult, pb->createCount(toCount));
     436   
     437    pb->createAssign(countResult, pb->createCount(pb->createInFile(toCount)));
    436438}
    437439
Note: See TracChangeset for help on using the changeset viewer.