[LLVMdev] RFC: Machine Instruction Bundle
Jakob Stoklund Olesen
stoklund at 2pi.dk
Mon Dec 5 14:56:30 PST 2011
On Dec 5, 2011, at 1:50 PM, Jakob Stoklund Olesen wrote:
> I would like to use bundle DBG_VALUE instructions so we can avoid silly code like this:
>
> MachineBasicBlock::iterator InsertPos = mi;
> while (InsertPos != MBB->begin() && llvm::prior(InsertPos)->isDebugValue())
> --InsertPos;
> MachineBasicBlock::iterator From = KillMI;
> MachineBasicBlock::iterator To = llvm::next(From);
> while (llvm::prior(From)->isDebugValue())
> --From;
Thinking about it, this probably wouldn't work for pre-RA passes that can delete code. They could inadvertently delete DBG_VALUE instructions.
/jakob
More information about the llvm-dev
mailing list