[LLVMdev] LLVM ERROR: ran out of registers during register allocation

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jan 9 10:53:49 PST 2013


On Jan 9, 2013, at 10:46 AM, Borja Ferrer <borja.ferav at gmail.com> wrote:

> Ok, I've found that marking tiny live intervals as not spillable inside VirtRegAuxInfo::CalculateWeightAndHint is not playing nicely with very constrained regclasses, in my case a regclass composed of only one register. 
> As a workaround, instead of marking them as not spillable, I've marked them with a very high spill cost and the regalloc is able to compile the function with good code quality. To avoid doing this for all live intervals of this regclass, I'm filtering only the ones that dont have a small size (returned by li.getSize())
> 
> Does this possible cause make any sense at all? 

Yes, that sounds like a workable fix.

It is important that live ranges coming out of the spiller are unspillable, but the zero length intervals don't need an infinite spill weight - very very large is good enough.

> In either case, in the meantime, I can live with this workaround until an official fix is implemented. I'll fill in a bug report to track this problem so you can take a look at it when appropiate.

Thanks.

/jakob




More information about the llvm-dev mailing list