<div dir="ltr">Test case?</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 22, 2015 at 8:48 PM, Chen Li 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">chenli created this revision.<br>
chenli added reviewers: reames, chandlerc.<br>
chenli added a subscriber: llvm-commits.<br>
<br>
Implicit null checks act like unconditional branches, and their inlining cost should be free.<br>
<br>
<a href="http://reviews.llvm.org/D13088" rel="noreferrer" target="_blank">http://reviews.llvm.org/D13088</a><br>
<br>
Files:<br>
  lib/Analysis/InlineCost.cpp<br>
<br>
Index: lib/Analysis/InlineCost.cpp<br>
===================================================================<br>
--- lib/Analysis/InlineCost.cpp<br>
+++ lib/Analysis/InlineCost.cpp<br>
@@ -602,6 +602,11 @@<br>
     disableSROA(CostIt);<br>
   }<br>
<br>
+  // Implicit null checks act as unconditional branches, and<br>
+  // they should be free. See the comments in visitBranchInst.<br>
+  if (I.getMetadata(LLVMContext::MD_make_implicit))<br>
+    return true;<br>
+<br>
   return false;<br>
 }<br>
<br>
<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>
<br></blockquote></div><br></div>