<div style="font-family: arial, helvetica, sans-serif; font-size: 10pt">r167821, thanks!<br><br><div class="gmail_quote">On Tue, Nov 13, 2012 at 3:34 AM, Nick Lewycky <span dir="ltr"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="font-family:arial,helvetica,sans-serif;font-size:10pt">675        if (<a href="http://IFI.TD" target="_blank">IFI.TD</a> != 0) {<div>
<br></div><div>The rest of the file and llvm use "if (<a href="http://IFI.TD" target="_blank">IFI.TD</a>)" style. Please fix.</div>

<div><br></div><div>LGTM!<br><div><br><div class="gmail_quote"><div><div class="h5">On 12 November 2012 01:22, Alexey Samsonov <span dir="ltr"><<a href="mailto:samsonov@google.com" target="_blank">samsonov@google.com</a>></span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><br>
  Kostya is right about merging allocas - stack reuse won't be able to do anything if ASan is enabled.<br>
<div><br>
<br>
================<br>
Comment at: lib/Transforms/Utils/InlineFunction.cpp:676<br>
@@ +675,3 @@<br>
</div><div>+        if (<a href="http://IFI.TD" target="_blank">IFI.TD</a> != 0) {<br>
+          uint64_t SizeValue = AllocaArraySize->getLimitedValue();<br>
+          Type *AllocaType = AI->getAllocatedType();<br>
</div>----------------<br>
<div>Nick Lewycky wrote:<br>
> What if the array size is an i128, and greater than fits in a uint64_t? getLimitedValue() will return -1 (~0ULL). Maybe you want to bail in that case?<br>
</div>Done<br>
<div><br>
================<br>
Comment at: lib/Transforms/Utils/InlineFunction.cpp:678<br>
@@ +677,3 @@<br>
</div><div>+          Type *AllocaType = AI->getAllocatedType();<br>
+          SizeValue *= IFI.TD->getTypeAllocSize(AllocaType);<br>
+          AllocaSize = ConstantInt::get(Type::getInt64Ty(AI->getContext()),<br>
</div>----------------<br>
<div>Nick Lewycky wrote:<br>
> What about overflow here?<br>
><br>
> I don't know of any shared utility to multiply and detect overflow, but I've needed to do the exact same thing before. See umul_ov() at ScalarEvolution.cpp:1826.<br>
><br>
</div>Done<br>
<br>
<br>
<a href="http://llvm-reviews.chandlerc.com/D110" target="_blank">http://llvm-reviews.chandlerc.com/D110</a><br>
</div></div><div class="im"><div><div>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</div></div></div></blockquote></div><br></div></div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Alexey Samsonov, MSK</div><br>
</div>