Ignore:
Timestamp:
Feb 18, 2017, 4:13:44 PM (2 years ago)
Author:
nmedfort
Message:

Continued work on parenthesis matching; addition of Pablo ScanTo? and AdvanceThenScanTo/Thru? statements. Bug fix for Pablo Compiler for escaping variables.

File:
1 edited

Legend:

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

    r5283 r5329  
    495495}
    496496
     497PabloAST * PabloBuilder::createScanTo(PabloAST * from, PabloAST * to) {
     498    if (isa<Zeroes>(from)) {
     499        return from;
     500    }
     501    MAKE_BINARY(createScanTo, TypeId::ScanTo, from, to);
     502    return result;
     503}
     504
     505PabloAST * PabloBuilder::createScanTo(PabloAST * from, PabloAST * to, const llvm::StringRef & prefix) {
     506    if (isa<Zeroes>(from)) {
     507        return from;
     508    }
     509    MAKE_NAMED_BINARY(createScanTo, TypeId::ScanTo, prefix, from, to);
     510    return result;
     511}
     512
     513PabloAST * PabloBuilder::createAdvanceThenScanThru(PabloAST * from, PabloAST * thru) {
     514    if (isa<Zeroes>(from) || isa<Zeroes>(thru)) {
     515        return from;
     516    }
     517    MAKE_BINARY(createAdvanceThenScanThru, TypeId::AdvanceThenScanThru, from, thru);
     518    return result;
     519}
     520
     521PabloAST * PabloBuilder::createAdvanceThenScanThru(PabloAST * from, PabloAST * thru, const llvm::StringRef & prefix) {
     522    if (isa<Zeroes>(from) || isa<Zeroes>(thru)) {
     523        return from;
     524    }
     525    MAKE_NAMED_BINARY(createAdvanceThenScanThru, TypeId::AdvanceThenScanThru, prefix, from, thru);
     526    return result;
     527}
     528
     529PabloAST * PabloBuilder::createAdvanceThenScanTo(PabloAST * from, PabloAST * to) {
     530    if (isa<Zeroes>(from)) {
     531        return from;
     532    }
     533    MAKE_BINARY(createAdvanceThenScanTo, TypeId::ScanTo, from, to);
     534    return result;
     535}
     536
     537PabloAST * PabloBuilder::createAdvanceThenScanTo(PabloAST * from, PabloAST * to, const llvm::StringRef & prefix) {
     538    if (isa<Zeroes>(from)) {
     539        return from;
     540    }
     541    MAKE_NAMED_BINARY(createAdvanceThenScanTo, TypeId::ScanTo, prefix, from, to);
     542    return result;
     543}
    497544
    498545PabloAST * PabloBuilder::createSel(PabloAST * condition, PabloAST * trueExpr, PabloAST * falseExpr) {
Note: See TracChangeset for help on using the changeset viewer.