Skip to content

Regalloc should deal with running out of registers more gracefully #2456

@efriedma-quic

Description

@efriedma-quic
Bugzilla Link 2084
Resolution WORKSFORME
Resolved on Oct 14, 2011 21:26
Version unspecified
OS Linux

Extended Description

Testcase (note that it is impossible to allocate 8 general regs to an asm on x86):

int a() {int a,b,c,d,di,si,bp,sp;; asm volatile ("%0 %1 %2 %3 %4 %5 %6 %7" :
"=r"(a), "=r"(b), "=r"(c), "=r"(d), "=r"(di), "=r"(si), "=r"(bp), "=r"(sp) : );
return a;}

gcc gives the following error:
: In function ‘a’:
:1: error: can't find a register in class ‘GENERAL_REGS’ while
reloading ‘asm’

llc -regalloc=linearscan hangs.

llc -regalloc=local silently puts multiple outputs into the same register.

llc -regalloc=simple gives the following assertion:
llc: /home/eli/llvm/lib/CodeGen/RegAllocSimple.cpp:128: unsigned
int::RegAllocSimple::getFreeReg(unsigned int): Assertion `RI+regIdx !=
RE && "Not enough registers!"' failed.

llc -regalloc=bigblock silently puts multiple outputs into the same register.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaworksformeResolved as "works for me"

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions