• Home
  • Raw
  • Download

Lines Matching refs:GepNode

52   struct GepNode;
53 typedef std::set<GepNode*> NodeSet;
54 typedef std::map<GepNode*,Value*> NodeToValueMap;
55 typedef std::vector<GepNode*> NodeVect;
56 typedef std::map<GepNode*,NodeVect> NodeChildrenMap;
58 typedef std::map<GepNode*,UseSet> NodeToUsesMap;
65 void insert(const GepNode *N) { Map.insert(std::make_pair(N, ++LastNum)); } in insert()
68 bool operator()(const GepNode *N1, const GepNode *N2) const { in operator ()()
75 std::map<const GepNode *, unsigned> Map;
101 typedef std::map<Value*,GepNode*> ValueToNodeMap;
103 typedef std::map<GepNode*,ValueVect> NodeToValuesMap;
111 BasicBlock *recalculatePlacement(GepNode *Node, NodeChildrenMap &NCM,
113 BasicBlock *recalculatePlacementRec(GepNode *Node, NodeChildrenMap &NCM,
116 bool isInvariantIn(GepNode *Node, Loop *L);
118 BasicBlock *adjustForInvariance(GepNode *Node, NodeChildrenMap &NCM,
120 void separateChainForNode(GepNode *Node, Use *U, NodeToValueMap &Loc);
121 void separateConstantChains(GepNode *Node, NodeChildrenMap &NCM,
127 void getAllUsersForNode(GepNode *Node, ValueVect &Values,
136 SpecificBumpPtrAllocator<GepNode> *Mem;
156 struct GepNode { struct
166 GepNode *Parent;
172 GepNode() : Flags(0), Parent(0), Idx(0), PTy(0) {} in GepNode() argument
173 GepNode(const GepNode *N) : Flags(N->Flags), Idx(N->Idx), PTy(N->PTy) { in GepNode() argument
179 friend raw_ostream &operator<< (raw_ostream &OS, const GepNode &GN);
198 raw_ostream &operator<< (raw_ostream &OS, const GepNode &GN) { in operator <<()
201 if (GN.Flags & GepNode::Root) { in operator <<()
205 if (GN.Flags & GepNode::Internal) { in operator <<()
211 if (GN.Flags & GepNode::Used) { in operator <<()
217 if (GN.Flags & GepNode::Root) in operator <<()
282 bool operator() (GepNode *N) const { in operator ()()
291 inline void *operator new(size_t, SpecificBumpPtrAllocator<GepNode> &A) { in operator new()
325 GepNode *N = new (*Mem) GepNode; in processGepInst()
330 N->Flags |= GepNode::Root; in processGepInst()
359 GepNode *PN = N; in processGepInst()
364 GepNode *Nx = new (*Mem) GepNode; in processGepInst()
366 Nx->Flags |= GepNode::Internal; in processGepInst()
378 PN->Flags |= GepNode::Used; in processGepInst()
417 GepNode *N = *I; in invert_find_roots()
418 if (N->Flags & GepNode::Root) { in invert_find_roots()
422 GepNode *PN = N->Parent; in invert_find_roots()
427 void nodes_for_root(GepNode *Root, NodeChildrenMap &NCM, NodeSet &Nodes) { in nodes_for_root()
434 GepNode *N = *First; in nodes_for_root()
448 typedef std::pair<GepNode*,GepNode*> NodePair;
451 const NodeSet *node_class(GepNode *N, NodeSymRel &Rel) { in node_class()
461 NodePair node_pair(GepNode *N1, GepNode *N2) { in node_pair()
468 unsigned node_hash(GepNode *N) { in node_hash()
476 bool node_eq(GepNode *N1, GepNode *N2, NodePairSet &Eq, NodePairSet &Ne) { in node_eq()
490 bool Root1 = N1->Flags & GepNode::Root; in node_eq()
491 bool Root2 = N2->Flags & GepNode::Root; in node_eq()
521 GepNode *N = *I; in common()
534 GepNode *N = *NI; in common()
577 typedef std::map<const NodeSet*,GepNode*> ProjMap; in common()
581 GepNode *Min = *std::min_element(S.begin(), S.end(), NodeOrder); in common()
590 GepNode *N = *J; in common()
594 if (NF & GepNode::Used) in common()
611 GepNode *N = *I; in common()
612 if (N->Flags & GepNode::Root) in common()
621 GepNode *Rep = F->second; in common()
630 GepNode *N = *I; in common()
737 BasicBlock *HexagonCommonGEP::recalculatePlacement(GepNode *Node, in recalculatePlacement()
750 if (Node->Flags & GepNode::Used) { in recalculatePlacement()
772 GepNode *CN = *I; in recalculatePlacement()
805 BasicBlock *HexagonCommonGEP::recalculatePlacementRec(GepNode *Node, in recalculatePlacementRec()
833 bool HexagonCommonGEP::isInvariantIn(GepNode *Node, Loop *L) { in isInvariantIn()
834 if (Node->Flags & GepNode::Root) in isInvariantIn()
867 BasicBlock *HexagonCommonGEP::adjustForInvariance(GepNode *Node, in adjustForInvariance()
873 if (Node->Flags & GepNode::Root) { in adjustForInvariance()
936 inline bool is_constant(GepNode *N) { in is_constant()
942 void HexagonCommonGEP::separateChainForNode(GepNode *Node, Use *U, in separateChainForNode()
949 GepNode *N = Node; in separateChainForNode()
950 GepNode *C = 0, *NewNode = 0; in separateChainForNode()
951 while (is_constant(N) && !(N->Flags & GepNode::Root)) { in separateChainForNode()
953 GepNode *NewN = new (*Mem) GepNode(N); in separateChainForNode()
959 NewN->Flags &= ~GepNode::Used; in separateChainForNode()
983 Node->Flags &= ~GepNode::Used; in separateChainForNode()
988 NewNode->Flags |= GepNode::Used; in separateChainForNode()
995 void HexagonCommonGEP::separateConstantChains(GepNode *Node, in separateConstantChains()
1006 GepNode *N = *I; in separateConstantChains()
1007 if (!(N->Flags & GepNode::Used)) in separateConstantChains()
1041 GepNode *N = I->first; in separateConstantChains()
1089 GepNode *RN = NA[0]; in fabricateGEP()
1090 assert((RN->Flags & GepNode::Root) && "Creating GEP for non-root"); in fabricateGEP()
1109 GepNode *N = NA[nax-1]; in fabricateGEP()
1132 void HexagonCommonGEP::getAllUsersForNode(GepNode *Node, ValueVect &Values, in getAllUsersForNode()
1139 GepNode *N = *First; in getAllUsersForNode()
1141 if (N->Flags & GepNode::Used) { in getAllUsersForNode()
1167 GepNode *Root = *First, *Last = *First; in materialize()
1186 LastUsed = (Last->Flags & GepNode::Used); in materialize()
1193 GepNode *Child = CF->second.front(); in materialize()
1217 GepNode *CN = *I; in materialize()
1218 CN->Flags &= ~GepNode::Internal; in materialize()
1219 CN->Flags |= GepNode::Root; in materialize()
1289 SpecificBumpPtrAllocator<GepNode> Allocator; in runOnFunction()