Lines Matching refs:CPEMI

186       MachineInstr *CPEMI;  member
194 : MI(mi), CPEMI(cpemi), MaxDisp(maxdisp), NegOk(neg), IsSoImm(soimm), in CPUser()
196 HighWaterMark = CPEMI->getParent(); in CPUser()
214 MachineInstr *CPEMI; member
218 : CPEMI(cpemi), CPI(cpi), RefCount(rc) {} in CPEntry()
290 CPEntry *findConstPoolEntry(unsigned CPI, const MachineInstr *CPEMI);
291 unsigned getCPELogAlign(const MachineInstr *CPEMI);
297 bool decrementCPEReferenceCount(unsigned CPI, MachineInstr* CPEMI);
298 unsigned getCombinedIndex(const MachineInstr *CPEMI);
305 void removeDeadCPEMI(MachineInstr *CPEMI);
308 MachineInstr *CPEMI, unsigned Disp, bool NegOk,
360 if (isCPEntryInRange(U.MI, UserOffset, U.CPEMI, U.getMaxDisp()+2, U.NegOk, in verify()
505 if (CPE.CPEMI && CPE.CPEMI->getOperand(1).isCPI()) in runOnMachineFunction()
566 MachineInstr *CPEMI = in doInitialConstPlacement() local
569 CPEMIs.push_back(CPEMI); in doInitialConstPlacement()
575 InsPoint[a] = CPEMI; in doInitialConstPlacement()
578 CPEntries.emplace_back(1, CPEntry(CPEMI, i)); in doInitialConstPlacement()
631 MachineInstr *CPEMI = BuildMI(*JumpTableBB, JumpTableBB->begin(), in doInitialJumpTablePlacement() local
636 CPEMIs.push_back(CPEMI); in doInitialJumpTablePlacement()
637 CPEntries.emplace_back(1, CPEntry(CPEMI, JTI)); in doInitialJumpTablePlacement()
673 const MachineInstr *CPEMI) { in findConstPoolEntry() argument
678 if (CPEs[i].CPEMI == CPEMI) in findConstPoolEntry()
686 unsigned ARMConstantIslands::getCPELogAlign(const MachineInstr *CPEMI) { in getCPELogAlign() argument
687 switch (CPEMI->getOpcode()) { in getCPELogAlign()
701 unsigned CPI = getCombinedIndex(CPEMI); in getCPELogAlign()
882 MachineInstr *CPEMI = CPEMIs[CPI]; in initializeFunctionInfo() local
884 CPUsers.push_back(CPUser(I, CPEMI, MaxOffs, NegOk, IsSoImm)); in initializeFunctionInfo()
887 CPEntry *CPE = findConstPoolEntry(CPI, CPEMI); in initializeFunctionInfo()
1098 unsigned CPELogAlign = getCPELogAlign(U.CPEMI); in isWaterInRange()
1109 unsigned Size = U.CPEMI->getOperand(2).getImm(); in isWaterInRange()
1136 MachineInstr *CPEMI, unsigned MaxDisp, in isCPEntryInRange() argument
1138 unsigned CPEOffset = getOffsetOf(CPEMI); in isCPEntryInRange()
1144 dbgs() << "User of CPE#" << CPEMI->getOperand(0).getImm() in isCPEntryInRange()
1202 MachineInstr *CPEMI) { in decrementCPEReferenceCount() argument
1204 CPEntry *CPE = findConstPoolEntry(CPI, CPEMI); in decrementCPEReferenceCount()
1207 removeDeadCPEMI(CPEMI); in decrementCPEReferenceCount()
1208 CPE->CPEMI = nullptr; in decrementCPEReferenceCount()
1215 unsigned ARMConstantIslands::getCombinedIndex(const MachineInstr *CPEMI) { in getCombinedIndex() argument
1216 if (CPEMI->getOperand(1).isCPI()) in getCombinedIndex()
1217 return CPEMI->getOperand(1).getIndex(); in getCombinedIndex()
1219 return JumpTableEntryIndices[CPEMI->getOperand(1).getIndex()]; in getCombinedIndex()
1231 MachineInstr *CPEMI = U.CPEMI; in findInRangeCPEntry() local
1234 if (isCPEntryInRange(UserMI, UserOffset, CPEMI, U.getMaxDisp(), U.NegOk, in findInRangeCPEntry()
1241 unsigned CPI = getCombinedIndex(CPEMI); in findInRangeCPEntry()
1245 if (CPEs[i].CPEMI == CPEMI) in findInRangeCPEntry()
1248 if (CPEs[i].CPEMI == nullptr) in findInRangeCPEntry()
1250 if (isCPEntryInRange(UserMI, UserOffset, CPEs[i].CPEMI, U.getMaxDisp(), in findInRangeCPEntry()
1255 U.CPEMI = CPEs[i].CPEMI; in findInRangeCPEntry()
1266 return decrementCPEReferenceCount(CPI, CPEMI) ? 2 : 1; in findInRangeCPEntry()
1314 BBInfo[UserBB->getNumber()].postOffset(getCPELogAlign(U.CPEMI)); in findAvailableWater()
1366 MachineInstr *CPEMI = U.CPEMI; in createNewWater() local
1367 unsigned CPELogAlign = getCPELogAlign(CPEMI); in createNewWater()
1452 CPEMI->getOperand(2).getImm(); in createNewWater()
1473 EndInsertOffset += U.CPEMI->getOperand(2).getImm(); in createNewWater()
1507 MachineInstr *CPEMI = U.CPEMI; in handleConstantPoolUser() local
1508 unsigned CPI = getCombinedIndex(CPEMI); in handleConstantPoolUser()
1509 unsigned Size = CPEMI->getOperand(2).getImm(); in handleConstantPoolUser()
1574 U.CPEMI = BuildMI(NewIsland, DebugLoc(), CPEMI->getDesc()) in handleConstantPoolUser()
1575 .addImm(ID).addOperand(CPEMI->getOperand(1)).addImm(Size); in handleConstantPoolUser()
1576 CPEntries[CPI].push_back(CPEntry(U.CPEMI, ID, 1)); in handleConstantPoolUser()
1580 decrementCPEReferenceCount(CPI, CPEMI); in handleConstantPoolUser()
1583 NewIsland->setAlignment(getCPELogAlign(U.CPEMI)); in handleConstantPoolUser()
1604 void ARMConstantIslands::removeDeadCPEMI(MachineInstr *CPEMI) { in removeDeadCPEMI() argument
1605 MachineBasicBlock *CPEBB = CPEMI->getParent(); in removeDeadCPEMI()
1606 unsigned Size = CPEMI->getOperand(2).getImm(); in removeDeadCPEMI()
1607 CPEMI->eraseFromParent(); in removeDeadCPEMI()
1634 if (CPEs[j].RefCount == 0 && CPEs[j].CPEMI) { in removeUnusedCPEntries()
1635 removeDeadCPEMI(CPEs[j].CPEMI); in removeUnusedCPEntries()
1636 CPEs[j].CPEMI = nullptr; in removeUnusedCPEntries()
1874 if (isCPEntryInRange(U.MI, UserOffset, U.CPEMI, MaxOffs, false, true)) { in optimizeThumb2Instructions()
2093 static bool jumpTableFollowsTB(MachineInstr *JTMI, MachineInstr *CPEMI) { in jumpTableFollowsTB() argument
2099 &*MBB->begin() == CPEMI; in jumpTableFollowsTB()
2156 if (!jumpTableFollowsTB(MI, User.CPEMI) && !PreservedBaseReg) in optimizeThumb2JumpTables()
2160 MachineInstr *CPEMI = User.CPEMI; in optimizeThumb2JumpTables() local
2169 .addImm(CPEMI->getOperand(0).getImm()); in optimizeThumb2JumpTables()
2173 CPEMI->setDesc(TII->get(JTOpc)); in optimizeThumb2JumpTables()
2175 if (jumpTableFollowsTB(MI, User.CPEMI)) { in optimizeThumb2JumpTables()
2196 return E.CPEMI == User.CPEMI; in optimizeThumb2JumpTables()
2199 CPUsers.emplace_back(CPUser(NewJTMI, User.CPEMI, 4, false, false)); in optimizeThumb2JumpTables()