[llvm-commits] [llvm] r128155 - /llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Mar 23 15:49:28 PDT 2011


On Mar 23, 2011, at 3:34 PM, Devang Patel wrote:

> 
> On Mar 23, 2011, at 11:37 AM, Jakob Stoklund Olesen wrote:
> 
>> Author: stoklund
>> Date: Wed Mar 23 13:37:30 2011
>> New Revision: 128155
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=128155&view=rev
>> Log:
>> Don't coalesce identical DBG_VALUE instructions prematurely.
>> 
>> Each of these instructions may have a RegsClobberInsn entry that can't be
>> ignored. Consecutive ranges are coalesced later when DwarfDebug::emitDebugLoc
>> merges entries.
> 
> How about coalescing these instructions before calculating RegsClobberInsns ?

That is possible, but we need to consider the end of basic blocks first.

The range of a DBG_VALUE in a register should end at the first of:

1. The next DBG_VALUE for the variable.
2. After the instruction clobbering the register.
3. The end of the basic block.

If we fix this, the efficient approach should be easy.

/jakob




More information about the llvm-commits mailing list