Skip to content

Commit

Permalink
[RS4GC] Don't copy ADT's unneccessarily, NFCI
Browse files Browse the repository at this point in the history
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
  • Loading branch information
sanjoy committed Oct 8, 2015
1 parent 1f53eb6 commit 1ede536
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Expand Up @@ -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;
Expand All @@ -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());
Expand Down

0 comments on commit 1ede536

Please sign in to comment.