[llvm] r348432 - [MachineOutliner][NFC] Remove IntegerInstructionMap from InstructionMapper
Jessica Paquette via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 5 16:01:51 PST 2018
Author: paquette
Date: Wed Dec 5 16:01:51 2018
New Revision: 348432
URL: http://llvm.org/viewvc/llvm-project?rev=348432&view=rev
Log:
[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.
Modified:
llvm/trunk/lib/CodeGen/MachineOutliner.cpp
Modified: llvm/trunk/lib/CodeGen/MachineOutliner.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineOutliner.cpp?rev=348432&r1=348431&r2=348432&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineOutliner.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineOutliner.cpp Wed Dec 5 16:01:51 2018
@@ -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);
More information about the llvm-commits
mailing list