OSDN Git Service

[RS4GC] Pass DenseMap by reference, NFC
authorJoseph Tremoulet <jotrem@microsoft.com>
Fri, 5 Feb 2016 01:42:52 +0000 (01:42 +0000)
committerJoseph Tremoulet <jotrem@microsoft.com>
Fri, 5 Feb 2016 01:42:52 +0000 (01:42 +0000)
Summary:
Passing the rematerialized values map to insertRematerializationStores by
value looks to be a simple oversight; update it to pass by reference.

Reviewers: reames, sanjoy

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D16911

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@259867 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/RewriteStatepointsForGC.cpp

index ef291e7..4c86eeb 100644 (file)
@@ -1617,11 +1617,10 @@ insertRelocationStores(iterator_range<Value::user_iterator> GCRelocs,
 
 // Helper function for the "relocationViaAlloca". Similar to the
 // "insertRelocationStores" but works for rematerialized values.
-static void
-insertRematerializationStores(
-  RematerializedValueMapTy RematerializedValues,
-  DenseMap<Value *, Value *> &AllocaMap,
-  DenseSet<Value *> &VisitedLiveValues) {
+static void insertRematerializationStores(
+    const RematerializedValueMapTy &RematerializedValues,
+    DenseMap<Value *, Value *> &AllocaMap,
+    DenseSet<Value *> &VisitedLiveValues) {
 
   for (auto RematerializedValuePair: RematerializedValues) {
     Instruction *RematerializedValue = RematerializedValuePair.first;