diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-04 18:08:32 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-03-04 18:08:32 +0000 |
commit | beb9a1f9fd1b660809929bf136eb2d897638d4c1 (patch) | |
tree | 56c217c8ec092cb2b2953068924d63e527ed043b | |
parent | 10c5f2dad5e11e2502ebc0b9e9ea56e449f42d16 (diff) | |
download | external_llvm-beb9a1f9fd1b660809929bf136eb2d897638d4c1.zip external_llvm-beb9a1f9fd1b660809929bf136eb2d897638d4c1.tar.gz external_llvm-beb9a1f9fd1b660809929bf136eb2d897638d4c1.tar.bz2 |
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
-rw-r--r-- | include/llvm/CodeGen/SlotIndexes.h | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/include/llvm/CodeGen/SlotIndexes.h b/include/llvm/CodeGen/SlotIndexes.h index ad36ff4..420dd01 100644 --- a/include/llvm/CodeGen/SlotIndexes.h +++ b/include/llvm/CodeGen/SlotIndexes.h @@ -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) - renumberIndexes(); - else - *deferredRenumber = true; - } + if (needRenumber) + renumberIndexes(); 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 |