Lines Matching refs:Addr

54   uint16_t Attrs = NA.Addr->getAttrs();  in operator <<()
113 OS << Print(RA.Id, G) << '<' << Print(RA.Addr->getRegRef(G), G) << '>'; in printRefHeader()
114 if (RA.Addr->getFlags() & NodeAttrs::Fixed) in printRefHeader()
121 if (NodeId N = P.Obj.Addr->getReachingDef()) in operator <<()
124 if (NodeId N = P.Obj.Addr->getReachedDef()) in operator <<()
127 if (NodeId N = P.Obj.Addr->getReachedUse()) in operator <<()
130 if (NodeId N = P.Obj.Addr->getSibling()) in operator <<()
138 if (NodeId N = P.Obj.Addr->getReachingDef()) in operator <<()
141 if (NodeId N = P.Obj.Addr->getSibling()) in operator <<()
149 if (NodeId N = P.Obj.Addr->getReachingDef()) in operator <<()
152 if (NodeId N = P.Obj.Addr->getPredecessor()) in operator <<()
155 if (NodeId N = P.Obj.Addr->getSibling()) in operator <<()
161 switch (P.Obj.Addr->getKind()) { in operator <<()
166 if (P.Obj.Addr->getFlags() & NodeAttrs::PhiRef) in operator <<()
220 << PrintListV<RefNode *>(P.Obj.Addr->members(P.G), P.G) << ']'; in operator <<()
225 const MachineInstr &MI = *P.Obj.Addr->getCode(); in operator <<()
244 OS << " [" << PrintListV<RefNode *>(P.Obj.Addr->members(P.G), P.G) << ']'; in operator <<()
249 switch (P.Obj.Addr->getKind()) { in operator <<()
264 MachineBasicBlock *BB = P.Obj.Addr->getCode(); in operator <<()
290 for (auto I : P.Obj.Addr->members(P.G)) in operator <<()
298 << ": Function: " << P.Obj.Addr->getCode()->getName() << '\n'; in operator <<()
299 for (auto I : P.Obj.Addr->members(P.G)) in operator <<()
321 OS << Print(I->Id, P.G) << '<' << Print(I->Addr->getRegRef(P.G), P.G) in operator <<()
395 NA.Addr->Next = Nx; in append()
431 while (NA.Addr != this) { in getOwner()
432 if (NA.Addr->getType() == NodeAttrs::Code) in getOwner()
434 NA = G.addr<NodeBase *>(NA.Addr->getNext()); in getOwner()
442 RefData.Sib = DA.Addr->getReachedDef(); in linkToDef()
443 DA.Addr->setReachedDef(Self); in linkToDef()
449 RefData.Sib = DA.Addr->getReachedUse(); in linkToDef()
450 DA.Addr->setReachedUse(Self); in linkToDef()
471 ML.Addr->append(NA); in addMember()
475 NA.Addr->setNext(Self); in addMember()
482 MA.Addr->append(NA); in addMemberAfter()
499 CodeData.FirstM = MA.Addr->getNext(); in removeMember()
504 while (MA.Addr != this) { in removeMember()
505 NodeId MX = MA.Addr->getNext(); in removeMember()
507 MA.Addr->setNext(NA.Addr->getNext()); in removeMember()
529 while (NA.Addr != this) { in getOwner()
530 assert(NA.Addr->getType() == NodeAttrs::Code); in getOwner()
531 if (NA.Addr->getKind() == NodeAttrs::Block) in getOwner()
533 NA = G.addr<NodeBase *>(NA.Addr->getNext()); in getOwner()
546 assert(M.Addr->getType() == NodeAttrs::Code); in addPhi()
547 if (M.Addr->getKind() == NodeAttrs::Stmt) { in addPhi()
551 PA.Addr->setNext(M.Id); in addPhi()
554 assert(M.Addr->getKind() == NodeAttrs::Phi); in addPhi()
558 MN = G.addr<NodeBase *>(M.Addr->getNext()); in addPhi()
559 assert(MN.Addr->getType() == NodeAttrs::Code); in addPhi()
560 } while (MN.Addr->getKind() == NodeAttrs::Phi); in addPhi()
571 auto EqBB = [BB](Node NA) -> bool { return Block(NA).Addr->getCode() == BB; }; in findBlock()
777 P.Addr->init(); in newNode()
778 P.Addr->setAttrs(Attrs); in newNode()
786 memcpy(NA.Addr, B.Addr, sizeof(NodeBase)); in cloneNode()
788 if (NA.Addr->getType() == NodeAttrs::Ref) { in cloneNode()
790 RA.Addr->setReachingDef(0); in cloneNode()
791 RA.Addr->setSibling(0); in cloneNode()
792 if (NA.Addr->getKind() == NodeAttrs::Def) { in cloneNode()
794 DA.Addr->setReachedDef(0); in cloneNode()
795 DA.Addr->setReachedUse(0); in cloneNode()
805 UA.Addr->setRegRef(&Op, *this); in newUse()
813 PUA.Addr->setRegRef(RR, *this); in newPhiUse()
814 PUA.Addr->setPredecessor(PredB.Id); in newPhiUse()
820 DA.Addr->setRegRef(&Op, *this); in newDef()
827 DA.Addr->setRegRef(RR, *this); in newDef()
833 Owner.Addr->addPhi(PA, *this); in newPhi()
839 SA.Addr->setCode(MI); in newStmt()
840 Owner.Addr->addMember(SA, *this); in newStmt()
846 BA.Addr->setCode(BB); in newBlock()
847 Owner.Addr->addMember(BA, *this); in newBlock()
853 FA.Addr->setCode(MF); in newFunc()
910 Block EA = TheFunc.Addr->getEntryBlock(*this); in build()
911 NodeList Blocks = TheFunc.Addr->members(*this); in build()
914 MachineBasicBlock &EntryB = *EA.Addr->getCode(); in build()
930 PA.Addr->addMember(DA, *this); in build()
941 const MachineBasicBlock &B = *BA.Addr->getCode(); in build()
958 PA.Addr->addMember(DA, *this); in build()
962 PA.Addr->addMember(PUA, *this); in build()
1050 for (Def DA : IA.Addr->members_if(IsDef, *this)) { in pushClobbers()
1053 if (!(DA.Addr->getFlags() & NodeAttrs::Clobbering)) in pushClobbers()
1058 RegisterRef RR = PDA.Addr->getRegRef(*this); in pushClobbers()
1098 for (Def DA : IA.Addr->members_if(IsDef, *this)) { in pushDefs()
1101 if (DA.Addr->getFlags() & NodeAttrs::Clobbering) in pushDefs()
1106 RegisterRef RR = PDA.Addr->getRegRef(*this); in pushDefs()
1111 MachineInstr *MI = Stmt(IA).Addr->getCode(); in pushDefs()
1167 if (TA.Addr->getKind() != RA.Addr->getKind()) in getNextRelated()
1169 if (!getPRI().equal_to(TA.Addr->getRegRef(*this), in getNextRelated()
1170 RA.Addr->getRegRef(*this))) { in getNextRelated()
1176 RegisterRef RR = RA.Addr->getRegRef(*this); in getNextRelated()
1177 if (IA.Addr->getKind() == NodeAttrs::Stmt) { in getNextRelated()
1179 return IsRelated(TA) && &RA.Addr->getOp() == &TA.Addr->getOp(); in getNextRelated()
1181 return RA.Addr->getNextRef(RR, Cond, true, *this); in getNextRelated()
1184 assert(IA.Addr->getKind() == NodeAttrs::Phi); in getNextRelated()
1188 if (TA.Addr->getKind() != NodeAttrs::Use) in getNextRelated()
1191 return PhiUse(TA).Addr->getPredecessor() == in getNextRelated()
1192 PhiUse(RA).Addr->getPredecessor(); in getNextRelated()
1194 return RA.Addr->getNextRef(RR, Cond, true, *this); in getNextRelated()
1228 uint16_t Flags = RA.Addr->getFlags() | NodeAttrs::Shadow; in getNextShadow()
1230 return TA.Addr->getFlags() == Flags; in getNextShadow()
1238 NA.Addr->setFlags(Flags | NodeAttrs::Shadow); in getNextShadow()
1239 IA.Addr->addMemberAfter(Loc.first, NA, *this); in getNextShadow()
1308 SA.Addr->addMember(DA, *this); in buildStmt()
1321 SA.Addr->addMember(DA, *this); in buildStmt()
1359 SA.Addr->addMember(DA, *this); in buildStmt()
1376 SA.Addr->addMember(UA, *this); in buildStmt()
1386 MachineBasicBlock *BB = BA.Addr->getCode(); in recordDefsForDF()
1398 for (Instr IA : BA.Addr->members(*this)) { in recordDefsForDF()
1399 for (Ref RA : IA.Addr->members_if(IsDef, *this)) { in recordDefsForDF()
1400 RegisterRef RR = RA.Addr->getRegRef(*this); in recordDefsForDF()
1434 const MachineBasicBlock *MBB = BA.Addr->getCode(); in buildPhis()
1443 PA.Addr->addMember(newDef(PA, RR, PhiFlags), *this); in buildPhis()
1447 PA.Addr->addMember(newPhiUse(PA, RR, PBA), *this); in buildPhis()
1461 for (Block BA : TheFunc.Addr->members(*this)) { in removeUnusedPhis()
1462 for (auto P : BA.Addr->members_if(IsPhi, *this)) in removeUnusedPhis()
1468 if (M.Addr->getKind() != NodeAttrs::Def) in removeUnusedPhis()
1471 if (DA.Addr->getReachedDef() != 0 || DA.Addr->getReachedUse() != 0) in removeUnusedPhis()
1483 NodeList Refs = PA.Addr->members(*this); in removeUnusedPhis()
1487 if (NodeId RD = RA.Addr->getReachingDef()) { in removeUnusedPhis()
1489 Instr OA = RDA.Addr->getOwner(*this); in removeUnusedPhis()
1493 if (RA.Addr->isDef()) in removeUnusedPhis()
1498 Block BA = PA.Addr->getOwner(*this); in removeUnusedPhis()
1499 BA.Addr->removeMember(PA, *this); in removeUnusedPhis()
1510 RegisterRef RR = TA.Addr->getRegRef(*this); in linkRefUp()
1517 RegisterRef QR = I->Addr->getRegRef(*this); in linkRefUp()
1537 TAP.Addr->setFlags(TAP.Addr->getFlags() | NodeAttrs::Shadow); in linkRefUp()
1542 TAP.Addr->linkToDef(TAP.Id, RDA); in linkRefUp()
1557 for (Ref RA : SA.Addr->members_if(P, *this)) { in linkStmtRefs()
1558 uint16_t Kind = RA.Addr->getKind(); in linkStmtRefs()
1560 RegisterRef RR = RA.Addr->getRegRef(*this); in linkStmtRefs()
1587 return IsDef(RA) && (RA.Addr->getFlags() & NodeAttrs::Clobbering); in linkBlockRefs()
1590 return IsDef(RA) && !(RA.Addr->getFlags() & NodeAttrs::Clobbering); in linkBlockRefs()
1593 assert(BA.Addr && "block node address is needed to create a data-flow link"); in linkBlockRefs()
1597 for (Instr IA : BA.Addr->members(*this)) { in linkBlockRefs()
1600 if (IA.Addr->getKind() == NodeAttrs::Stmt) { in linkBlockRefs()
1608 if (IA.Addr->getKind() == NodeAttrs::Stmt) in linkBlockRefs()
1615 MachineDomTreeNode *N = MDT.getNode(BA.Addr->getCode()); in linkBlockRefs()
1624 if (NA.Addr->getKind() != NodeAttrs::Use) in linkBlockRefs()
1626 assert(NA.Addr->getFlags() & NodeAttrs::PhiRef); in linkBlockRefs()
1627 return PhiUse(NA).Addr->getPredecessor() == BA.Id; in linkBlockRefs()
1631 MachineBasicBlock *MBB = BA.Addr->getCode(); in linkBlockRefs()
1636 for (Instr IA : SBA.Addr->members_if(IsPhi, *this)) { in linkBlockRefs()
1640 Ref RA = IA.Addr->getFirstMember(*this); in linkBlockRefs()
1642 if (EHLiveIns.hasCoverOf(RA.Addr->getRegRef(*this))) in linkBlockRefs()
1646 for (auto U : IA.Addr->members_if(IsUseForBA, *this)) { in linkBlockRefs()
1648 RegisterRef RR = PUA.Addr->getRegRef(*this); in linkBlockRefs()
1660 NodeId RD = UA.Addr->getReachingDef(); in unlinkUseDF()
1661 NodeId Sib = UA.Addr->getSibling(); in unlinkUseDF()
1669 auto TA = addr<UseNode *>(RDA.Addr->getReachedUse()); in unlinkUseDF()
1671 RDA.Addr->setReachedUse(Sib); in unlinkUseDF()
1676 NodeId S = TA.Addr->getSibling(); in unlinkUseDF()
1678 TA.Addr->setSibling(UA.Addr->getSibling()); in unlinkUseDF()
1705 NodeId RD = DA.Addr->getReachingDef(); in unlinkDefDF()
1717 N = RA.Addr->getSibling(); in unlinkDefDF()
1721 NodeList ReachedDefs = getAllNodes(DA.Addr->getReachedDef()); in unlinkDefDF()
1722 NodeList ReachedUses = getAllNodes(DA.Addr->getReachedUse()); in unlinkDefDF()
1726 I.Addr->setSibling(0); in unlinkDefDF()
1728 I.Addr->setSibling(0); in unlinkDefDF()
1731 I.Addr->setReachingDef(RD); in unlinkDefDF()
1733 I.Addr->setReachingDef(RD); in unlinkDefDF()
1735 NodeId Sib = DA.Addr->getSibling(); in unlinkDefDF()
1743 auto TA = addr<DefNode *>(RDA.Addr->getReachedDef()); in unlinkDefDF()
1747 RDA.Addr->setReachedDef(Sib); in unlinkDefDF()
1752 NodeId S = TA.Addr->getSibling(); in unlinkDefDF()
1754 TA.Addr->setSibling(Sib); in unlinkDefDF()
1764 Last.Addr->setSibling(RDA.Addr->getReachedDef()); in unlinkDefDF()
1765 RDA.Addr->setReachedDef(ReachedDefs.front().Id); in unlinkDefDF()
1770 Last.Addr->setSibling(RDA.Addr->getReachedUse()); in unlinkDefDF()
1771 RDA.Addr->setReachedUse(ReachedUses.front().Id); in unlinkDefDF()
1782 for (Ref R : S.Addr->members(*this)) { in hasUntrackedRef()
1783 Ops.push_back(&R.Addr->getOp()); in hasUntrackedRef()
1784 RegisterRef RR = R.Addr->getRegRef(*this); in hasUntrackedRef()
1790 for (const MachineOperand &Op : S.Addr->getCode()->operands()) { in hasUntrackedRef()