Ignore:
Timestamp:
Jul 6, 2015, 9:35:48 AM (4 years ago)
Author:
nmedfort
Message:

Next nodes for While statements must be declared similar to how Defined Vars are for Ifs. (Temporarily breaks multiplexing correctness.)

File:
1 edited

Legend:

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

    r4638 r4641  
    3838static cl::opt<bool> DisableUnicodeLineBreak("disable-unicode-linebreak", cl::init(false),
    3939                     cl::desc("disable Unicode line breaks - use LF only"), cl::cat(fREcompilationOptions));
    40 static cl::opt<bool> DisablePregeneratedUnicode("disable-pregenerated-unicode", cl::init(true),
     40static cl::opt<bool> DisablePregeneratedUnicode("disable-pregenerated-unicode", cl::init(false),
    4141                     cl::desc("disable use of pregenerated Unicode character class sets"), cl::cat(fREcompilationOptions));
    4242
     
    5959, mWhileTest(nullptr)
    6060, mStarDepth(0)
    61 , mPB(ccCompiler.getBuilder().getPabloBlock(), ccCompiler.getBuilder())
     61, mLoopVariants()
     62, mPB(*ccCompiler.getBuilder().getPabloBlock(), ccCompiler.getBuilder())
    6263, mUCDCompiler(ccCompiler)
    6364{
     
    510511        Next * nextPending = pb.createNext(starPending, pb.createAnd(loopComputation, pb.createNot(m2)));
    511512        Next * nextStarAccum = pb.createNext(starAccum, pb.createOr(loopComputation, m2));
     513        mLoopVariants.push_back(nextPending);
     514        mLoopVariants.push_back(nextStarAccum);
    512515        mWhileTest = pb.createOr(mWhileTest, nextPending);
    513516        mStarDepth--;
     
    528531        Next * nextWhileAccum = wb.createNext(whileAccum, wb.createOr(loopComputation, whileAccum));
    529532        Next * nextWhileTest = wb.createNext(whileTest, wb.createOr(mWhileTest, nextWhilePending));
    530         pb.createWhile(nextWhileTest, wb);
     533        mLoopVariants.push_back(nextWhilePending);
     534        mLoopVariants.push_back(nextWhileAccum);
     535        mLoopVariants.push_back(nextWhileTest);
     536        pb.createWhile(nextWhileTest, mLoopVariants, wb);
    531537        mStarDepth--;
    532 
     538        mLoopVariants.clear();
    533539        return makeMarker(InitialPostPositionByte, pb.createAssign("unbounded", nextWhileAccum));
    534540    }   
Note: See TracChangeset for help on using the changeset viewer.