Ignore:
Timestamp:
Mar 30, 2017, 9:28:11 PM (2 years ago)
Author:
cameron
Message:

Disable lookahead CRLF - further work needed

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

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/kernels/linebreak_kernel.cpp

    r5383 r5385  
    4141    Var * crlf = builder.createVar("crlf", zero);
    4242    PabloBuilder crb = PabloBuilder::Create(builder);
    43     //PabloAST * cr1 = crb.createAdvance(CR, 1, "cr1");
    44     //crb.createAssign(crlf, crb.createAnd(cr1, LF));
     43#ifndef USE_LOOKAHEAD_CRLF
     44    PabloAST * cr1 = crb.createAdvance(CR, 1, "cr1");
     45    crb.createAssign(crlf, crb.createAnd(cr1, LF));
     46#else
    4547    PabloAST * lookaheadLF = crb.createLookahead(LF, 1, "lookaheadLF");
    4648    crb.createAssign(crlf, crb.createAnd(CR, lookaheadLF));
     49#endif
    4750    builder.createIf(CR, crb);
    4851   
     
    8184    PabloAST * const r = builder.createExtract(getOutput(0), builder.getInteger(0));
    8285    builder.createAssign(r, LineBreak);
     86#ifdef USE_LOOKAHEAD_CRLF
    8387    setLookAhead(1);
     88#endif
    8489}
  • icGREP/icgrep-devel/icgrep/pablo/pablo_compiler.cpp

    r5384 r5385  
    6262        if (LLVM_UNLIKELY(isa<Lookahead>(stmt))) {
    6363            const Lookahead * const la = cast<Lookahead>(stmt);
    64             assert (isa<Var>(la->getExpr()) || isa<Extract>(la->getExpr()));
     64            //assert ((isa<Var>(la->getExpr()) || isa<Extract>(la->getExpr())));
    6565            if (LLVM_LIKELY(la->getAmount() > mKernel->getLookAhead())) {
    6666                mKernel->setLookAhead(la->getAmount());
Note: See TracChangeset for help on using the changeset viewer.