Ignore:
Timestamp:
Feb 3, 2017, 2:31:24 PM (2 years ago)
Author:
nmedfort
Message:

Removed StreamType? in favour of 0-length VectorType?.

Location:
icGREP/icgrep-devel/icgrep/IR_Gen
Files:
2 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.cpp

    r5267 r5298  
    380380}
    381381
    382 StreamType * IDISA_Builder::getStreamTy(const unsigned FieldWidth) {
    383     const auto f = mStreamTypes.find(FieldWidth);
    384     if (LLVM_LIKELY(f != mStreamTypes.end())) {
    385         return f->second;
    386     } else {
    387         StreamType * const T = new StreamType(getContext(), FieldWidth);
    388         mStreamTypes.emplace(FieldWidth, T);
    389         return T;
    390     }
    391 }
    392 
    393382IDISA_Builder::IDISA_Builder(Module * m, unsigned archBitWidth, unsigned bitBlockWidth, unsigned stride, unsigned CacheAlignment)
    394383: CBuilder(m, archBitWidth, CacheAlignment)
     
    403392
    404393IDISA_Builder::~IDISA_Builder() {
    405     for (const auto t : mStreamTypes) {
    406         delete std::get<1>(t);
    407     }
    408     mStreamTypes.clear();
    409 }
    410 
    411 }
     394
     395}
     396
     397}
  • icGREP/icgrep-devel/icgrep/IR_Gen/idisa_builder.h

    r5260 r5298  
    99#include "CBuilder.h"
    1010#include <llvm/IR/DerivedTypes.h>
    11 #include <IR_Gen/types/streamtype.h>
    12 #include <boost/container/flat_map.hpp>
    1311namespace llvm { class Constant; }
    1412namespace llvm { class LoadInst; }
    1513namespace llvm { class Module; }
    16 namespace llvm { class Type; }
    1714namespace llvm { class Value; }
    1815
     
    2017
    2118class IDISA_Builder : public CBuilder {
    22 
    23     using StreamTypes = boost::container::flat_map<unsigned, StreamType *>;
    2419
    2520public:
     
    128123    }
    129124   
    130     StreamType * getStreamTy(const unsigned FieldWidth = 1);
     125    llvm::VectorType * getStreamTy(const unsigned FieldWidth = 1) {
     126        return llvm::VectorType::get(llvm::IntegerType::getIntNTy(getContext(), FieldWidth), 0);
     127    }
    131128
    132129    void CallPrintRegister(const std::string & regName, llvm::Value * const value);
     
    136133    unsigned            mStride;
    137134    llvm::VectorType *  mBitBlockType;
    138 
    139135    llvm::Constant *    mZeroInitializer;
    140136    llvm::Constant *    mOneInitializer;
    141137    llvm::Constant *    mPrintRegisterFunction;
    142     StreamTypes         mStreamTypes;
    143138};
    144139
Note: See TracChangeset for help on using the changeset viewer.