From: Hal Finkel Date: Mon, 1 Apr 2013 17:02:06 +0000 (+0000) Subject: Use ImmToIdxMap.count in PPCRegisterInfo X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=a1f4290ac94f34173e3561c717390de07dccc646;p=oota-llvm.git Use ImmToIdxMap.count in PPCRegisterInfo Code improvement suggested by Jakob (in review of r178450). No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@178473 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index c3231868768..1d61a3a8eac 100644 --- a/lib/Target/PowerPC/PPCRegisterInfo.cpp +++ b/lib/Target/PowerPC/PPCRegisterInfo.cpp @@ -528,8 +528,7 @@ PPCRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II, // If the instruction is not present in ImmToIdxMap, then it has no immediate // form (and must be r+r). - bool noImmForm = !MI.isInlineAsm() && - (ImmToIdxMap.find(OpC) == ImmToIdxMap.end()); + bool noImmForm = !MI.isInlineAsm() && !ImmToIdxMap.count(OpC); // Now add the frame object offset to the offset from r1. int Offset = MFI->getObjectOffset(FrameIndex);