diff --git a/include/dollop_man.h b/include/dollop_man.h index bdd55b5d1ab9066aeb16f8577fda8d06805881cb..fd4572235ee28263abe567a82ae129ef8c17dd48 100644 --- a/include/dollop_man.h +++ b/include/dollop_man.h @@ -38,24 +38,75 @@ class DollopManager_t { public: DollopManager_t() {}; - virtual void AddDollops(Zipr_SDK::Dollop_t *dollop_head) = 0; - virtual Zipr_SDK::Dollop_t *AddNewDollops(libIRDB::Instruction_t *start) = 0; - virtual size_t Size() = 0; + /* + * Add a dollop and all its fallthrough dollops + * to the dollop manager. + */ + virtual void AddDollops(Zipr_SDK::Dollop_t *dollop_head)=0; + /* + * Create new dollops from a particular start instruction. + */ + virtual Zipr_SDK::Dollop_t *AddNewDollops(libIRDB::Instruction_t *start)=0; - virtual Zipr_SDK::Dollop_t *GetContainingDollop(libIRDB::Instruction_t *insn) = 0; + /* + * Return the number of dollops under management. + */ + virtual size_t Size()=0; + /* + * Return the dollop containing an instruction. + */ + virtual Zipr_SDK::Dollop_t *GetContainingDollop( + libIRDB::Instruction_t *insn)=0; + + /* + * Add a dollop patch to the dollop manager. + */ virtual void AddDollopPatch(Zipr_SDK::DollopPatch_t *new_patch) = 0; - virtual std::list<Zipr_SDK::DollopPatch_t*> PatchesToDollop(Zipr_SDK::Dollop_t *target) = 0; + /* + * Return all the patches that point to a particular + * dollop. + */ + virtual std::list<Zipr_SDK::DollopPatch_t*> PatchesToDollop( + Zipr_SDK::Dollop_t *target)=0; + /* + * Update the dollops under management based on the + * targetted dollops in a particular dollop. + */ virtual bool UpdateTargets(Zipr_SDK::Dollop_t *) = 0; + /* + * Update all the dollops under management based on + * all the dollops of which the manager knows. + */ virtual void UpdateAllTargets() = 0; + /* + * Return beginning and ending iterators for all the + * dollops under management. + */ virtual std::list<Zipr_SDK::Dollop_t*>::const_iterator dollops_begin() = 0; virtual std::list<Zipr_SDK::Dollop_t*>::const_iterator dollops_end() = 0; + /* + * Print (for debugging) all the dollop patches + * under management. + */ virtual void PrintDollopPatches(const std::ostream &) = 0; + /* + * print (for debugging) information about the dollop + * manager. + */ friend std::ostream &operator<<(std::ostream &out, const DollopManager_t &dollop_man); + /* + * Print (useful output for end user) information about + * statistics of the dollop manager and the job it is + * doing. + */ virtual void PrintStats(std::ostream &out) = 0; + /* + * Generate a placement map file for all the dollops under management. + */ virtual void PrintPlacementMap(const Zipr_SDK::MemorySpace_t &memory_space, const std::string &map_filename) = 0; };