<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Nov 18, 2016 at 2:28 PM, Jun Bum Lim <span dir="ltr"><<a href="mailto:junbuml@codeaurora.org" target="_blank">junbuml@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">junbuml added a comment.<br>
<span class=""><br>
> Do you know how often BPI/BFI is actually needed? In other words, among all functions compiled, how many of them reach to the point that BFI is needed? If you have some stats that will be great. If the data shows not often -- then BPI/BFI may need to be computed in a lazy way.<br>
<br>
</span>I'm quite sure that BPI/BFI would be rarely used as we specifically look for empty blocks which has unique predecessor terminated by SwitchInst or IndirectBrInst. We can compute BPI/BFI in isMergingEmptyBlockProfitable(<wbr>) and then cache it only for the current function.  Please let me know if you see any down side of it?<br></blockquote><div><br></div><div>No -- minimizing compile time cost is something good to shoot for.</div><div><br></div><div>David</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="https://reviews.llvm.org/D22696" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D22696</a><br>
<br>
<br>
<br>
</blockquote></div><br></div></div>