[LLVMdev] FastRegAlloc (wrongly?) marking physregs as free

Carlos Sánchez de La Lama csanchezdll at gmail.com
Fri Sep 7 12:23:10 PDT 2012


Hi all,

I am using the fast register allocator on a partially allocated machine function. I have noticed reserved registers (i.e. liveins) are marked as free after first use (in usePhysReg(..) method). This seems an error to me as a livein might be still used later in the basic block.

As I understand this should check for isKill() before marking it as free, but I see it even *sets* the kill state on that operand. I feel this might be because FastRegAlloc is prepared to work on MI code with no proper def/kill markers.

Is this behaviour intended? Otherwise should not be complex to fix.

BR

Carlos

PD: in case someone wonders, the reason I can not use one of the other register allocators is that my MachineInst level code is heavily preprocessed and is no longer SSA at this point, which prevents running LiveVariables on it.



More information about the llvm-dev mailing list