<div dir="ltr">Should that be const ref? If it should be non-const ref, presumably there's some bug that you just fixed & perhaps we could have a test for that? (if side effect changes should be visible in the caller)</div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Feb 4, 2016 at 5:42 PM, Joseph Tremoulet via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: josepht<br>
Date: Thu Feb  4 19:42:52 2016<br>
New Revision: 259867<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=259867&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=259867&view=rev</a><br>
Log:<br>
[RS4GC] Pass DenseMap by reference, NFC<br>
<br>
Summary:<br>
Passing the rematerialized values map to insertRematerializationStores by<br>
value looks to be a simple oversight; update it to pass by reference.<br>
<br>
<br>
Reviewers: reames, sanjoy<br>
<br>
Subscribers: llvm-commits<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D16911" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16911</a><br>
<br>
Modified:<br>
    llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp<br>
<br>
Modified: llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=259867&r1=259866&r2=259867&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp?rev=259867&r1=259866&r2=259867&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp Thu Feb  4 19:42:52 2016<br>
@@ -1617,11 +1617,10 @@ insertRelocationStores(iterator_range<Va<br>
<br>
 // Helper function for the "relocationViaAlloca". Similar to the<br>
 // "insertRelocationStores" but works for rematerialized values.<br>
-static void<br>
-insertRematerializationStores(<br>
-  RematerializedValueMapTy RematerializedValues,<br>
-  DenseMap<Value *, Value *> &AllocaMap,<br>
-  DenseSet<Value *> &VisitedLiveValues) {<br>
+static void insertRematerializationStores(<br>
+    const RematerializedValueMapTy &RematerializedValues,<br>
+    DenseMap<Value *, Value *> &AllocaMap,<br>
+    DenseSet<Value *> &VisitedLiveValues) {<br>
<br>
   for (auto RematerializedValuePair: RematerializedValues) {<br>
     Instruction *RematerializedValue = RematerializedValuePair.first;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>