From c65e904be8243209ec23b56354c273ef05ac78b6 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Sat, 20 Feb 2016 03:56:41 +0000 Subject: [PATCH] MachineCopyPropagation: Introduce Reg2MIMap typedef; NFC llvm-svn: 261408 --- llvm/lib/CodeGen/MachineCopyPropagation.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/llvm/lib/CodeGen/MachineCopyPropagation.cpp b/llvm/lib/CodeGen/MachineCopyPropagation.cpp index d2af95c..79240b3 100644 --- a/llvm/lib/CodeGen/MachineCopyPropagation.cpp +++ b/llvm/lib/CodeGen/MachineCopyPropagation.cpp @@ -48,6 +48,7 @@ namespace { private: typedef SmallVector DestList; typedef DenseMap SourceMap; + typedef DenseMap Reg2MIMap; void SourceNoLongerAvailable(unsigned Reg); void CopyPropagateBlock(MachineBasicBlock &MBB); @@ -55,9 +56,9 @@ namespace { /// Candidates for deletion. SmallSetVector MaybeDeadCopies; /// Def -> available copies map. - DenseMap AvailCopyMap; + Reg2MIMap AvailCopyMap; /// Def -> copies map. - DenseMap CopyMap; + Reg2MIMap CopyMap; /// Src -> Def map SourceMap SrcMap; bool Changed; @@ -176,7 +177,7 @@ void MachineCopyPropagation::CopyPropagateBlock(MachineBasicBlock &MBB) { // If Src is defined by a previous copy, the previous copy cannot be // eliminated. for (MCRegAliasIterator AI(Src, TRI, true); AI.isValid(); ++AI) { - CI = CopyMap.find(*AI); + Reg2MIMap::iterator CI = CopyMap.find(*AI); if (CI != CopyMap.end()) { DEBUG(dbgs() << "MCP: Copy is no longer dead: "; CI->second->dump()); MaybeDeadCopies.remove(CI->second); @@ -242,7 +243,7 @@ void MachineCopyPropagation::CopyPropagateBlock(MachineBasicBlock &MBB) { // If 'Reg' is defined by a copy, the copy is no longer a candidate // for elimination. for (MCRegAliasIterator AI(Reg, TRI, true); AI.isValid(); ++AI) { - DenseMap::iterator CI = CopyMap.find(*AI); + Reg2MIMap::iterator CI = CopyMap.find(*AI); if (CI != CopyMap.end()) { DEBUG(dbgs() << "MCP: Copy is used - not dead: "; CI->second->dump()); MaybeDeadCopies.remove(CI->second); -- 2.7.4