Ignore:
Timestamp:
Sep 23, 2016, 4:12:41 PM (3 years ago)
Author:
nmedfort
Message:

Initial work for incorporating Types into Pablo AST.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/cc/cc_compiler.cpp

    r5140 r5160  
    3030, mBasisBit(encodingBits)
    3131, mEncodingBits(encodingBits) {
     32    const PabloType * streamType = getPabloType(PabloType::Stream, 1);
    3233    for (unsigned i = 0; i != mEncodingBits; i++) {
    33         Var * var = mBuilder.createVar(prefix + std::to_string(i));
     34        Var * var = mBuilder.createVar(prefix + std::to_string(i), streamType);
    3435        function.setParameter(i, var);
    3536        mBasisBit[i] = var;
     
    9596PabloAST * CC_Compiler::bit_pattern_expr(const unsigned pattern, unsigned selected_bits, PabloBlockOrBuilder & pb) {
    9697    if (LLVM_UNLIKELY(selected_bits == 0)) {
    97         return PabloBlock::createOnes();
     98        return pb.createOnes();
    9899    } else {
    99100        std::vector<PabloAST*> terms;
    100101        for (unsigned i = 0; selected_bits; ++i) {
    101102            unsigned test_bit = static_cast<unsigned>(1) << i;
    102             PabloAST * term = PabloBlock::createOnes();
     103            PabloAST * term = pb.createOnes();
    103104            if (selected_bits & test_bit) {
    104105                term = getBasisVar(i);
Note: See TracChangeset for help on using the changeset viewer.