Ignore:
Timestamp:
Oct 21, 2014, 11:05:04 PM (5 years ago)
Author:
nmedfort
Message:

Pablo Compiler now generates phi nodes created for carry variables. zStarHeight showed 33% improvement. Had to manually merge in last check-in's changes.

File:
1 edited

Legend:

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

    r4255 r4257  
    66
    77#include <pablo/codegenstate.h>
     8#include <iostream>
    89
    910namespace pablo {
     
    1213
    1314PabloAST * PabloBlock::createAdvance(PabloAST * expr) {
    14 //    if (isa<Zeroes>(expr)) {
    15 //        return createZeroes();
    16 //    }
     15    if (isa<Zeroes>(expr)) {
     16        return expr;
     17    }
    1718    return mUnary.findOrMake<Advance>(PabloAST::ClassTypeId::Advance, expr);
    1819}
     
    2324
    2425PabloAST * PabloBlock::createNot(PabloAST * expr) {
    25 //    if (isa<Zeroes>(expr)) {
    26 //        return createOnes();
    27 //    }
    28 //    else if (isa<Ones>(expr)) {
    29 //        return createZeroes();
    30 //    }
    3126    return mUnary.findOrCall<OptimizeNot>(PabloAST::ClassTypeId::Not, expr);
    3227}
     
    4540
    4641PabloAST * PabloBlock::createMatchStar(PabloAST * marker, PabloAST * charclass) {
    47 //    if (isa<Zeroes>(marker)) {
    48 //        return createZeroes();
    49 //    }
    50 //    else if (isa<Zeroes>(charclass)) {
    51 //        return marker;
    52 //    }
     42    if (isa<Zeroes>(marker) || isa<Zeroes>(charclass)) {
     43        return marker;
     44    }
    5345    return mBinary.findOrMake<MatchStar>(PabloAST::ClassTypeId::MatchStar, marker, charclass);
    5446}
    5547
    5648PabloAST * PabloBlock::createScanThru(PabloAST * from, PabloAST * thru) {
    57 //    if (isa<Zeroes>(from)) {
    58 //        return createZeroes();
    59 //    }
    60 //    else if (isa<Zeroes>(thru)) {
    61 //        return marker;
    62 //    }
     49    if (isa<Zeroes>(from) || isa<Zeroes>(thru)) {
     50        return from;
     51    }
    6352    return mBinary.findOrMake<ScanThru>(PabloAST::ClassTypeId::ScanThru, from, thru);
    6453}
Note: See TracChangeset for help on using the changeset viewer.