[PATCH] D13454: [RS4GC] Don't copy ADT's unneccessarily, NFCI
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 8 16:20:15 PDT 2015
This revision was automatically updated to reflect the committed changes.
Closed by commit rL249776: [RS4GC] Don't copy ADT's unneccessarily, NFCI (authored by sanjoy).
Changed prior to commit:
http://reviews.llvm.org/D13454?vs=36572&id=36901#toc
Repository:
rL LLVM
http://reviews.llvm.org/D13454
Files:
llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Index: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
@@ -1501,17 +1501,17 @@
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;
LiveVec.reserve(LiveSet.size());
BaseVec.reserve(LiveSet.size());
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());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D13454.36901.patch
Type: text/x-patch
Size: 1049 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151008/a8193f83/attachment.bin>
More information about the llvm-commits
mailing list