[MachineOutliner][NFC] Remove IntegerInstructionMap from InstructionMapper
authorJessica Paquette <jpaquette@apple.com>
Thu, 6 Dec 2018 00:01:51 +0000 (00:01 +0000)
committerJessica Paquette <jpaquette@apple.com>
Thu, 6 Dec 2018 00:01:51 +0000 (00:01 +0000)
Refactoring.

This map was only used when we used a string of integers to output the outlined
sequence. Since it's no longer used for anything, there's no reason to keep it
around.

llvm-svn: 348432

llvm/lib/CodeGen/MachineOutliner.cpp

index 6882a2d..06eaf1e 100644 (file)
@@ -621,10 +621,6 @@ struct InstructionMapper {
   DenseMap<MachineInstr *, unsigned, MachineInstrExpressionTrait>
       InstructionIntegerMap;
 
-  /// Corresponcence from unsigned integers to \p MachineInstrs.
-  /// Inverse of \p InstructionIntegerMap.
-  DenseMap<unsigned, MachineInstr *> IntegerInstructionMap;
-
   /// Correspondence between \p MachineBasicBlocks and target-defined flags.
   DenseMap<MachineBasicBlock *, unsigned> MBBFlagsMap;
 
@@ -644,8 +640,7 @@ struct InstructionMapper {
   /// Maps \p *It to a legal integer.
   ///
   /// Updates \p CanOutlineWithPrevInstr, \p HaveLegalRange, \p InstrListForMBB,
-  /// \p UnsignedVecForMBB, \p InstructionIntegerMap, \p IntegerInstructionMap,
-  /// and \p LegalInstrNumber.
+  /// \p UnsignedVecForMBB, \p InstructionIntegerMap, and \p LegalInstrNumber.
   ///
   /// \returns The integer that \p *It was mapped to.
   unsigned mapToLegalUnsigned(
@@ -678,10 +673,8 @@ struct InstructionMapper {
     unsigned MINumber = ResultIt->second;
 
     // There was an insertion.
-    if (WasInserted) {
+    if (WasInserted)
       LegalInstrNumber++;
-      IntegerInstructionMap.insert(std::make_pair(MINumber, &MI));
-    }
 
     UnsignedVecForMBB.push_back(MINumber);