diff --git a/include/inc-cfg/domgraph.hpp b/include/inc-cfg/domgraph.hpp index 2ba8479cd3af2789f226080f765610fe18500337..f79468cb319c68ffe3a5a5a1c417c9dcea078a1c 100644 --- a/include/inc-cfg/domgraph.hpp +++ b/include/inc-cfg/domgraph.hpp @@ -5,7 +5,7 @@ namespace IRDB_SDK using namespace std; using DominatorMap_t = map<const BasicBlock_t*, BasicBlockSet_t>; - using BlockToBlockMap_t = map<const BasicBlock_t*, BasicBlock_t*>; + using BlockToBlockMap_t = map<const BasicBlock_t*, const BasicBlock_t*>; class DominatorGraph_t { @@ -19,12 +19,18 @@ namespace IRDB_SDK bool needs_idoms=false ); - virtual const BasicBlockSet_t& getDominators(const BasicBlock_t* node) const = 0 ; - virtual const BasicBlockSet_t& getPostDominators(const BasicBlock_t* node) const = 0 ; - virtual bool hasWarnings() const = 0 ; - virtual const BasicBlock_t* getImmediateDominator(const BasicBlock_t* node) const = 0 ; - virtual const BasicBlock_t* getImmediatePostDominators(const BasicBlock_t* node) const = 0 ; - virtual void dump(ostream &os=cout) const = 0 ; + virtual const BasicBlockSet_t& getDominators(const BasicBlock_t* node) const = 0 ; + virtual const BasicBlockSet_t& getDominated (const IRDB_SDK::BasicBlock_t* node) const = 0 ; +// virtual const BasicBlockSet_t& getPostDominators(const BasicBlock_t* node) const = 0 ; +// virtual const BasicBlockSet_t& getPostDominated (const BasicBlock_t* node) const = 0 ; + + virtual const BasicBlock_t* getImmediateDominator(const BasicBlock_t* node) const = 0 ; + virtual const BasicBlockSet_t& getImmediateDominated(const IRDB_SDK::BasicBlock_t* node) const = 0 ; +// virtual const BasicBlock_t* getImmediatePostDominator (const BasicBlock_t* node) const = 0 ; +// virtual const BasicBlockSet_t& getImmediatePostDominated (const BasicBlock_t* node) const = 0 ; + + virtual void dump(ostream &os=cout) const = 0 ; + virtual bool hasWarnings() const = 0 ; }; ostream& operator<<(ostream& os, const DominatorGraph_t& cfg);