[LLVMdev] problem trying to write an LLVM register-allocation pass

Jakob Stoklund Olesen stoklund at 2pi.dk
Fri Nov 16 09:23:02 PST 2012


On Nov 15, 2012, at 8:04 PM, Lang Hames <lhames at gmail.com> wrote:

> Jakob pointed out to me that the Gcra.cpp allocator doesn't record basic-block live-ins, which are used by the verifier to check correctness.
> 
> You can record which variables are live into a basic block with MachineBasicBlock::addLiveIn(unsigned physReg). I don't know the verifier well, but if it's using other built in infrastructure for register allocation then it may not be a good fit for your allocator.

To clarify, the live-in lists are not there for the verifier's benefit. They are used by various post-RA passes that care about register liveness, so they are required to be correct.

/jakob




More information about the llvm-dev mailing list