Go to the documentation of this file.
42 #ifndef TTA_CONTROL_DEPENDENCE_GRAPH_HH
43 #define TTA_CONTROL_DEPENDENCE_GRAPH_HH
50 #include <boost/graph/reverse_graph.hpp>
66 BoostGraph<ControlDependenceNode, ControlDependenceEdge> {
88 typedef std::map<ControlFlowGraph::NodeDescriptor, int>
PostOrderMap;
89 typedef boost::associative_property_map<PostOrderMap>
PostOrder;
92 typedef boost::associative_property_map<CDGOrderMap>
CDGOrder;
95 typedef boost::associative_property_map<DescriptorMap>
Descriptors;
97 typedef std::map <NodeDescriptor, boost::default_color_type >
ColorMap;
98 typedef boost::associative_property_map<ColorMap>
Color;
112 std::vector<Node*>& cdNodes,
TTAProgram::Program * program() const
bool analyzed_
Indicates that CDG already has data required for serialization.
std::vector< BasicBlockNode * > BlockVector
std::map< Node *, DependentOn *, Node::Comparator > DependenceMap
#define IGNORE_CLANG_WARNING(X)
void regionHelper(Node *, Node::NodesInfo &)
std::map< NodeDescriptor, boost::default_color_type > ColorMap
Storage for color property used by dfs.
std::pair< Node *, Edge::CDGEdgeType > SourceType
int componentCount() const
std::set< ControlDependenceNode * > NodesInfo
Storage type for other nodes of same graph needed to define some non graph relations....
std::map< NodeDescriptor, int > CDGOrderMap
Stores data to compute post order relation on CDG and strong components.
boost::associative_property_map< ColorMap > Color
boost::associative_property_map< DescriptorMap > Descriptors
ControlDependenceGraph(const ControlFlowGraph &cGraph)
bool findSubset(DependentOn *, DependentOn *, Node *)
ControlDependenceNode & entryNode()
void detectControlDependencies(BlockVector &nodes, std::vector< Node * > &cdNodes, PostOrder &postOrder, DependenceMap &dependencies)
ControlDependenceNode Node
The (base) node type managed by this graph.
boost::associative_property_map< PostOrderMap > PostOrder
void processRegion(Node *region)
TTAProgram::Address startAddress_
void createPostDominanceTree(BlockVector &nodes, PostOrder &postOrder)
Node * entryNode_
Stores reference to entryNode of the graph.
void computeRegionInfo(const CDGOrderMap &orderMap)
boost::associative_property_map< CDGOrderMap > CDGOrder
CompareResult compareSiblings(Node *a, Node *b) const
std::vector< std::set< Node * > > strongComponents_
std::map< ControlFlowGraph::NodeDescriptor, int > PostOrderMap
Stores data to compute post order relation on CFG.
std::vector< SourceType > DependentOn
ControlDependenceEdge & createControlDependenceEdge(Node &bTail, Node &bHead, Edge::CDGEdgeType edgeValue=Edge::CDEP_EDGE_NORMAL)
TTAProgram::Program * program_
virtual ~ControlDependenceGraph()
std::vector< int > iDomTree_
int detectStrongComponents(CDGOrderMap &components, DescriptorMap &roots)
ControlFlowGraph * cGraph_
std::map< NodeDescriptor, NodeDescriptor > DescriptorMap
Storage for relations between nodes.
void computeRelations(const CDGOrderMap &orderMap)
void computeEECInfo(const CDGOrderMap &orderMap)
void eliminateMultipleOutputs()
int nearestCommonDom(std::vector< int > &iDom, int node1, int node2) const