[LLVMdev] Default behavior of DeadMachineInstructionElim deletes all instructions

Villmow, Micah Micah.Villmow at amd.com
Mon May 3 10:21:47 PDT 2010


Jakob, 
 Here is my implementation of getAllocatableSet:
BitVector 
AMDILRegisterInfo::getAllocatableSet(const MachineFunction& MF,
		const TargetRegisterClass *RC = NULL) const
{
	BitVector Allocatable(getNumRegs());
	Allocatable.clear();
	return Allocatable;
}


Micah

-----Original Message-----
From: Jakob Stoklund Olesen [mailto:stoklund at 2pi.dk] 
Sent: Monday, May 03, 2010 9:52 AM
To: Villmow, Micah
Cc: llvmdev at cs.uiuc.edu
Subject: Re: [LLVMdev] Default behavior of DeadMachineInstructionElim deletes all instructions


On Apr 29, 2010, at 2:06 PM, Villmow, Micah wrote:

> Ping. Anyone have any idea on how to fix this?

Does your getAllocatableSet() return a BitVector that is at least getNumRegs() bits long? Otherwise this doesn't work:

  BitVector NonAllocatableRegs = TRI->getAllocatableSet(MF);
  NonAllocatableRegs.flip();








More information about the llvm-dev mailing list