[llvm-commits] [llvm] r137250 - in /llvm/trunk: lib/CodeGen/LiveDebugVariables.cpp test/CodeGen/ARM/debug-info-sreg2.ll test/CodeGen/X86/dbg-value-isel.ll

Devang Patel dpatel at apple.com
Wed Aug 10 14:50:47 PDT 2011


On Aug 10, 2011, at 2:47 PM, Jakob Stoklund Olesen wrote:

> 
> On Aug 10, 2011, at 2:42 PM, Devang Patel wrote:
> 
>> 
>> On Aug 10, 2011, at 2:33 PM, Jakob Stoklund Olesen wrote:
>> 
>>> 
>>> On Aug 10, 2011, at 2:25 PM, Devang Patel wrote:
>>> 
>>>> void UserValue::extendDef(SlotIndex Idx, unsigned LocNo,
>>>>                        LiveInterval *LI, const VNInfo *VNI,
>>>>                        SmallVectorImpl<SlotIndex> *Kills,
>>>> -                          LiveIntervals &LIS, MachineDominatorTree &MDT) {
>>>> +                          LiveIntervals &LIS, MachineDominatorTree &MDT,
>>>> +                          LexicalScopes &LS) {
>>>> SmallVector<SlotIndex, 16> Todo;
>>>> Todo.push_back(Idx);
>>>> -
>>>> +  SmallPtrSet<const MachineBasicBlock *, 4> LBlocks;
>>>> +  LS.getMachineBasicBlocks(dl, LBlocks);
>>> 
>>> Hi Devang,
>>> 
>>> I think the DebugLoc in a UserValue is bogus and should be removed.
>>> 
>>> Shouldn't the lexical scope be derived from the MDNode instead?
>> 
>> DebugLoc has inline info which is required to properly determine lexical scopes in case of inlining. DebugLoc is more compressed form, and it provides utilities to convert to/from MDNode.
> 
> But UserValue's DebugLoc comes from the first DBG_VALUE instruction to mention that MDNode. That's not very robust.

> I thought we were going to stop setting DebugLocs on DBG_VALUE instructions? You moved the inline location into the MDNode, right?

oh.. that MDNode, in other words DIVariable, Yes, that's more robust now. I'll tackle it next.
-
Devang




More information about the llvm-commits mailing list