<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D">Isn’t it const ref below?<o:p></o:p></span></p>
<p class="MsoNormal">+    const RematerializedValueMapTy &RematerializedValues,<o:p></o:p></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D"><o:p> </o:p></span></a></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri",sans-serif"> David Blaikie [mailto:dblaikie@gmail.com]
<br>
<b>Sent:</b> Thursday, February 4, 2016 9:55 PM<br>
<b>To:</b> Joseph Tremoulet <jotrem@microsoft.com><br>
<b>Cc:</b> llvm-commits <llvm-commits@lists.llvm.org><br>
<b>Subject:</b> Re: [llvm] r259867 - [RS4GC] Pass DenseMap by reference, NFC<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">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)<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Thu, Feb 4, 2016 at 5:42 PM, Joseph Tremoulet via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal">Author: josepht<br>
Date: Thu Feb  4 19:42:52 2016<br>
New Revision: 259867<br>
<br>
URL: <a href="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fllvm.org%2fviewvc%2fllvm-project%3frev%3d259867%26view%3drev&data=01%7c01%7cjotrem%40microsoft.com%7c0a64842462db4e391f5208d32dd7c825%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=ahyE9YKH1k3vfRJZLIksjOneJSzOxa7ZX%2ftN5jzgxb4%3d" 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="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2freviews.llvm.org%2fD16911&data=01%7c01%7cjotrem%40microsoft.com%7c0a64842462db4e391f5208d32dd7c825%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=XQ3bGs7nr8glF8UQI2sHpvizCyiOrNJztbuvrQ2S8b0%3d" 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="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2fllvm.org%2fviewvc%2fllvm-project%2fllvm%2ftrunk%2flib%2fTransforms%2fScalar%2fRewriteStatepointsForGC.cpp%3frev%3d259867%26r1%3d259866%26r2%3d259867%26view%3ddiff&data=01%7c01%7cjotrem%40microsoft.com%7c0a64842462db4e391f5208d32dd7c825%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=0W0h0n6v%2flqy8huCOKtzYiD88nC6YjEfD0H6rQ%2fgl7c%3d" 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="https://na01.safelinks.protection.outlook.com/?url=http%3a%2f%2flists.llvm.org%2fcgi-bin%2fmailman%2flistinfo%2fllvm-commits&data=01%7c01%7cjotrem%40microsoft.com%7c0a64842462db4e391f5208d32dd7c825%7c72f988bf86f141af91ab2d7cd011db47%7c1&sdata=Ita2nfUjPgm%2beyi%2ba%2fbhMF78r%2fXQmW0fTeM8b3pB0Nk%3d" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</body>
</html>