<div dir="ltr"><div>I don't. Unfortunately, I must compile the code I am given.<br><br></div><div>I do actually have mitigations in some places that break up long basic blocks, but they are not universally applicable.  Interestingly, 14000 doesn't seem that big to me.  One of my mitigations was put in to break up blocks with 2 million instructions.<br><br></div><div>If you generate a SystemVerilog UVM register model for a large SOC and it has 70K registers in it, then your build() method will have 2 million instructions in it.  That is the type of code I am given.<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, May 29, 2018 at 8:15 AM, Bruce Hoult <span dir="ltr"><<a href="mailto:brucehoult@sifive.com" target="_blank">brucehoult@sifive.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">What percentage of performance advantage do you expect to get from having a basic block with 14000 instructions, rather than breaking it up a bit?</div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Wed, May 30, 2018 at 12:02 AM, David Jones via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</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"><div dir="ltr"><div><div><div><div>My back-end code generator uses LLVM 5.0.1 to optimize and generate code for x86_64.<br><br></div>If I run it on a given sample of IR, it takes almost 5 minutes to generate object code.  95%+ of this time is spent in MergeConsecutiveStores().  (One function has a basic block with 14000 instructions, which is a pathological case for MergeConsecutiveStores.)<br><br></div>If, instead, I dump out the LLVM IR, and manually run both opt and llc on it with -O2, the whole affair takes only 2 minutes.<br><br></div>I am using a dynamically linked LLVM library.  I have verified using GDB that both my code generator and llc are invoking the shared library (i.e. the exact same code) so I would not expect to see a 2.5x performance difference.<br><br></div>What could explain this?<br><br></div>
<br></div></div>______________________________<wbr>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div>