diff options
author | Hal Finkel <hfinkel@anl.gov> | 2013-04-01 17:02:06 +0000 |
---|---|---|
committer | Hal Finkel <hfinkel@anl.gov> | 2013-04-01 17:02:06 +0000 |
commit | a1f4290ac94f34173e3561c717390de07dccc646 (patch) | |
tree | d74dca31880d322a64c1cc2124f64cdf9f4e3ab6 /lib/Target/PowerPC/PPCRegisterInfo.cpp | |
parent | dc8efbae143626074fbb2420dde357d16e17bf57 (diff) | |
download | llvm-a1f4290ac94f34173e3561c717390de07dccc646.tar.gz llvm-a1f4290ac94f34173e3561c717390de07dccc646.tar.bz2 llvm-a1f4290ac94f34173e3561c717390de07dccc646.tar.xz |
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
Diffstat (limited to 'lib/Target/PowerPC/PPCRegisterInfo.cpp')
-rw-r--r-- | lib/Target/PowerPC/PPCRegisterInfo.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Target/PowerPC/PPCRegisterInfo.cpp b/lib/Target/PowerPC/PPCRegisterInfo.cpp index c323186876..1d61a3a8ea 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); |