[llvm-commits] JIT: Emitting a debug location after an instruction
Devang Patel
dpatel at apple.com
Tue Aug 24 10:42:50 PDT 2010
On Aug 23, 2010, at 6:37 PM, Jeffrey Yasskin wrote:
> On Mon, Aug 23, 2010 at 8:10 PM, Devang Patel <devang.patel at gmail.com> wrote:
>>
>>
>> On Mon, Aug 23, 2010 at 4:46 AM, Jeffrey Yasskin <jyasskin at google.com>
>> wrote:
>>>
>>> Devang, why does this argument to processDebugLoc even exist? I don't
>>> see it used anywhere, you didn't update the MachineCodeEmitter.h
>>> comment to mention it, and your commit adding it only says "Update
>>> processDebugLoc() so that it can be used to process debug info before
>>> and after printing an instruction."
>>>
>>
>> Imagine a lexical scope represented by a single machine instruction. You
>> want to emit a label before and after the instruction to record instruction
>> range for the scope.
>
> When you get the call to processDebugLoc(..., false), you don't know
> that the next instruction will have a different DebugLoc or, if it
> does, that the new DebugLoc will be part of a different scope,
DwarfDebug::extractScopeInformation() collects this information in advance during beginFunction().
> so you
> can't actually emit the label in the processDebugLoc(..., false)
> invocation. Can you point me to code that runs when
> BeforePrintingInsn==false so I can see what I'm missing?
AsmPrinter.cpp used to call processDebugLoc() but the code was inlined and simplified in r100339.
-
Devang
More information about the llvm-commits
mailing list