<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><blockquote type="cite"><div>On Jul 17, 2014, at 11:41 AM, <a href="mailto:charlessl@free.fr">charlessl@free.fr</a> wrote:</div><br class="Apple-interchange-newline"><div>Hello,<br><br>I made two flattening transformation filters, one use a switch instruction for the dispatcher, and the other an indirectbranch instruction. Both work well but llc is very time consuming in the second case : 10 minutes for a 500 basic block function, while it takes 10 seconds for the switchcase implementation . The instrumentation of llc shows that most of the time is passed in  the Machine Block Frequency Analysis pass<br><br><br>I don't understand why there is so huge difference. Is there a way to speed up llc ?<br></div></blockquote></div><br><div>That’s a bug. Can you try with trunk and provide the LLVM IR test case? You can file a PR it at <a href="http://llvm.org/bugs">llvm.org/bugs</a>. </div><div><br></div><div>There’s been some work on the block frequency algorithm recently, which is shared between LLVM IR and Machine IR, so it would be interesting to get that test case.</div><div><br></div><div>-Andy</div><div><br></div><div><br></div></body></html>