[LLVMdev] debug stoppoint nodes with -fast option
dalej at apple.com
Wed Apr 8 09:40:59 PDT 2009
On Apr 7, 2009, at 9:52 PMPDT, vasudev wrote:
> Thanks for the info regarding DebugLoc field. Another related
> that I have is regarding debug info for local variables. With -fast
> option, ISD::DECLARE nodes are created in DAG for debug info of local
> variables. I am planning to custom handle these nodes, get the
> info from llvm.dbg.variable global address and emit it in ISel. But
> without -fast option ISD::DECLARE nodes are not created. How can i
> access the debug info for local variables in that case? Is it
> directly somewhere in AsmPrinter like the debug info for global
Not yet. The Declare nodes interfere with optimizations, as do the
Stoppoint nodes: they count as an extra Use, which affects many
optimizations that are looking for a single Use (of the alloca node,
or whatever). Rather than try to hunt these all down, the plan is to
reimplement declarations in a way that isn't represented as a Use.
This is in the early stages yet and I can't give you a date when it
will work, sorry.
> Dale Johannesen wrote:
>> On Apr 5, 2009, at 11:54 PMPDT, vasudev wrote:
>>> I need to generate line number debug information for PIC16 target.
>>> PIC16 does not support dwarf format. It supports coff format. So I
>>> to custom handle the STOPPOINT nodes. Without -fast option the
>>> nodes are not created in dag because of the below check in
>>> if (Fast)
>>> If I give -fast option then the Fast flag is true, but the dag
>>> contain STOPPOINT nodes.
>> Right. Currently, the way we tell whether optimization was requested
>> at the command line level is to look at -fast; -O0 == -fast.
>> The stoppoint nodes enforce an ordering of loads and stores
>> corresponding to the original source, which means that putting them
>> without -fast would lead to codegen (scheduling) differences
>> between -
>> O and -O -g. We don't want that.
>> Instead, the debug info is transferred at this point from stoppoint
>> nodes to the DebugLoc field in each MachineInstr node. You should
>> probably use that.
>> (The current state of debug info with -O is that we think -g never
>> affects codegen; violations of that should be reported as bugs. The
>> quality of the debug info has not been worked on much and is
>>> If I have simple loads and stores in source
>>> code, the dag doesn't contain them too. Why are these nodes not
>> I don't know. Something to do with your target, they appear for me.
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
More information about the llvm-dev