Lines Matching defs:CPE
100 /// CPE - A constant pool entry that has been placed somewhere, which
511 const CPEntry & CPE = CPEntries[i][j];
512 if (CPE.CPEMI && CPE.CPEMI->getOperand(1).isCPI())
513 AFI->recordCPEClone(i, CPE.CPI);
537 // Create the basic block to hold the CPE's.
564 // identity mapping of CPI's to CPE's.
709 for (CPEntry &CPE : CPEs)
710 if (CPE.CPEMI == CPEMI)
711 return &CPE;
953 CPEntry *CPE = findConstPoolEntry(CPI, CPEMI);
954 assert(CPE && "Cannot find a corresponding CPEntry!");
955 CPE->RefCount++;
1124 /// isWaterInRange - Returns true if a CPE placed after the specified
1127 /// Compute how much the function will grow by inserting a CPE after Water.
1146 // The CPE may be able to hide in the alignment padding before the next
1151 // Compute the padding that would go at the end of the CPE to align the next
1155 // If the CPE is to be inserted before the instruction, that will raise
1157 // in blocks between CPE and the user.
1161 // CPE fits in existing padding.
1179 dbgs() << "User of CPE#" << CPEMI->getOperand(0).getImm()
1184 << format("CPE address=%#x offset=%+d: ", CPEOffset,
1216 CPEntry *CPE = findConstPoolEntry(CPI, CPEMI);
1217 assert(CPE && "Unexpected!");
1218 if (--CPE->RefCount == 0) {
1220 CPE->CPEMI = nullptr;
1234 /// LookForCPEntryInRange - see if the currently referenced CPE is in range;
1235 /// if not, see if an in-range clone of the CPE is in range, and if so,
1244 // Check to see if the CPE is already in-range.
1251 // No. Look for previously created clones of the CPE that are in range.
1254 for (CPEntry &CPE : CPEs) {
1256 if (CPE.CPEMI == CPEMI)
1259 if (CPE.CPEMI == nullptr)
1261 if (isCPEntryInRange(UserMI, UserOffset, CPE.CPEMI, U.getMaxDisp(),
1263 LLVM_DEBUG(dbgs() << "Replacing CPE#" << CPI << " with CPE#" << CPE.CPI
1266 U.CPEMI = CPE.CPEMI;
1270 MO.setIndex(CPE.CPI);
1274 CPE.RefCount++;
1299 /// we can place the CPE referenced from U so it's within range of U's MI.
1303 /// terminates, the CPE location for a particular CPUser is only allowed to
1368 /// CPUsers[CPUserIndex], so create a place to put the CPE. The end of the
1392 // Compute the offset where the CPE will begin.
1397 << format(", expected CPE offset %#x\n", CPEOffset));
1422 // entries are 4 bytes: if instruction I references island CPE, and
1423 // instruction I+1 references CPE', it will not work well to put CPE as far
1424 // forward as possible, since then CPE' cannot immediately follow it (that
1425 // location is 2 bytes farther away from I+1 than CPE was from I) and we'd
1572 // No existing clone of this CPE is within range.
1576 // Look for water where we can place this CPE.
1590 // The new CPE goes before the following block (NewMBB).
1619 // considerably reduces the number of times we have to move the same CPE
1630 // Now that we have an island to add the CPE to, clone the original CPE and
1658 dbgs() << " Moved CPE to #" << ID << " CPI=" << CPI
1697 for (CPEntry &CPE : CPEs) {
1698 if (CPE.RefCount == 0 && CPE.CPEMI) {
1699 removeDeadCPEMI(CPE.CPEMI);
1700 CPE.CPEMI = nullptr;