Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Registers exhausted with lots of pointer use #1

Closed
@dylanmckay

Description

@dylanmckay

This bug description is what I can piece together from CalcSpillWeights.cpp and this email.

When compiling functions for AVR that contain much pointer use, the register allocator fail with the error ran out of registers. A hack is currently in place so that any function marked unspillable that has a lot of pointer access will be forced into being spillable.

The error message is as follows:

LLVM ERROR: ran out of registers during register allocation

Here is the code comment where the hack is implemented (in lib/CodeGen/CalcSpillWeights.cpp): It was commited in r247.

// HACK HACK: This is a workaround until PR14879 gets fixed!
// This code allows us to compile memory intensive functions when only the Z
// register is available, otherwise we get the "Ran out of registers ..."
// assertion inside the regalloc.
// Here we avoid marking as not spillable live intervals that use the
// PTRDISPREGS class and have a size greater than 8, smaller ones
// get filtered out, generating better code.

An old llvmdev mailing list thread discussing the hack can be found here, and continued here.

An LLVM bug is filed for the issue - see LLVM BugZilla bug 14879.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions