Ignore:
Timestamp:
May 10, 2016, 12:12:41 AM (3 years ago)
Author:
nmedfort
Message:

UnicodeSet? bug fix and compile warning clean-up.

Location:
icGREP/icgrep-devel/icgrep/pablo
Files:
8 edited

Legend:

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

    r5023 r5037  
    3232
    3333    inline static PabloBuilder Create(PabloBlock * block) noexcept {
    34         return std::move(PabloBuilder(block));
     34        return PabloBuilder(block);
    3535    }
    3636
    3737    inline static PabloBuilder Create(PabloBuilder & builder) noexcept {
    38         return std::move(PabloBuilder(new PabloBlock(builder.mPb->mSymbolGenerator), builder));
     38        return PabloBuilder(new PabloBlock(builder.mPb->mSymbolGenerator), builder);
    3939    }
    4040
  • icGREP/icgrep-devel/icgrep/pablo/carry_manager.cpp

    r4974 r5037  
    242242    Value * countSoFar = iBuilder->CreateAlignedLoad(countPtr, 8);
    243243    Value * fieldCounts = iBuilder->simd_popcount(64, to_count);
    244     for (int i = 0; i < mBitBlockWidth/64; i++) {
     244    for (unsigned i = 0; i < mBitBlockWidth/64; ++i) {
    245245        countSoFar = iBuilder->CreateAdd(countSoFar, iBuilder->mvmd_extract(64, fieldCounts, i));
    246246    }
  • icGREP/icgrep-devel/icgrep/pablo/pabloAST.cpp

    r5023 r5037  
    1414
    1515PabloAST::Allocator PabloAST::mAllocator;
     16PabloAST::VectorAllocator PabloAST::mVectorAllocator;
    1617
    1718/** ------------------------------------------------------------------------------------------------------------- *
  • icGREP/icgrep-devel/icgrep/pablo/pabloAST.h

    r5023 r5037  
    3939
    4040    using Allocator = SlabAllocator<u_int8_t>;
    41     using VectorAllocator = Allocator::rebind<PabloAST *>::other;
     41    using VectorAllocator = SlabAllocator<PabloAST *>;
    4242    using Users = std::vector<PabloAST *, VectorAllocator>;
    4343    using user_iterator = Users::iterator;
     
    125125    inline PabloAST(const ClassTypeId id)
    126126    : mClassTypeId(id)
    127     , mUsers(reinterpret_cast<VectorAllocator &>(mAllocator))
     127    , mUsers(mVectorAllocator)
    128128    {
    129129
     
    135135    }
    136136    static Allocator        mAllocator;
     137    static VectorAllocator  mVectorAllocator;
    137138private:
    138139    const ClassTypeId       mClassTypeId;
  • icGREP/icgrep-devel/icgrep/pablo/ps_if.cpp

    r4896 r5037  
    55namespace pablo {
    66
     7If::DefinedAllocator If::mDefinedAllocator;
     8
    79If::If(PabloAST * expr, const std::initializer_list<Assign *> definedVars, PabloBlock * body)
    810: Statement(ClassTypeId::If, {expr}, nullptr)
    911, mBody(body)
    10 , mDefined(definedVars.begin(), definedVars.end(), reinterpret_cast<DefinedAllocator &>(mAllocator)) {
     12, mDefined(definedVars.begin(), definedVars.end(), mDefinedAllocator) {
    1113    // Conceptually, having a defined var X is identical to having:
    1214    //
     
    3032: Statement(ClassTypeId::If, {expr}, nullptr)
    3133, mBody(body)
    32 , mDefined(definedVars.begin(), definedVars.end(), reinterpret_cast<DefinedAllocator &>(mAllocator)) {
     34, mDefined(definedVars.begin(), definedVars.end(), mDefinedAllocator) {
    3335    mBody->setBranch(this);
    3436    mBody->setParent(getParent());
  • icGREP/icgrep-devel/icgrep/pablo/ps_if.h

    r4870 r5037  
    2020    friend class Simplifier;
    2121public:
    22     using DefinedAllocator = VectorAllocator::rebind<Assign *>::other;
     22    using DefinedAllocator = SlabAllocator<Assign *>;
    2323    using DefinedVars = std::vector<Assign *, DefinedAllocator>;
    2424
     
    5454    If(PabloAST * expr, const std::vector<Assign *> & definedVars, PabloBlock * body);
    5555private:
    56     PabloBlock *    mBody;
    57     DefinedVars     mDefined;
     56    PabloBlock *            mBody;
     57    DefinedVars             mDefined;
     58    static DefinedAllocator mDefinedAllocator;
    5859};
    5960
  • icGREP/icgrep-devel/icgrep/pablo/ps_while.cpp

    r4896 r5037  
    44namespace pablo {
    55
     6While::VariantAllocator While::mVariantAllocator;
     7
    68While::While(PabloAST * expr, const std::initializer_list<Next *> nextVars, PabloBlock * body)
    79: Statement(ClassTypeId::While, {expr}, nullptr)
    810, mBody(body)
    9 , mVariant(nextVars.begin(), nextVars.end(), reinterpret_cast<NextAllocator &>(mAllocator)) {
     11, mVariant(nextVars.begin(), nextVars.end(), mVariantAllocator) {
    1012    mBody->setBranch(this);
    1113    mBody->setParent(getParent());
     
    1921: Statement(ClassTypeId::While, {expr}, nullptr)
    2022, mBody(body)
    21 , mVariant(nextVars.begin(), nextVars.end(), reinterpret_cast<NextAllocator &>(mAllocator)) {
     23, mVariant(nextVars.begin(), nextVars.end(), mVariantAllocator) {
    2224    mBody->setBranch(this);
    2325    mBody->setParent(getParent());
  • icGREP/icgrep-devel/icgrep/pablo/ps_while.h

    r4876 r5037  
    1818public:
    1919
    20     using NextAllocator = VectorAllocator::rebind<Next*>::other;
    21     using Variants = std::vector<Next *, NextAllocator>;
     20    using VariantAllocator = SlabAllocator<Next *>;
     21    using Variants = std::vector<Next *, VariantAllocator>;
    2222
    2323    static inline bool classof(const PabloAST * e) {
     
    5050
    5151private:
    52     PabloBlock *    mBody;
    53     Variants        mVariant;
     52    PabloBlock *            mBody;
     53    Variants                mVariant;
     54    static VariantAllocator mVariantAllocator;
    5455};
    5556
Note: See TracChangeset for help on using the changeset viewer.