summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2015-10-08 23:18:22 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2015-10-08 23:18:22 +0000
commit1ede5367ba23446bb01c9006dcbd6978d71f7f82 (patch)
tree412a94cb55fb64632c821fcd577f30f9e06b655a /llvm/lib
parent1f53eb6fbd71b509cda21de93e6b17a4179b8547 (diff)
downloadbcm5719-llvm-1ede5367ba23446bb01c9006dcbd6978d71f7f82.tar.gz
bcm5719-llvm-1ede5367ba23446bb01c9006dcbd6978d71f7f82.zip
[RS4GC] Don't copy ADT's unneccessarily, NFCI
Summary: Use `const auto &` instead of `auto` in `makeStatepointExplicit`. Reviewers: reames, swaroop.sridhar Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D13454 llvm-svn: 249776
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
index 53cf3564015..ed097003e31 100644
--- a/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ b/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -1501,8 +1501,8 @@ static void StabilizeOrder(SmallVectorImpl<Value *> &BaseVec,
static void
makeStatepointExplicit(DominatorTree &DT, const CallSite &CS,
PartiallyConstructedSafepointRecord &Result) {
- auto LiveSet = Result.LiveSet;
- auto PointerToBase = Result.PointerToBase;
+ const auto &LiveSet = Result.LiveSet;
+ const auto &PointerToBase = Result.PointerToBase;
// Convert to vector for efficient cross referencing.
SmallVector<Value *, 64> BaseVec, LiveVec;
@@ -1511,7 +1511,7 @@ makeStatepointExplicit(DominatorTree &DT, const CallSite &CS,
for (Value *L : LiveSet) {
LiveVec.push_back(L);
assert(PointerToBase.count(L));
- Value *Base = PointerToBase[L];
+ Value *Base = PointerToBase.find(L)->second;
BaseVec.push_back(Base);
}
assert(LiveVec.size() == BaseVec.size());
OpenPOWER on IntegriCloud