[StatepointLowering] Don't do two DenseMap lookups; nfci

llvm-svn: 264130
This commit is contained in:
Sanjoy Das 2016-03-23 02:24:15 +00:00
parent 7edbef316b
commit ac53dc7520
1 changed files with 3 additions and 2 deletions

View File

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