diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-03-23 02:24:15 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2016-03-23 02:24:15 +0000 |
commit | ac53dc75205ca6f477cf16f2052adb771a217146 (patch) | |
tree | eeaeda6be048a74a3dbf7bca52b9179d61cce3bf /llvm/lib/CodeGen | |
parent | 7edbef316b4efd801ed3f4664b3831106b1a5503 (diff) | |
download | bcm5719-llvm-ac53dc75205ca6f477cf16f2052adb771a217146.tar.gz bcm5719-llvm-ac53dc75205ca6f477cf16f2052adb771a217146.zip |
[StatepointLowering] Don't do two DenseMap lookups; nfci
llvm-svn: 264130
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h index 78cdc39db1f..422b634d917 100644 --- a/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h +++ b/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h @@ -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) { |