[LLVMdev] 2.5 Regalloc Assert

Evan Cheng evan.cheng at apple.com
Mon Dec 7 16:10:15 PST 2009


On Dec 7, 2009, at 3:46 PM, David Greene wrote:

> I am hitting this assert in LLVM 2.5:
> 
> /// spillPhysRegAroundRegDefsUses - Spill the specified physical register
> /// around all defs and uses of the specified interval.
> void LiveIntervals::spillPhysRegAroundRegDefsUses(const LiveInterval &li,
>                                            unsigned PhysReg, VirtRegMap &vrm) 
> {
>  unsigned SpillReg = getRepresentativeReg(PhysReg);
> 
>  for (const unsigned *AS = tri_->getAliasSet(PhysReg); *AS; ++AS)
>    // If there are registers which alias PhysReg, but which are not a
>    // sub-register of the chosen representative super register. Assert
>    // since we can't handle it yet.
>    assert(*AS == SpillReg || !allocatableRegs_[*AS] ||
>           tri_->isSuperRegister(*AS, SpillReg));
> 
> The test also asserts on trunk, though with an error about running out
> of registers.  I am working to file a bug.

The allocator cannot find a virtual register interval to spill. So it's attempting to slice up a physical register interval to free up a register around the uses and defs of interval li.

Looks like it's unable to find a suitable register to do so.

Evan

> 
> I am also going to try 2.6.
> 
> Any hints on what might be going on?
> 
>                               -Dave
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list