[StatepointLowering] Don't do two DenseMap lookups; nfci
authorSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 23 Mar 2016 02:24:15 +0000 (02:24 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Wed, 23 Mar 2016 02:24:15 +0000 (02:24 +0000)
llvm-svn: 264130

llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h

index 78cdc39..422b634 100644 (file)
@@ -47,9 +47,10 @@ public:
   /// spilled.  Otherwise, the value has already been spilled and no
   /// further action is required by the caller.
   SDValue getLocation(SDValue Val) {
-    if (!Locations.count(Val))
+    auto I = Locations.find(Val);
+    if (I == Locations.end())
       return SDValue();
-    return Locations[Val];
+    return I->second;
   }
 
   void setLocation(SDValue Val, SDValue Location) {