Changeset 4656
- Timestamp:
- Jul 10, 2015, 10:38:46 AM (4 years ago)
- Location:
- icGREP/icgrep-devel/icgrep
- Files:
-
- 2 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
icGREP/icgrep-devel/icgrep/icgrep-devel.files
r4648 r4656 331 331 pablo/carry_manager.h 332 332 pablo/carry_data.cpp 333 pablo/function.h 334 pablo/function.cpp -
icGREP/icgrep-devel/icgrep/pablo/optimizers/pablo_bddminimization.cpp
r4629 r4656 1000 1000 1001 1001 // Gather the original users to this advance. We'll be manipulating it shortly. 1002 Statement:: UsersU(adv->users());1002 Statement::Vector U(adv->users()); 1003 1003 1004 1004 // Add s to V and sort the list; it'll be closer to being in topological order. -
icGREP/icgrep-devel/icgrep/pablo/pabloAST.cpp
r4650 r4656 87 87 void PabloAST::replaceAllUsesWith(PabloAST * expr) { 88 88 Statement * user[mUsers.size()]; 89 Users::size_type users = 0;89 Vector::size_type users = 0; 90 90 for (PabloAST * u : mUsers) { 91 91 if (isa<Statement>(u)) { -
icGREP/icgrep-devel/icgrep/pablo/pabloAST.h
r4650 r4656 25 25 friend class Statement; 26 26 friend class Var; 27 friend class If; 27 friend class If; 28 28 friend class While; 29 29 friend class PabloBlock; 30 friend class Function; 30 31 friend class SymbolGenerator; 31 32 public: … … 33 34 using Allocator = SlabAllocator<u_int8_t>; 34 35 using VectorAllocator = SlabAllocator<PabloAST *>; 35 using Users = std::vector<PabloAST*, VectorAllocator>; 36 using user_iterator = Users::iterator; 37 using const_user_iterator = Users::const_iterator; 38 36 using Vector = std::vector<PabloAST*, VectorAllocator>; 37 using user_iterator = Vector::iterator; 38 using const_user_iterator = Vector::const_iterator; 39 39 40 40 enum class ClassTypeId : unsigned { 41 Advance 41 // Constants 42 Zeroes 43 , Ones 44 // Boolean operations 42 45 , And 46 , Or 47 , Not 48 , Xor 49 , Sel 50 // Stream operations 51 , Advance 52 , ScanThru 53 , MatchStar 54 // Variable assignments 43 55 , Assign 56 , Next 44 57 , Call 58 , Var 59 // Scope blocks 45 60 , If 61 , While 62 , Block 63 , Function 64 // Internal variables 46 65 , Integer 47 , MatchStar48 , Next49 , Not50 , Ones51 , Or52 , ScanThru53 , Sel54 66 , String 55 , Var56 , While57 , Xor58 , Zeroes59 , Block60 67 }; 61 68 inline ClassTypeId getClassTypeId() const { … … 79 86 } 80 87 81 inline Users& users() {88 inline Vector & users() { 82 89 return mUsers; 83 90 } 84 91 85 inline const Users& users() const {92 inline const Vector & users() const { 86 93 return mUsers; 87 94 } … … 89 96 void replaceAllUsesWith(PabloAST * expr); 90 97 91 inline Users::size_type getNumUses() const {98 inline Vector::size_type getNumUses() const { 92 99 return mUsers.size(); 93 100 } … … 128 135 private: 129 136 const ClassTypeId mClassTypeId; 130 UsersmUsers;137 Vector mUsers; 131 138 static VectorAllocator mVectorAllocator; 132 139 }; -
icGREP/icgrep-devel/icgrep/pablo/pe_ones.h
r4432 r4656 24 24 virtual ~Ones() { 25 25 } 26 inline bool operator==(const Ones & other) const {26 inline bool operator==(const Ones &) const { 27 27 return true; 28 28 } -
icGREP/icgrep-devel/icgrep/pablo/pe_zeroes.h
r4510 r4656 24 24 } 25 25 virtual ~Zeroes() { 26 27 26 } 28 // virtual PabloAST * getOperand(const unsigned) const { 29 // assert (false); 30 // return nullptr; 31 // } 32 // virtual unsigned getNumOperands() const { 33 // return 0; 34 // } 35 // virtual void setOperand(const unsigned, PabloAST *) { 36 // assert (false); 37 // } 38 inline bool operator==(const Zeroes & other) const { 27 inline bool operator==(const Zeroes &) const { 39 28 return true; 40 29 }
Note: See TracChangeset
for help on using the changeset viewer.