Ignore:
Timestamp:
Jan 19, 2017, 2:41:02 PM (3 years ago)
Author:
nmedfort
Message:

Code clean-up. Removed Pablo Call, SetIthBit? and Prototype.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/pablo/pabloAST.h

    r5240 r5267  
    88#define PE_PabloAST_H
    99
    10 #include <IR_Gen/types/streamtype.h>
    1110#include <llvm/Support/Casting.h>
    1211#include <llvm/Support/Compiler.h>
     
    1514#include <type_traits>
    1615#include <vector>
    17 
    18 using namespace llvm;
     16namespace llvm { class Type; }
     17namespace llvm { class raw_ostream; }
     18namespace pablo { class PabloBlock; }
     19namespace pablo { class String; }
    1920
    2021namespace pablo {
    21 
    22 class PabloBlock;
    23 class Statement;
    24 class String;
    25 class Branch;
    2622
    2723class PabloAST {
     
    3127    friend class Branch;
    3228    friend class PabloBlock;
    33     friend class Prototype;
    3429    friend class SymbolGenerator;
    3530    friend class Count;
     
    6156        , String
    6257        , Block
    63         , Function
    64         , Prototype
    6558        // Arithmetic expressions
    6659        , Add
     
    9285        , Assign
    9386        , Extract     
    94         , Call
    95         , SetIthBit
    9687        // Scope blocks
    9788        , If
     
    10798    }
    10899
    109     inline void setType(Type * type) noexcept {
     100    inline void setType(llvm::Type * type) noexcept {
    110101        mType = type;
    111102    }
     
    157148//    }
    158149
    159     void print(raw_ostream & O) const;
     150    void print(llvm::raw_ostream & O) const;
    160151
    161152protected:
    162     inline PabloAST(const ClassTypeId id, Type * const type, const String * name, Allocator & allocator)
     153    inline PabloAST(const ClassTypeId id, llvm::Type * const type, const String * name, Allocator & allocator)
    163154    : mClassTypeId(id)
    164155    , mType(type)
     
    174165private:
    175166    const ClassTypeId       mClassTypeId;
    176     Type *                  mType;
     167    llvm::Type *            mType;
    177168    const String *          mName;
    178169    Users                   mUsers;
     
    236227    virtual ~Statement() {}
    237228protected:
    238     explicit Statement(const ClassTypeId id, Type * const type, std::initializer_list<PabloAST *> operands, const String * const name, Allocator & allocator)
     229    explicit Statement(const ClassTypeId id, llvm::Type * const type, std::initializer_list<PabloAST *> operands, const String * const name, Allocator & allocator)
    239230    : PabloAST(id, type, name, allocator)
    240231    , mNext(nullptr)
     
    251242        }
    252243    }
    253     explicit Statement(const ClassTypeId id, Type * const type, const unsigned reserved, const String * const name, Allocator & allocator)
     244    explicit Statement(const ClassTypeId id, llvm::Type * const type, const unsigned reserved, const String * const name, Allocator & allocator)
    254245    : PabloAST(id, type, name, allocator)
    255246    , mNext(nullptr)
     
    261252    }
    262253    template<typename iterator>
    263     explicit Statement(const ClassTypeId id, Type * const type, iterator begin, iterator end, const String * const name, Allocator & allocator)
     254    explicit Statement(const ClassTypeId id, llvm::Type * const type, iterator begin, iterator end, const String * const name, Allocator & allocator)
    264255    : PabloAST(id, type, name, allocator)
    265256    , mNext(nullptr)
     
    345336
    346337protected:
    347     explicit Variadic(const ClassTypeId id, Type * const type, std::initializer_list<PabloAST *> operands, const String * const name, Allocator & allocator)
     338    explicit Variadic(const ClassTypeId id, llvm::Type * const type, std::initializer_list<PabloAST *> operands, const String * const name, Allocator & allocator)
    348339    : Statement(id, type, operands, name, allocator)
    349340    , mCapacity(operands.size())
     
    351342
    352343    }
    353     explicit Variadic(const ClassTypeId id, Type * const type, const unsigned reserved, const String * name, Allocator & allocator)
     344    explicit Variadic(const ClassTypeId id, llvm::Type * const type, const unsigned reserved, const String * name, Allocator & allocator)
    354345    : Statement(id, type, reserved, name, allocator)
    355346    , mCapacity(reserved)
     
    358349    }
    359350    template<typename iterator>
    360     explicit Variadic(const ClassTypeId id, Type * const type, iterator begin, iterator end, const String * name, Allocator & allocator)
     351    explicit Variadic(const ClassTypeId id, llvm::Type * const type, iterator begin, iterator end, const String * name, Allocator & allocator)
    361352    : Statement(id, type, begin, end, name, allocator)
    362353    , mCapacity(std::distance(begin, end))
Note: See TracChangeset for help on using the changeset viewer.