[llvm-commits] [llvm] r133350 - /llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Benjamin Kramer
benny.kra at googlemail.com
Sat Jun 18 06:53:47 PDT 2011
Author: d0k
Date: Sat Jun 18 08:53:47 2011
New Revision: 133350
URL: http://llvm.org/viewvc/llvm-project?rev=133350&view=rev
Log:
Simplify code. No change in functionality.
Modified:
llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
Modified: llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp?rev=133350&r1=133349&r2=133350&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/TwoAddressInstructionPass.cpp Sat Jun 18 08:53:47 2011
@@ -1095,12 +1095,7 @@
"two address instruction invalid");
unsigned regB = mi->getOperand(SrcIdx).getReg();
- TiedOperandMap::iterator OI = TiedOperands.find(regB);
- if (OI == TiedOperands.end()) {
- SmallVector<std::pair<unsigned, unsigned>, 4> TiedPair;
- OI = TiedOperands.insert(std::make_pair(regB, TiedPair)).first;
- }
- OI->second.push_back(std::make_pair(SrcIdx, DstIdx));
+ TiedOperands[regB].push_back(std::make_pair(SrcIdx, DstIdx));
}
// Now iterate over the information collected above.
More information about the llvm-commits
mailing list