[LLVMdev] LiveVariables/LiveInterval on huge functions

David Greene dag at cray.com
Mon Apr 14 08:58:15 PDT 2008

On Monday 14 April 2008 03:39, Török Edwin wrote:

> Another question to ask, is why that function became so large in the
> first place [X86DAGToDAGISel::SelectCode(llvm::SDOperand)]
> We have inline limits, don't we?

Some functions are just big.  Consider production versions of the WRF code
from spec 2006.  It is machine-generated and can be HUGE!

> >> I am writing a pass to do this split at llvm IR level. What do you
> >> think?
> >
> > This functionality sounds useful, but I am not sure it's the *right*
> > fix. We should definitely try harder to make codegen more scalable.
> > But it's not a trivial problem.
> Good point. If we have the size-limiting pass, we could become lazy and
> not care of scalability too much. So maybe it is better if I don't write
> it ;)

Another option is regioned compilation.  Generally, I think degrading 
optimization (using a local allocator rather than a global one) is hackish.
Regioning does degrade optimization due to visibility limits, but it doesn't
require special-casing which flavors of optimization are run based on code

I would very much like to see some kind of regioning make its way into llvm
at some point.  I'd do it myself if I had free cycles, which I don't.  :(


More information about the llvm-dev mailing list