Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-27 Thread Hafiz Abid Qadeer
On 27/07/2021 09:39, Richard Biener wrote: > Yes, that's true - there could be a one-to-many relationship there. But then > I > wonder in which case such lookup in the DIE tree would be the correct thing > to do. If I lookup a variable from the parent then the concrete > instance of that > shou

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-27 Thread Richard Biener via Gcc-patches
On Mon, Jul 26, 2021 at 11:34 PM Hafiz Abid Qadeer wrote: > > On 22/07/2021 12:52, Richard Biener wrote: > > On Thu, Jul 22, 2021 at 1:48 PM Jakub Jelinek wrote: > >> > >> On Thu, Jul 22, 2021 at 01:43:49PM +0200, Richard Biener wrote: > >>> So I think we need to get to an agreement between the d

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-26 Thread Hafiz Abid Qadeer
On 22/07/2021 12:52, Richard Biener wrote: > On Thu, Jul 22, 2021 at 1:48 PM Jakub Jelinek wrote: >> >> On Thu, Jul 22, 2021 at 01:43:49PM +0200, Richard Biener wrote: >>> So I think we need to get to an agreement between the debug info >>> producer and consumer here. >>> Usually the DWARF spec is

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-22 Thread Richard Biener via Gcc-patches
On Thu, Jul 22, 2021 at 1:48 PM Jakub Jelinek wrote: > > On Thu, Jul 22, 2021 at 01:43:49PM +0200, Richard Biener wrote: > > So I think we need to get to an agreement between the debug info > > producer and consumer here. > > Usually the DWARF spec is not of much help here. > > It is something tha

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-22 Thread Jakub Jelinek via Gcc-patches
On Thu, Jul 22, 2021 at 01:43:49PM +0200, Richard Biener wrote: > So I think we need to get to an agreement between the debug info > producer and consumer here. > Usually the DWARF spec is not of much help here. It is something that needs to be discussed for DWARF 6, currently indeed can be solved

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-22 Thread Richard Biener via Gcc-patches
On Wed, Jul 21, 2021 at 7:55 PM Hafiz Abid Qadeer wrote: > > On 19/07/2021 17:41, Richard Biener wrote: > > On July 19, 2021 6:13:40 PM GMT+02:00, Hafiz Abid Qadeer > > wrote: > >> On 19/07/2021 11:45, Richard Biener wrote: > >>> On Fri, Jul 16, 2021 at 10:23 PM Hafiz Abid Qadeer > >>> wrote: >

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-21 Thread Hafiz Abid Qadeer
On 19/07/2021 17:41, Richard Biener wrote: > On July 19, 2021 6:13:40 PM GMT+02:00, Hafiz Abid Qadeer > wrote: >> On 19/07/2021 11:45, Richard Biener wrote: >>> On Fri, Jul 16, 2021 at 10:23 PM Hafiz Abid Qadeer >>> wrote: On 15/07/2021 13:09, Richard Biener wrote: > On Thu, Jul 15

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-19 Thread Richard Biener via Gcc-patches
On July 19, 2021 6:13:40 PM GMT+02:00, Hafiz Abid Qadeer wrote: >On 19/07/2021 11:45, Richard Biener wrote: >> On Fri, Jul 16, 2021 at 10:23 PM Hafiz Abid Qadeer >> wrote: >>> >>> On 15/07/2021 13:09, Richard Biener wrote: On Thu, Jul 15, 2021 at 12:35 PM Hafiz Abid Qadeer wrote:

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-19 Thread Hafiz Abid Qadeer
On 19/07/2021 11:45, Richard Biener wrote: > On Fri, Jul 16, 2021 at 10:23 PM Hafiz Abid Qadeer > wrote: >> >> On 15/07/2021 13:09, Richard Biener wrote: >>> On Thu, Jul 15, 2021 at 12:35 PM Hafiz Abid Qadeer >>> wrote: On 15/07/2021 11:33, Thomas Schwinge wrote: > >> Note that

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-19 Thread Richard Biener via Gcc-patches
On Fri, Jul 16, 2021 at 10:23 PM Hafiz Abid Qadeer wrote: > > On 15/07/2021 13:09, Richard Biener wrote: > > On Thu, Jul 15, 2021 at 12:35 PM Hafiz Abid Qadeer > > wrote: > >> > >> On 15/07/2021 11:33, Thomas Schwinge wrote: > >>> > Note that the "parent" should be abstract but I don't think

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-16 Thread Hafiz Abid Qadeer
parent = lookup_decl_die (ctx); > } >else > /* In some cases the FEs fail to set DECL_CONTEXT properly. > Thanks. This solves the problem. Only the first hunk was required. Second hunk actually causes an ICE when TREE_CODE (ctx) == BLOCK. OK to commit the attached patch?

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-15 Thread Richard Biener via Gcc-patches
On Thu, Jul 15, 2021 at 12:35 PM Hafiz Abid Qadeer wrote: > > On 15/07/2021 11:33, Thomas Schwinge wrote: > > > >> Note that the "parent" should be abstract but I don't think dwarf has a > >> way to express a fully abstract parent of a concrete instance child - or > >> at least how GCC expresses t

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-15 Thread Hafiz Abid Qadeer
On 15/07/2021 11:33, Thomas Schwinge wrote: > >> Note that the "parent" should be abstract but I don't think dwarf has a >> way to express a fully abstract parent of a concrete instance child - or >> at least how GCC expresses this causes consumers to "misinterpret" >> that. I wonder if adding a

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-15 Thread Thomas Schwinge
Hi! On 2021-07-02T09:15:27+0200, Richard Biener via Gcc-patches wrote: > On Thu, Jul 1, 2021 at 5:17 PM Hafiz Abid Qadeer > wrote: >> >> Currently, if we look at the debug information for offload kernel >> regions, it looks something like this: >> >> void foo (void) >> { >> #pragma acc kernels

Re: [PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-02 Thread Richard Biener via Gcc-patches
On Thu, Jul 1, 2021 at 5:17 PM Hafiz Abid Qadeer wrote: > > Currently, if we look at the debug information for offload kernel > regions, it looks something like this: > > void foo (void) > { > #pragma acc kernels > { > > } > } > > DW_TAG_compile_unit > DW_AT_name("") > > DW_TAG_subprog

[PATCH] [DWARF] Fix hierarchy of debug information for offload kernels.

2021-07-01 Thread Hafiz Abid Qadeer
Currently, if we look at the debug information for offload kernel regions, it looks something like this: void foo (void) { #pragma acc kernels { } } DW_TAG_compile_unit DW_AT_name("") DW_TAG_subprogram // notional parent function (foo) with no code range DW_TAG_subprogram // of