[PATCH] D11635: DebugInfo: Emit DW_AT_address_class for non-0 address space

David Blaikie dblaikie at gmail.com
Thu Jul 30 10:54:32 PDT 2015


On Thu, Jul 30, 2015 at 10:43 AM, Matt Arsenault <arsenm2 at gmail.com> wrote:

>
> On Jul 30, 2015, at 10:39 AM, David Blaikie <dblaikie at gmail.com> wrote:
>
> Why would that be a problem for this idea? The function argument would
> have a pointer type with an associated non-zero address space & the debug
> info would point to that & we could consult the pointer type to see the
> address space, no?
>
>
> I thought you were saying if the address was constant, i.e. the non-zero
> address space is only on a global variable and we could read it from that
>

Sorry, what I was trying to say was speculating how my suggestion might
break down/not work. If we ever encoded a pointer variable as just a
constant (ConstantInt, etc) we might drop the address space, only to
reconstitute it later with an inttoptr/addrspacecast, etc. That would mean
that we couldn't rely on the llvm::Value that the debug info variable
description pointed to would have an llvm::Type of PointerType with the
required address space on it.

If we could rely on the llvm::Value that the debug info variable
description points to always having a PointerType with the desired address
space, then we could just get it from there & wouldn't need to add more
info to the debug info variable description.

- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150730/35fc39ce/attachment.html>


More information about the llvm-commits mailing list