Lines Matching defs:VR

215     unsigned operator[](unsigned VR) const {
216 const_iterator F = find(VR);
273 const BitTracker::RegisterCell &lookup(unsigned VR) {
274 unsigned RInd = Register::virtReg2Index(VR);
280 CP = CVect[RInd] = &BT.lookup(VR);
389 void insert(unsigned VR);
390 void remove(unsigned VR);
442 void OrderedRegisterList::insert(unsigned VR) {
443 iterator L = llvm::lower_bound(Seq, VR, Ord);
445 Seq.push_back(VR);
447 Seq.insert(L, VR);
455 void OrderedRegisterList::remove(unsigned VR) {
456 iterator L = llvm::lower_bound(Seq, VR, Ord);
531 bool isConstant(unsigned VR) const;
532 bool isSmallConstant(unsigned VR) const;
535 bool findSelfReference(unsigned VR) const;
536 bool findNonSelfReference(unsigned VR) const;
545 bool findRecordInsertForms(unsigned VR, OrderedRegisterList &AVs);
547 void findRemovableRegisters(unsigned VR, IFRecord IF,
552 void pruneCoveredSets(unsigned VR);
553 void pruneUsesTooFar(unsigned VR, const UnsignedMap &RPO, PairMapType &M);
554 void pruneRegCopies(unsigned VR);
639 bool HexagonGenInsert::isConstant(unsigned VR) const {
640 const BitTracker::RegisterCell &RC = CMS->lookup(VR);
651 bool HexagonGenInsert::isSmallConstant(unsigned VR) const {
652 const BitTracker::RegisterCell &RC = CMS->lookup(VR);
696 bool HexagonGenInsert::findSelfReference(unsigned VR) const {
697 const BitTracker::RegisterCell &RC = CMS->lookup(VR);
700 if (V.Type == BitTracker::BitValue::Ref && V.RefI.Reg == VR)
706 bool HexagonGenInsert::findNonSelfReference(unsigned VR) const {
707 BitTracker::RegisterCell RC = CMS->lookup(VR);
710 if (V.Type == BitTracker::BitValue::Ref && V.RefI.Reg != VR)
784 bool HexagonGenInsert::findRecordInsertForms(unsigned VR,
787 dbgs() << __func__ << ": " << printReg(VR, HRI)
796 const BitTracker::RegisterCell &RC = CMS->lookup(VR);
802 // being the list of pairs (R,S), where R's prefix matches VR at S.
820 // Compare against VR's bits starting at S, which emulates rotation
821 // of VR by S.
822 RegisterCellBitCompareSel RCB(VR, S+L, L, BVO, *CMS);
823 iterator NewB = std::lower_bound(B, E, VR, RCB);
824 iterator NewE = std::upper_bound(NewB, E, VR, RCB);
826 // the longest prefix matching VR at position S (their prefixes
827 // differ from VR at S+L). If L>0, record this information for later
846 // rest of VR from position S. There is no need to further advance S.
852 dbgs() << "Prefixes matching register " << printReg(VR, HRI) << "\n";
878 // where VR and SrcR differ.
899 if (!isValidInsertForm(VR, SrcR, InsR, L, S))
902 dbgs() << printReg(VR, HRI) << " = insert(" << printReg(SrcR, HRI)
907 IFMap[VR].push_back(RR);
940 for (unsigned VR = InsDefs.find_first(); VR; VR = InsDefs.find_next(VR)) {
943 if (!DoConst && isConstant(VR))
945 // If VR's cell contains a reference to VR, then VR cannot be defined
946 // via "insert". If VR is a constant that can be generated in a single
949 if (findSelfReference(VR) || isSmallConstant(VR))
952 findRecordInsertForms(VR, AVs);
961 for (unsigned VR = InsDefs.find_first(); VR; VR = InsDefs.find_next(VR))
962 AVs.insert(VR);
971 for (unsigned VR = BlockDefs.find_first(); VR; VR = BlockDefs.find_next(VR))
972 AVs.remove(VR);
975 void HexagonGenInsert::findRemovableRegisters(unsigned VR, IFRecord IF,
977 // For a given register VR and a insert form, find the registers that are
978 // used by the current definition of VR, and which would no longer be
979 // needed for it after the definition of VR is replaced with the insert
984 Regs[S].insert(VR);
1018 // The register VR is added to the list as a side-effect of the algorithm,
1021 // IF, and obviously VR (or its replacement) will not become dead by apply-
1023 RMs.remove(VR);
1047 void HexagonGenInsert::pruneCoveredSets(unsigned VR) {
1048 IFMapType::iterator F = IFMap.find(VR);
1052 // First, examine the IF candidates for register VR whose removable-regis-
1056 // tion of VR is constant-extended.
1059 MachineInstr *DefVR = MRI->getVRegDef(VR);
1069 // The definition of VR is not constant-extended, or there is a candidate
1076 // The definition of VR is constant-extended, and all candidates have
1109 // contained in another IF candidate for VR. For example, given these
1132 void HexagonGenInsert::pruneUsesTooFar(unsigned VR, const UnsignedMap &RPO,
1134 IFMapType::iterator F = IFMap.find(VR);
1138 const MachineInstr *DefV = MRI->getVRegDef(VR);
1154 void HexagonGenInsert::pruneRegCopies(unsigned VR) {
1155 IFMapType::iterator F = IFMap.find(VR);
1383 unsigned VR = I.first;
1384 const TargetRegisterClass *RC = MRI->getRegClass(VR);
1386 RegMap[VR] = NewVR;
1390 // gisters: SrcR and InsR for a given VR may be among other registers that
1522 unsigned VR = I.first, Pos = I.second;
1523 dbgs() << printReg(VR, HRI) << " -> " << Pos << "\n";