similar to: RFC: Unify debug and optimized variable locations with llvm.dbg.addr [was: DW_OP_LLVM_memory]

Displaying 20 results from an estimated 10000 matches similar to: "RFC: Unify debug and optimized variable locations with llvm.dbg.addr [was: DW_OP_LLVM_memory]"

2017 Sep 05
7
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
Debug info today handles two cases reasonably well: 1. At -O0, dbg.declare does a good job describing variables that live at some known stack offset 2. With optimizations, variables promoted to SSA can be described with dbg.value This leaves behind a large hole in our optimized debug info: variables that cannot be promoted, typically because they are address-taken. This is
2017 Sep 06
2
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
It's worth remembering that there are two syntactically similar but semantically different kinds of "expression" in DWARF. A DWARF expression computes a value; if the available value is a pointer, you add DW_OP_deref to express the pointed-to value. A DWARF location expression computes a location, and adds various operators to express locations that a (value) expression cannot, such
2017 Sep 05
2
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
Hi Reid, Thanks for taking this on, I'm very pleased to see improvements related to debug info for optimized code. (You can cc me on code reviews, although I'm sure a lot of the patches will be in areas I am not very familiar with.) While I have a really good handle on the DWARF standard, and have done a bunch of work with the type stuff, my understanding of IR mechanics is pretty naïve,
2017 Sep 06
4
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
On Wed, Sep 6, 2017 at 10:01 AM, David Blaikie <dblaikie at gmail.com> wrote: > On Tue, Sep 5, 2017 at 1:00 PM Reid Kleckner via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> LLVM SSA values obviously do not have an address that we can take and >> they don’t live in registers, so neither the default memory location model >> nor DW_OP_regN make sense
2017 Sep 07
2
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
On Wed, Sep 6, 2017 at 5:01 PM, David Blaikie <dblaikie at gmail.com> wrote: > On Wed, Sep 6, 2017 at 2:01 PM Reid Kleckner <rnk at google.com> wrote: > >> On Wed, Sep 6, 2017 at 10:01 AM, David Blaikie <dblaikie at gmail.com> >> wrote: >> >>> I guess you described this already, but talking it through for >>> myself/maybe others will
2017 Sep 07
3
Unify debug and optimized variable locations with llvm.dbg.addr [was: DW_OP_LLVM_memory]
On Thu, Sep 7, 2017 at 11:11 AM, Robinson, Paul <paul.robinson at sony.com> wrote: > Different intrinsics sounds like a good solution to me. J > > > > So what happens with the case where a variable is registerized but later > we decide to spill it? Presumably we'd have a dbg.addr to point to the > spill slot. In past compilers I've used, spill slots were
2020 Aug 25
3
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
Currently there is a series of patches undergoing review[0] that seek to enable the use of multiple IR/MIR values when describing a source variable's location. The current plan for the MIR is to add a new instruction, DBG_VALUE_LIST, that supports this functionality by having a variable number of operands. It may be better however to simply replace the existing DBG_VALUE behaviour entirely
2020 Sep 16
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
> That makes sense, and I think for "direct" values in your definition it is true that all direct values are r-values. > Why do we need DW_OP_LLVM_direct when we already have DW_OP_LLVM_stack_value? Can you give an example of something that is definitely not a stack value, but direct? The difference in definition is the intention: DW_OP_LLVM_direct means "we'd like this
2017 Sep 11
2
Unify debug and optimized variable locations with llvm.dbg.addr [was: DW_OP_LLVM_memory]
On Fri, Sep 8, 2017 at 10:32 AM, Adrian Prantl <aprantl at apple.com> wrote: > > On Sep 7, 2017, at 2:18 PM, Reid Kleckner <rnk at google.com> wrote: > > > > On Thu, Sep 7, 2017 at 11:11 AM, Robinson, Paul <paul.robinson at sony.com> > wrote: > >> Different intrinsics sounds like a good solution to me. J > >> > >> So what happens
2020 Oct 07
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
> I don't see how this is a meaningful distinction in LLVM IR. In LLVM IR we only have SSA values. An SSA value could be an alloca, or a gep into an alloca, or spilled onto the stack at the MIR level, in which case the dbg.value should get lowered into a memory location (if it isn't explicitly a DW_OP_stack_value). I think the distinction is still important; even at the IR level, if we
2020 Nov 11
1
[RFC] A value-tracking LiveDebugValues implementation
Hi Xiang, On Wed, Nov 11, 2020 at 1:59 AM Zhang, Xiang1 <xiang1.zhang at intel.com> wrote: > Jeremy wrote: > > ... The value %0 is live up to and including the ADD64ri but not past it, meaning LLVM today will drop the DBG_VALUE ... > > Just a little puzzle about the " drop the DBG_VALUE ", maybe I didn't get your key point, >
2020 Jul 21
2
DW_OP_implicit_pointer design/implementation in general
Realized I didn't document the original reviews that motivated this thread: A stack of reviews, split off from here: https://reviews.llvm.org/D69787 Alok's posted a new patch (with smaller patches split off from the monolithic one) here: https://reviews.llvm.org/D84112 I haven't had a chance to page in all the old context, nor look at the new ones in detail yet. But probably worth
2017 Sep 07
2
RFC: Introduce DW_OP_LLVM_memory to describe variables in memory with dbg.value
On Thu, Sep 7, 2017 at 9:46 AM, David Blaikie <dblaikie at gmail.com> wrote: > Feels to me like bugs rather than inconsistencies (I'd think of an > inconsistency as "we do X over here intentionally and Y over here > intentionally but they're in contradiction to one another") > The DBG_VALUE MachineInstr actually already has a way to indicate that the computed
2020 Sep 04
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
> Yeah, because that decision can only be made much later in LLVM in AsmPrinter/DwarfExpression.cpp. > In DWARF, DW_OP_reg(x) is a register l-value, all others can either be l-values or r-values depending on whether there is a DW_OP_stack_value/DW_OP_implicit* at the end. Yes, it might not be clear but that's what I'm trying to say. Out of the non-empty DWARF locations, register and
2020 Sep 02
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
> I'm not sure this will work as stated here. Indirectness is (mostly) orthogonal to DW_OP_stack_value. DW_OP_stack_value denotes that we reconstructed the value of the variable, but it doesn't exist in the program ("The DW_OP_stack_value operation specifies that the object does not exist in memory but its value is nonetheless known"), for example, a constant value. I think we
2020 Oct 06
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
> I can see how that could potentially be useful. I'm not sure how often we could practically make use of a situation like this, but I understand your motivation. Indeed, I don't expect us to cancel out DWARF expressions like that very often. Although that edge case is likely to be very rare, the _direct operator itself will appear very frequently, as it would be used for every
2020 Mar 30
3
Question WRT llvm.dbg.value
Hello Everyone, I have general question WRT llvm.dbg.value intrinsic function semantics. Under what circumstances should a frontend choose to emit(at -O0(No optimization)) llvm.dbg.value for a local variable. I saw some debuginfo code in flang(older one), sort of it choose to emit *llvm.dbg.value* for *every load operation* happening on a *local variable*. And as noted below in IR snippet it
2020 Jul 08
2
Defining the DIExpression operator DW_OP_LLVM_arg
On Wed, Jul 8, 2020 at 9:29 AM Adrian Prantl via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > > > > On Jul 8, 2020, at 5:21 AM, Tozer, Stephen <stephen.tozer at sony.com> wrote: > > > >> To summarize my understanding: Neither of these operators is strictly necessary, since the same effect can be achieved by implicitly pushing all operands of a
2020 Sep 15
2
[Debuginfo] Changing llvm.dbg.value and DBG_VALUE to support multiple location operands
Hi Adrian & Stephen, One thought here: But — not all memory locations are l-values. If we have a DWARF location list for variable "x" which points to a memory address for the first n instructions and the switches to a constant for the remainder of the scope, the memory address is not guaranteed to be an l-value, because writing the the memory address cannot affect the later part of
2020 Jul 08
2
Defining the DIExpression operator DW_OP_LLVM_arg
On Wed, Jul 8, 2020 at 9:48 AM Adrian Prantl <aprantl at apple.com> wrote: > > > > > On Jul 8, 2020, at 9:33 AM, David Blaikie <dblaikie at gmail.com> wrote: > > > > On Wed, Jul 8, 2020 at 9:29 AM Adrian Prantl via llvm-dev > > <llvm-dev at lists.llvm.org> wrote: > >> > >> > >> > >>> On Jul 8, 2020, at 5:21