From ca3ed964f1aacc9727a39cc22ae7150d791bcf69 Mon Sep 17 00:00:00 2001 From: Jessica Paquette Date: Thu, 6 Dec 2018 00:01:51 +0000 Subject: [PATCH] [MachineOutliner][NFC] Remove IntegerInstructionMap from InstructionMapper 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 | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/llvm/lib/CodeGen/MachineOutliner.cpp b/llvm/lib/CodeGen/MachineOutliner.cpp index 6882a2d..06eaf1e 100644 --- a/llvm/lib/CodeGen/MachineOutliner.cpp +++ b/llvm/lib/CodeGen/MachineOutliner.cpp @@ -621,10 +621,6 @@ struct InstructionMapper { DenseMap InstructionIntegerMap; - /// Corresponcence from unsigned integers to \p MachineInstrs. - /// Inverse of \p InstructionIntegerMap. - DenseMap IntegerInstructionMap; - /// Correspondence between \p MachineBasicBlocks and target-defined flags. DenseMap 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); -- 2.7.4