<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 26, 2016 at 5:43 PM, Jun Bum Lim 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">junbuml created this revision.<br>
junbuml added reviewers: mcrosier, manmanren, majnemer, hfinkel, davidxl, eraman.<br>
junbuml added a subscriber: llvm-commits.<br>
Herald added a subscriber: mcrosier.<br>
<br>
If the call site or the normal destination of the invoke is an unreachable-terminated block, there is little point in inlining the call site unless there is literally zero cost. Unlike my previous change (D15289), this change specifically handle the call sites followed by unreachable in the same basic block for call or in the normal destination for the invoke. This change could be a reasonable first step to conservatively inline call sites leading to an unreachable-terminated block while BFI / BPI is not yet available in inliner.<br></blockquote><div><br></div><div>Not quite sure I follow - wouldn't it be possible that the function is noreturn? So the entry is hot but the exit is cold/dead? Or is this optimization change a heuristic based on the observation that this situation (hot entry, dead exit) doesn't happen very often in practice?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
<a href="http://reviews.llvm.org/D16616" rel="noreferrer" target="_blank">http://reviews.llvm.org/D16616</a><br>
<br>
Files:<br>
  lib/Analysis/InlineCost.cpp<br>
  test/Transforms/Inline/inline_unreachable.ll<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></div>