Changeset 5716 for icGREP


Ignore:
Timestamp:
Oct 28, 2017, 7:32:13 PM (18 months ago)
Author:
cameron
Message:

Enabling long indexed-advance by default for AVX2

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

Legend:

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

    r5715 r5716  
    645645        Value * carryPosition = b->getScalarField("IndexedAdvancePosition" + std::to_string(mIndexedLongAdvanceIndex));
    646646        Value * carryBlockEndPos = b->CreateAdd(carryPosition, blockWidth_1);
    647         unsigned carry_blocks = nearest_pow2(20+ceil_udiv(shiftAmount, b->getBitBlockWidth()));
     647        unsigned carry_blocks = nearest_pow2(1+ceil_udiv(shiftAmount, b->getBitBlockWidth()));
    648648        Constant * carryQueueBlocks = b->getSize(carry_blocks);
    649649        Value * carryBlock = b->CreateTrunc(b->CreateURem(b->CreateUDiv(carryPosition, blockWidth), carryQueueBlocks), b->getInt32Ty());
     
    988988                const auto blockWidth = b->getBitBlockWidth();
    989989                const auto blocks = ceil_udiv(amount, blockWidth);
    990                 type = ArrayType::get(blockTy, nearest_pow2(blocks + (isa<IndexedAdvance>(stmt) ? 20:0) + ((loopDepth != 0) ? 1 : 0)));
     990                type = ArrayType::get(blockTy, nearest_pow2(blocks + (isa<IndexedAdvance>(stmt) ? 1:0) + ((loopDepth != 0) ? 1 : 0)));
    991991                if (LLVM_UNLIKELY(ifDepth > 0 && blocks != 1)) {
    992992                    const auto summarySize = ceil_udiv(blocks, blockWidth);
  • icGREP/icgrep-devel/icgrep/re/re_compiler.cpp

    r5711 r5716  
    399399        PabloAST * marker_fwd = pb.createAdvance(markerVar(marker), pos);
    400400        return makeMarker(MarkerPosition::FinalMatchUnit, pb.createAnd(marker_fwd, cc_lb, "lowerbound"));
    401     } else if (!mGraphemeBoundaryRule && isUnicodeUnitLength(repeated) && !AlgorithmOptionIsSet(DisableLog2BoundedRepetition) && (lb <= codegen::BlockSize) && AVX2_available()) {
     401    } else if (!mGraphemeBoundaryRule && isUnicodeUnitLength(repeated) && !AlgorithmOptionIsSet(DisableLog2BoundedRepetition) && AVX2_available()) {
    402402        PabloAST * cc = markerVar(compile(repeated, pb));
    403403        PabloAST * cc_lb = consecutive_matches(cc, 1, lb, mFinal, pb);
     
    445445        PabloAST * bounded = pb.createMatchStar(cursor, pb.createOr(masked, nonFinal), "bounded");
    446446        return makeMarker(MarkerPosition::FinalPostPositionUnit, bounded);
    447     } else if (!mGraphemeBoundaryRule && isUnicodeUnitLength(repeated) && ub > 1 && !AlgorithmOptionIsSet(DisableLog2BoundedRepetition)&& (ub <= codegen::BlockSize) && AVX2_available()) {
     447    } else if (!mGraphemeBoundaryRule && isUnicodeUnitLength(repeated) && ub > 1 && !AlgorithmOptionIsSet(DisableLog2BoundedRepetition) && AVX2_available()) {
    448448        // log2 upper bound for fixed length (=1) class
    449449        // Create a mask of positions reachable within ub from current marker.
Note: See TracChangeset for help on using the changeset viewer.