[LLVMdev] RegisterScavenging on targets without subregisters

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Feb 26 15:33:02 PST 2010


On Feb 26, 2010, at 10:09 AM, Scott Michel wrote:

> Kalle:
> 
> Your patch is similar to what I'd coded (and am testing, which means a couple of hours before I consider committing). Other than cosmetic changes and changing 'NULL' to '0' (it's an integer list, after all). This patch now causes new problems in the CellSPU backend (more stqd's and lqd's), so I have to investigate those before committing the patch.

I am afraid the assert is correct, you are ignoring the outer "if (!isUsed(Reg))..."

Without sub-registers, the assert would simplify to:

    if (MO.isUse()) {
      assert(isUsed(Reg) && "Using an undefined register!")
    } else {
      assert(MO.isDef());

llc -verify-machineinstrs will probably tell you the same thing.

My guess is that CellSPU is not properly managing kill flags on machine operands. That is a requirement before you can use the register scavenger. It took a while to get ARM to that state.

/jakob





More information about the llvm-dev mailing list