Lines Matching refs:NodeAddr
87 void printRefHeader(raw_ostream &OS, const NodeAddr<RefNode*> RA, in printRefHeader()
97 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<DefNode*>> &P) { in operator <<()
115 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<UseNode*>> &P) { in operator <<()
128 const Print<NodeAddr<PhiUseNode*>> &P) { in operator <<()
143 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<RefNode*>> &P) { in operator <<()
192 for (NodeAddr<T> A : P.List) { in operator <<()
202 raw_ostream &operator<< (raw_ostream &OS, const Print<NodeAddr<PhiNode*>> &P) { in operator <<()
210 const Print<NodeAddr<StmtNode*>> &P) { in operator <<()
219 const Print<NodeAddr<InstrNode*>> &P) { in operator <<()
236 const Print<NodeAddr<BlockNode*>> &P) { in operator <<()
270 const Print<NodeAddr<FuncNode*>> &P) { in operator <<()
334 NodeAddr<NodeBase*> NodeAllocator::New() { in New()
340 NodeAddr<NodeBase*> NA = { reinterpret_cast<NodeBase*>(ActiveEnd), in New()
366 void NodeBase::append(NodeAddr<NodeBase*> NA) { in append()
404 NodeAddr<NodeBase*> RefNode::getOwner(const DataFlowGraph &G) { in getOwner()
405 NodeAddr<NodeBase*> NA = G.addr<NodeBase*>(getNext()); in getOwner()
416 void DefNode::linkToDef(NodeId Self, NodeAddr<DefNode*> DA) { in linkToDef()
423 void UseNode::linkToDef(NodeId Self, NodeAddr<DefNode*> DA) { in linkToDef()
430 NodeAddr<NodeBase*> CodeNode::getFirstMember(const DataFlowGraph &G) const { in getFirstMember()
432 return NodeAddr<NodeBase*>(); in getFirstMember()
437 NodeAddr<NodeBase*> CodeNode::getLastMember(const DataFlowGraph &G) const { in getLastMember()
439 return NodeAddr<NodeBase*>(); in getLastMember()
444 void CodeNode::addMember(NodeAddr<NodeBase*> NA, const DataFlowGraph &G) { in addMember()
457 void CodeNode::addMemberAfter(NodeAddr<NodeBase*> MA, NodeAddr<NodeBase*> NA, in addMemberAfter()
465 void CodeNode::removeMember(NodeAddr<NodeBase*> NA, const DataFlowGraph &G) { in removeMember()
498 static auto True = [] (NodeAddr<NodeBase*>) -> bool { return true; }; in members()
503 NodeAddr<NodeBase*> InstrNode::getOwner(const DataFlowGraph &G) { in getOwner()
504 NodeAddr<NodeBase*> NA = G.addr<NodeBase*>(getNext()); in getOwner()
516 void BlockNode::addPhi(NodeAddr<PhiNode*> PA, const DataFlowGraph &G) { in addPhi()
532 NodeAddr<NodeBase*> MN = M; in addPhi()
546 NodeAddr<BlockNode*> FuncNode::findBlock(const MachineBasicBlock *BB, in findBlock()
548 auto EqBB = [BB] (NodeAddr<NodeBase*> NA) -> bool { in findBlock()
549 return NodeAddr<BlockNode*>(NA).Addr->getCode() == BB; in findBlock()
554 return NodeAddr<BlockNode*>(); in findBlock()
558 NodeAddr<BlockNode*> FuncNode::getEntryBlock(const DataFlowGraph &G) { in getEntryBlock()
775 Stack.push_back(NodeAddr<DefNode*>(nullptr, N)); in start_block()
841 NodeAddr<NodeBase*> DataFlowGraph::newNode(uint16_t Attrs) { in newNode()
842 NodeAddr<NodeBase*> P = Memory.New(); in newNode()
850 NodeAddr<NodeBase*> DataFlowGraph::cloneNode(const NodeAddr<NodeBase*> B) { in cloneNode()
851 NodeAddr<NodeBase*> NA = newNode(0); in cloneNode()
855 NodeAddr<RefNode*> RA = NA; in cloneNode()
859 NodeAddr<DefNode*> DA = NA; in cloneNode()
870 NodeAddr<UseNode*> DataFlowGraph::newUse(NodeAddr<InstrNode*> Owner, in newUse()
872 NodeAddr<UseNode*> UA = newNode(NodeAttrs::Ref | NodeAttrs::Use | Flags); in newUse()
877 NodeAddr<PhiUseNode*> DataFlowGraph::newPhiUse(NodeAddr<PhiNode*> Owner, in newPhiUse()
878 RegisterRef RR, NodeAddr<BlockNode*> PredB, uint16_t Flags) { in newPhiUse()
879 NodeAddr<PhiUseNode*> PUA = newNode(NodeAttrs::Ref | NodeAttrs::Use | Flags); in newPhiUse()
886 NodeAddr<DefNode*> DataFlowGraph::newDef(NodeAddr<InstrNode*> Owner, in newDef()
888 NodeAddr<DefNode*> DA = newNode(NodeAttrs::Ref | NodeAttrs::Def | Flags); in newDef()
893 NodeAddr<DefNode*> DataFlowGraph::newDef(NodeAddr<InstrNode*> Owner, in newDef()
895 NodeAddr<DefNode*> DA = newNode(NodeAttrs::Ref | NodeAttrs::Def | Flags); in newDef()
901 NodeAddr<PhiNode*> DataFlowGraph::newPhi(NodeAddr<BlockNode*> Owner) { in newPhi()
902 NodeAddr<PhiNode*> PA = newNode(NodeAttrs::Code | NodeAttrs::Phi); in newPhi()
907 NodeAddr<StmtNode*> DataFlowGraph::newStmt(NodeAddr<BlockNode*> Owner, in newStmt()
909 NodeAddr<StmtNode*> SA = newNode(NodeAttrs::Code | NodeAttrs::Stmt); in newStmt()
915 NodeAddr<BlockNode*> DataFlowGraph::newBlock(NodeAddr<FuncNode*> Owner, in newBlock()
917 NodeAddr<BlockNode*> BA = newNode(NodeAttrs::Code | NodeAttrs::Block); in newBlock()
923 NodeAddr<FuncNode*> DataFlowGraph::newFunc(MachineFunction *MF) { in newFunc()
924 NodeAddr<FuncNode*> FA = newNode(NodeAttrs::Code | NodeAttrs::Func); in newFunc()
947 NodeAddr<BlockNode*> EA = Func.Addr->getEntryBlock(*this); in build()
954 NodeAddr<PhiNode*> PA = newPhi(EA); in build()
957 NodeAddr<DefNode*> DA = newDef(PA, RR, PhiFlags); in build()
965 for (NodeAddr<BlockNode*> BA : Blocks) in build()
967 for (NodeAddr<BlockNode*> BA : Blocks) in build()
1005 void DataFlowGraph::pushDefs(NodeAddr<InstrNode*> IA, DefStackMap &DefM) { in pushDefs()
1024 for (NodeAddr<DefNode*> DA : Defs) { in pushDefs()
1028 NodeAddr<DefNode*> PDA = Rel.front(); in pushDefs()
1035 auto *MI = NodeAddr<StmtNode*>(IA).Addr->getCode(); in pushDefs()
1055 NodeList DataFlowGraph::getRelatedRefs(NodeAddr<InstrNode*> IA, in getRelatedRefs()
1056 NodeAddr<RefNode*> RA) const { in getRelatedRefs()
1072 Func = NodeAddr<FuncNode*>(); in reset()
1082 NodeAddr<RefNode*> DataFlowGraph::getNextRelated(NodeAddr<InstrNode*> IA, in getNextRelated()
1083 NodeAddr<RefNode*> RA) const { in getNextRelated()
1086 auto Related = [RA](NodeAddr<RefNode*> TA) -> bool { in getNextRelated()
1093 auto RelatedStmt = [&Related,RA](NodeAddr<RefNode*> TA) -> bool { in getNextRelated()
1097 auto RelatedPhi = [&Related,RA](NodeAddr<RefNode*> TA) -> bool { in getNextRelated()
1103 const NodeAddr<const PhiUseNode*> TUA = TA; in getNextRelated()
1104 const NodeAddr<const PhiUseNode*> RUA = RA; in getNextRelated()
1120 std::pair<NodeAddr<RefNode*>,NodeAddr<RefNode*>>
1121 DataFlowGraph::locateNextRef(NodeAddr<InstrNode*> IA, NodeAddr<RefNode*> RA, in locateNextRef()
1125 NodeAddr<RefNode*> NA; in locateNextRef()
1138 return std::make_pair(RA, NodeAddr<RefNode*>()); in locateNextRef()
1143 NodeAddr<RefNode*> DataFlowGraph::getNextShadow(NodeAddr<InstrNode*> IA, in getNextShadow()
1144 NodeAddr<RefNode*> RA, bool Create) { in getNextShadow()
1148 auto IsShadow = [Flags] (NodeAddr<RefNode*> TA) -> bool { in getNextShadow()
1156 NodeAddr<RefNode*> NA = cloneNode(RA); in getNextShadow()
1164 NodeAddr<RefNode*> DataFlowGraph::getNextShadow(NodeAddr<InstrNode*> IA, in getNextShadow()
1165 NodeAddr<RefNode*> RA) const { in getNextShadow()
1168 auto IsShadow = [Flags] (NodeAddr<RefNode*> TA) -> bool { in getNextShadow()
1176 void DataFlowGraph::buildStmt(NodeAddr<BlockNode*> BA, MachineInstr &In) { in buildStmt()
1223 NodeAddr<DefNode*> DA = newDef(SA, Op, Flags); in buildStmt()
1246 NodeAddr<DefNode*> DA = newDef(SA, Op, Flags); in buildStmt()
1266 NodeAddr<UseNode*> UA = newUse(SA, Op, Flags); in buildStmt()
1273 void DataFlowGraph::buildBlockRefs(NodeAddr<BlockNode*> BA, in buildBlockRefs()
1286 for (NodeAddr<InstrNode*> IA : BA.Addr->members(*this)) in buildBlockRefs()
1287 for (NodeAddr<RefNode*> RA : IA.Addr->members(*this)) in buildBlockRefs()
1294 NodeAddr<BlockNode*> BA) { in recordDefsForDF()
1314 NodeAddr<InstrNode*> IA = I; in recordDefsForDF()
1315 for (NodeAddr<RefNode*> RA : IA.Addr->members_if(IsDef, *this)) in recordDefsForDF()
1346 NodeAddr<BlockNode*> BA) { in buildPhis()
1411 NodeAddr<PhiNode*> PA = newPhi(BA); in buildPhis()
1417 NodeAddr<DefNode*> DA = newDef(PA, RR, PhiFlags); in buildPhis()
1425 NodeAddr<PhiUseNode*> PUA = newPhiUse(PA, RR, PBA); in buildPhis()
1446 for (NodeAddr<BlockNode*> BA : Func.Addr->members(*this)) { in removeUnusedPhis()
1455 NodeAddr<DefNode*> DA = M; in removeUnusedPhis()
1471 for (NodeAddr<RefNode*> RA : Refs) { in removeUnusedPhis()
1474 NodeAddr<InstrNode*> OA = RDA.Addr->getOwner(*this); in removeUnusedPhis()
1483 NodeAddr<BlockNode*> BA = PA.Addr->getOwner(*this); in removeUnusedPhis()
1492 void DataFlowGraph::linkRefUp(NodeAddr<InstrNode*> IA, NodeAddr<T> TA, in linkRefUp()
1497 NodeAddr<T> TAP; in linkRefUp()
1516 NodeAddr<DefNode*> RDA = *I; in linkRefUp()
1537 void DataFlowGraph::linkStmtRefs(DefStackMap &DefM, NodeAddr<StmtNode*> SA) { in linkStmtRefs()
1541 for (NodeAddr<RefNode*> RA : SA.Addr->members(*this)) { in linkStmtRefs()
1565 void DataFlowGraph::linkBlockRefs(DefStackMap &DefM, NodeAddr<BlockNode*> BA) { in linkBlockRefs()
1573 for (NodeAddr<InstrNode*> IA : BA.Addr->members(*this)) { in linkBlockRefs()
1592 auto IsUseForBA = [BA](NodeAddr<NodeBase*> NA) -> bool { in linkBlockRefs()
1596 NodeAddr<PhiUseNode*> PUA = NA; in linkBlockRefs()
1602 for (NodeAddr<InstrNode*> IA : SBA.Addr->members_if(IsPhi, *this)) { in linkBlockRefs()
1605 NodeAddr<PhiUseNode*> PUA = U; in linkBlockRefs()
1617 void DataFlowGraph::unlinkUseDF(NodeAddr<UseNode*> UA) { in unlinkUseDF()
1644 void DataFlowGraph::unlinkDefDF(NodeAddr<DefNode*> DA) { in unlinkDefDF()
1683 for (NodeAddr<RefNode*> I : ReachedDefs) in unlinkDefDF()
1685 for (NodeAddr<RefNode*> I : ReachedUses) in unlinkDefDF()
1688 for (NodeAddr<DefNode*> I : ReachedDefs) in unlinkDefDF()
1690 for (NodeAddr<UseNode*> I : ReachedUses) in unlinkDefDF()
1721 auto Last = NodeAddr<DefNode*>(ReachedDefs.back()); in unlinkDefDF()
1727 auto Last = NodeAddr<UseNode*>(ReachedUses.back()); in unlinkDefDF()