Deferred SlotIndex renumbering was a good idea but never used.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127008 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2011-03-04 18:08:32 +00:00
parent 10c5f2dad5
commit beb9a1f9fd

View File

@ -577,8 +577,7 @@ namespace llvm {
/// Insert the given machine instruction into the mapping. Returns the
/// assigned index.
SlotIndex insertMachineInstrInMaps(MachineInstr *mi,
bool *deferredRenumber = 0) {
SlotIndex insertMachineInstrInMaps(MachineInstr *mi) {
assert(mi2iMap.find(mi) == mi2iMap.end() && "Instr already indexed.");
// Numbering DBG_VALUE instructions could cause code generation to be
// affected by debug information.
@ -639,33 +638,12 @@ namespace llvm {
}
// Renumber if we need to.
if (needRenumber) {
if (deferredRenumber == 0)
if (needRenumber)
renumberIndexes();
else
*deferredRenumber = true;
}
return newIndex;
}
/// Add all instructions in the vector to the index list. This method will
/// defer renumbering until all instrs have been added, and should be
/// preferred when adding multiple instrs.
void insertMachineInstrsInMaps(SmallVectorImpl<MachineInstr*> &mis) {
bool renumber = false;
for (SmallVectorImpl<MachineInstr*>::iterator
miItr = mis.begin(), miEnd = mis.end();
miItr != miEnd; ++miItr) {
insertMachineInstrInMaps(*miItr, &renumber);
}
if (renumber)
renumberIndexes();
}
/// Remove the given machine instruction from the mapping.
void removeMachineInstrFromMaps(MachineInstr *mi) {
// remove index -> MachineInstr and