<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, May 6, 2017 at 6:11 PM Takuto Ikuta via Phabricator via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">takuto.ikuta added inline comments.<br>
<br>
<br>
================<br>
Comment at: include/llvm/Analysis/ScalarEvolution.h:785<br>
   const ConstantRange &setRange(const SCEV *S, RangeSignHint Hint,<br>
-                                const ConstantRange &CR) {<br>
+                                ConstantRange CR) {<br>
     DenseMap<const SCEV *, ConstantRange> &Cache =<br>
----------------<br>
Better to change type to `ConstantRange&&`?<br></blockquote><div><br>Generally I find it preferable to pass by value - this allows the caller to pass an rvalue or lvalue and it does the right thing either way. It's rare that the callee should be forcing the caller to do one or the other, I think?<br><br>- Dave<br> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="https://reviews.llvm.org/D32943" rel="noreferrer" target="_blank">https://reviews.llvm.org/D32943</a><br>
<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">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></div>