Ignore:
Timestamp:
Dec 9, 2015, 4:59:02 PM (3 years ago)
Author:
nmedfort
Message:

Continued work on multiplexing pass.

File:
1 edited

Legend:

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

    r4886 r4890  
    293293And * PabloBlock::createAnd(const unsigned reserved) {
    294294    return insertAtInsertionPoint(new And(reserved, makeName("and_")));
     295}
     296
     297And * PabloBlock::createAnd(const unsigned reserved, const std::string prefix) {
     298    return insertAtInsertionPoint(new And(reserved, makeName(prefix, false)));
    295299}
    296300
     
    385389}
    386390
     391Or * PabloBlock::createOr(const unsigned reserved, const std::string prefix) {
     392    return insertAtInsertionPoint(new Or(reserved, makeName(prefix, false)));
     393}
     394
    387395PabloAST * PabloBlock::createXor(PabloAST * expr1, PabloAST * expr2) {
    388396    assert (expr1 && expr2);
     
    429437Xor * PabloBlock::createXor(const unsigned reserved) {
    430438    return insertAtInsertionPoint(new Xor(reserved, makeName("xor_")));
     439}
     440
     441Xor * PabloBlock::createXor(const unsigned reserved, const std::string prefix) {
     442    return insertAtInsertionPoint(new Xor(reserved, makeName(prefix, false)));
    431443}
    432444
     
    452464        return createXor(condition, falseExpr);
    453465    } else if (isa<Not>(falseExpr) && equals(trueExpr, cast<Not>(falseExpr)->getOperand(0))){
    454         return createXor(condition, falseExpr);
     466        return createXor(condition, trueExpr);
    455467    }
    456468    return insertAtInsertionPoint(new Sel(condition, trueExpr, falseExpr, makeName("sel")));
     
    481493    }
    482494    else if (isa<Not>(falseExpr) && equals(trueExpr, cast<Not>(falseExpr)->getOperand(0))){
    483         return createXor(condition, falseExpr, prefix);
     495        return createXor(condition, trueExpr, prefix);
    484496    }
    485497    return insertAtInsertionPoint(new Sel(condition, trueExpr, falseExpr, makeName(prefix, false)));
Note: See TracChangeset for help on using the changeset viewer.