[llvm-dev] Scaling to many basic blocks

Daniel Berlin via llvm-dev llvm-dev at lists.llvm.org
Sun Aug 23 08:52:22 PDT 2015

GVN and some other optimizers have really bad behavior on this number
of basic blocks.
Most algorithms are linear, but some are not, and can't be made
linear.  They mostly have cutoffs, but sometimes cutoffs get missed,
etc :)

Otherwise, most algorithms are either linear in the number of
instructions/BB, or can be made linear in the number of
instructions/BBs if they aren't.

On Sat, Aug 22, 2015 at 3:03 PM, Russell Wallace via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> How well does LLVM scale to many basic blocks? Let's say you have a single
> function consisting of a million basic blocks each with a few tens of
> instructions (and assuming the whole thing isn't trivially repetitive so the
> number of simultaneously live variables and whatever is large) and you feed
> that through the optimisers into the backend code generator, will this work
> okay, or will it take a very long time, or will it run into a scenario of
> 'look, all compilers are designed on the assumption that nobody is going to
> write a million lines of code in a single function'? (Not that I'm planning
> to do so by hand either, I'm just thinking about certain scenarios in
> automatic code generation.)
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

More information about the llvm-dev mailing list