reference, declaration → definition definition → references, declarations, derived classes, virtual overrides reference to multiple definitions → definitions unreferenced |
69 struct GepNode;
103 return Constant<std::alignment_of<T>::value>();
include/llvm/Support/Allocator.h81 template <typename T> T *Allocate(size_t Num = 1) { 82 return static_cast<T *>(Allocate(Num * sizeof(T), alignof(T))); 82 return static_cast<T *>(Allocate(Num * sizeof(T), alignof(T))); 470 for (char *Ptr = Begin; Ptr + sizeof(T) <= End; Ptr += sizeof(T)) 470 for (char *Ptr = Begin; Ptr + sizeof(T) <= End; Ptr += sizeof(T)) 478 char *Begin = (char *)alignAddr(*I, Align::Of<T>()); 488 DestroyElements((char *)alignAddr(Ptr, Align::Of<T>()), 496 T *Allocate(size_t num = 1) { return Allocator.Allocate<T>(num); } 496 T *Allocate(size_t num = 1) { return Allocator.Allocate<T>(num); }lib/Target/Hexagon/HexagonCommonGEP.cpp
70 using NodeSet = std::set<GepNode *>; 71 using NodeToValueMap = std::map<GepNode *, Value *>; 72 using NodeVect = std::vector<GepNode *>; 73 using NodeChildrenMap = std::map<GepNode *, NodeVect>; 75 using NodeToUsesMap = std::map<GepNode *, UseSet>; 82 void insert(const GepNode *N) { Map.insert(std::make_pair(N, ++LastNum)); } 85 bool operator()(const GepNode *N1, const GepNode *N2) const { 85 bool operator()(const GepNode *N1, const GepNode *N2) const { 92 std::map<const GepNode *, unsigned> Map; 118 using ValueToNodeMap = std::map<Value *, GepNode *>; 120 using NodeToValuesMap = std::map<GepNode *, ValueVect>; 128 BasicBlock *recalculatePlacement(GepNode *Node, NodeChildrenMap &NCM, 130 BasicBlock *recalculatePlacementRec(GepNode *Node, NodeChildrenMap &NCM, 133 bool isInvariantIn(GepNode *Node, Loop *L); 135 BasicBlock *adjustForInvariance(GepNode *Node, NodeChildrenMap &NCM, 137 void separateChainForNode(GepNode *Node, Use *U, NodeToValueMap &Loc); 138 void separateConstantChains(GepNode *Node, NodeChildrenMap &NCM, 144 void getAllUsersForNode(GepNode *Node, ValueVect &Values, 153 SpecificBumpPtrAllocator<GepNode> *Mem; 186 GepNode *Parent; 193 GepNode(const GepNode *N) : Flags(N->Flags), Idx(N->Idx), PTy(N->PTy) { 200 friend raw_ostream &operator<< (raw_ostream &OS, const GepNode &GN); 219 raw_ostream &operator<< (raw_ostream &OS, const GepNode &GN) { 222 if (GN.Flags & GepNode::Root) { 226 if (GN.Flags & GepNode::Internal) { 232 if (GN.Flags & GepNode::Used) { 237 if (GN.Flags & GepNode::InBounds) { 243 if (GN.Flags & GepNode::Root) 308 bool operator() (GepNode *N) const { 318 inline void *operator new(size_t, SpecificBumpPtrAllocator<GepNode> &A) { 346 GepNode *N = new (*Mem) GepNode; 346 GepNode *N = new (*Mem) GepNode; 348 uint32_t InBounds = GepI->isInBounds() ? GepNode::InBounds : 0; 352 N->Flags |= GepNode::Root | InBounds; 381 GepNode *PN = N; 386 GepNode *Nx = new (*Mem) GepNode; 386 GepNode *Nx = new (*Mem) GepNode; 388 Nx->Flags |= GepNode::Internal | InBounds; 400 PN->Flags |= GepNode::Used; 437 GepNode *N = *I; 438 if (N->Flags & GepNode::Root) { 442 GepNode *PN = N->Parent; 447 static void nodes_for_root(GepNode *Root, NodeChildrenMap &NCM, 455 GepNode *N = *First; 468 using NodePair = std::pair<GepNode *, GepNode *>; 468 using NodePair = std::pair<GepNode *, GepNode *>; 473 static const NodeSet *node_class(GepNode *N, NodeSymRel &Rel) { 483 static NodePair node_pair(GepNode *N1, GepNode *N2) { 483 static NodePair node_pair(GepNode *N1, GepNode *N2) { 490 static unsigned node_hash(GepNode *N) { 498 static bool node_eq(GepNode *N1, GepNode *N2, NodePairSet &Eq, 498 static bool node_eq(GepNode *N1, GepNode *N2, NodePairSet &Eq, 513 bool Root1 = N1->Flags & GepNode::Root; 514 bool Root2 = N2->Flags & GepNode::Root; 542 GepNode *N = *I; 555 GepNode *N = *NI; 597 using ProjMap = std::map<const NodeSet *, GepNode *>; 601 GepNode *Min = *std::min_element(S.begin(), S.end(), NodeOrder); 610 GepNode *N = *J; 614 if (NF & GepNode::Used) 631 GepNode *N = *I; 632 if (N->Flags & GepNode::Root) 641 GepNode *Rep = F->second; 650 GepNode *N = *I; 754 BasicBlock *HexagonCommonGEP::recalculatePlacement(GepNode *Node, 767 if (Node->Flags & GepNode::Used) { 789 GepNode *CN = *I; 821 BasicBlock *HexagonCommonGEP::recalculatePlacementRec(GepNode *Node, 847 bool HexagonCommonGEP::isInvariantIn(GepNode *Node, Loop *L) { 848 if (Node->Flags & GepNode::Root) 876 BasicBlock *HexagonCommonGEP::adjustForInvariance(GepNode *Node, 882 if (Node->Flags & GepNode::Root) { 946 inline bool is_constant(GepNode *N) { 952 void HexagonCommonGEP::separateChainForNode(GepNode *Node, Use *U, 959 GepNode *N = Node; 960 GepNode *C = nullptr, *NewNode = nullptr; 961 while (is_constant(N) && !(N->Flags & GepNode::Root)) { 963 GepNode *NewN = new (*Mem) GepNode(N); 963 GepNode *NewN = new (*Mem) GepNode(N); 969 NewN->Flags &= ~GepNode::Used; 991 Node->Flags &= ~GepNode::Used; 996 NewNode->Flags |= GepNode::Used; 1002 void HexagonCommonGEP::separateConstantChains(GepNode *Node, 1013 GepNode *N = *I; 1014 if (!(N->Flags & GepNode::Used)) 1048 GepNode *N = I->first; 1095 GepNode *RN = NA[0]; 1115 GepNode *N = NA[nax-1]; 1129 NewInst->setIsInBounds(RN->Flags & GepNode::InBounds); 1138 void HexagonCommonGEP::getAllUsersForNode(GepNode *Node, ValueVect &Values, 1145 GepNode *N = *First; 1147 if (N->Flags & GepNode::Used) { 1172 GepNode *Root = *First, *Last = *First; 1191 LastUsed = (Last->Flags & GepNode::Used); 1198 GepNode *Child = CF->second.front(); 1222 GepNode *CN = *I; 1223 CN->Flags &= ~GepNode::Internal; 1224 CN->Flags |= GepNode::Root; 1291 SpecificBumpPtrAllocator<GepNode> Allocator;