[llvm-commits] JIT: Emitting a debug location after an instruction

Jeffrey Yasskin jyasskin at google.com
Mon Aug 23 18:37:07 PDT 2010


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, 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?



More information about the llvm-commits mailing list