Re: [patch 10/10] debug-early merge: compiler proper

2015-06-02 Thread Richard Biener
On Mon, Jun 1, 2015 at 7:42 PM, Aldy Hernandez al...@redhat.com wrote: On 06/01/2015 01:00 PM, Richard Biener wrote: On June 1, 2015 5:42:57 PM GMT+02:00, Aldy Hernandez al...@redhat.com wrote: On 06/01/2015 04:04 AM, Richard Biener wrote: On Mon, Jun 1, 2015 at 10:03 AM, Richard Biener

Re: [patch 10/10] debug-early merge: compiler proper

2015-06-02 Thread Aldy Hernandez
On 06/02/2015 04:11 AM, Richard Biener wrote: I suppose we can change things this way as a followup (as it needs some work) Ok. I cleaned things up using variably_modified_type_p() as you did, instead of the INTEGER_CST nonsense. Attached are the latest dwarf2out.c changes against

Re: [patch 10/10] debug-early merge: compiler proper

2015-06-01 Thread Richard Biener
On Sun, May 31, 2015 at 10:38 PM, Jason Merrill ja...@redhat.com wrote: On 05/30/2015 08:52 PM, Aldy Hernandez wrote: On 05/29/2015 03:33 PM, Jason Merrill wrote: On 05/29/2015 03:26 PM, Richard Biener wrote: ISTR I had to mark the gimple reg used for the bound as non-DECL_IGNORED for the

Re: [patch 10/10] debug-early merge: compiler proper

2015-06-01 Thread Richard Biener
On Mon, Jun 1, 2015 at 10:03 AM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 31, 2015 at 10:38 PM, Jason Merrill ja...@redhat.com wrote: On 05/30/2015 08:52 PM, Aldy Hernandez wrote: On 05/29/2015 03:33 PM, Jason Merrill wrote: On 05/29/2015 03:26 PM, Richard Biener wrote:

Re: [patch 10/10] debug-early merge: compiler proper

2015-06-01 Thread Richard Biener
On June 1, 2015 5:42:57 PM GMT+02:00, Aldy Hernandez al...@redhat.com wrote: On 06/01/2015 04:04 AM, Richard Biener wrote: On Mon, Jun 1, 2015 at 10:03 AM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 31, 2015 at 10:38 PM, Jason Merrill ja...@redhat.com wrote: On 05/30/2015

Re: [patch 10/10] debug-early merge: compiler proper

2015-06-01 Thread Aldy Hernandez
On 06/01/2015 04:04 AM, Richard Biener wrote: On Mon, Jun 1, 2015 at 10:03 AM, Richard Biener richard.guent...@gmail.com wrote: On Sun, May 31, 2015 at 10:38 PM, Jason Merrill ja...@redhat.com wrote: On 05/30/2015 08:52 PM, Aldy Hernandez wrote: On 05/29/2015 03:33 PM, Jason Merrill wrote:

Re: [patch 10/10] debug-early merge: compiler proper

2015-06-01 Thread Aldy Hernandez
On 06/01/2015 01:00 PM, Richard Biener wrote: On June 1, 2015 5:42:57 PM GMT+02:00, Aldy Hernandez al...@redhat.com wrote: On 06/01/2015 04:04 AM, Richard Biener wrote: On Mon, Jun 1, 2015 at 10:03 AM, Richard Biener We still have the problem that function locals in dwarf2out are seen in

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-31 Thread Jason Merrill
On 05/30/2015 08:52 PM, Aldy Hernandez wrote: On 05/29/2015 03:33 PM, Jason Merrill wrote: On 05/29/2015 03:26 PM, Richard Biener wrote: ISTR I had to mark the gimple reg used for the bound as non-DECL_IGNORED for the LTO stuff. Let's go with that, then. Well, I did play around with that

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-30 Thread Aldy Hernandez
On 05/29/2015 03:33 PM, Jason Merrill wrote: On 05/29/2015 03:26 PM, Richard Biener wrote: ISTR I had to mark the gimple reg used for the bound as non-DECL_IGNORED for the LTO stuff. Let's go with that, then. Well, I did play around with that option originally, but temporaries do not end

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-29 Thread Richard Biener
On Thu, May 28, 2015 at 10:35 PM, Jason Merrill ja...@redhat.com wrote: On 05/28/2015 02:53 PM, Aldy Hernandez wrote: On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-29 Thread Aldy Hernandez
On 05/28/2015 04:35 PM, Jason Merrill wrote: On 05/28/2015 02:53 PM, Aldy Hernandez wrote: On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) +

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-29 Thread Jason Merrill
On 05/29/2015 03:26 PM, Richard Biener wrote: ISTR I had to mark the gimple reg used for the bound as non-DECL_IGNORED for the LTO stuff. Let's go with that, then. Jason

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-29 Thread Richard Biener
On May 29, 2015 8:42:50 PM GMT+02:00, Aldy Hernandez al...@redhat.com wrote: On 05/28/2015 04:35 PM, Jason Merrill wrote: On 05/28/2015 02:53 PM, Aldy Hernandez wrote: On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-29 Thread Jason Merrill
On 05/29/2015 02:42 PM, Aldy Hernandez wrote: unsigned int i=555; int main() { unsigned int array[i]; ... } For the VLA, I'd like to check if we have an array type with a missing DW_AT_{upper,lower}_bound late in the game, and fill it in. During early dwarf we only have an uninitialized

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jan Hubicka
On 05/28/2015 04:42 PM, Jan Hubicka wrote: As for optimization changing type representation, I suppose one case is when function with varray type gets inlined and the array bound happens to be a different expression afterwards. We produce a new copy of the original type with different bounds

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
On 05/28/2015 02:53 PM, Aldy Hernandez wrote: On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) + !early_dwarf_dumping) +{ + tree member;

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
On 05/28/2015 04:42 PM, Jan Hubicka wrote: As for optimization changing type representation, I suppose one case is when function with varray type gets inlined and the array bound happens to be a different expression afterwards. We produce a new copy of the original type with different bounds

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jan Hubicka
On 05/28/2015 02:53 PM, Aldy Hernandez wrote: On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) + !early_dwarf_dumping) +{ + tree

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Aldy Hernandez
On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + determine anscestry later. */ ancestry Fixed. +static bool early_dwarf_dumping; Sorry for the late bikeshedding, but dumping suddently strikes me as odd, since there is no output as with

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Aldy Hernandez
On 05/27/2015 08:39 AM, Jason Merrill wrote: On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + /* Fill in the size of variable-length fields in late dwarf. */ + if (TREE_ASM_WRITTEN (type) + !early_dwarf_dumping) +{ + tree member; + for (member = TYPE_FIELDS (type);

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-28 Thread Jason Merrill
Looks good. Jason

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-27 Thread Richard Biener
On Fri, May 22, 2015 at 4:12 PM, Aldy Hernandez al...@redhat.com wrote: On 05/22/2015 07:23 AM, Richard Biener wrote: On Wed, May 20, 2015 at 5:50 PM, Aldy Hernandez al...@redhat.com wrote: On 05/18/2015 06:56 AM, Richard Biener wrote: diff --git a/gcc/tree-core.h b/gcc/tree-core.h index

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-27 Thread Jason Merrill
On 05/20/2015 11:50 AM, Aldy Hernandez wrote: + determine anscestry later. */ ancestry +static bool early_dwarf_dumping; Sorry for the late bikeshedding, but dumping suddently strikes me as odd, since there is no output as with other dumping in the compiler. Can we change that to

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-22 Thread Eric Botcazou
FWIW, Ada is filled with these temporaries and/or types that should really be ignored, and are currently causing grief. It's a little hard to believe that types created in a front-end should be marked ignored. Either they are used by some objects and thus can be needed in the debug info, or

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-22 Thread Richard Biener
On Wed, May 20, 2015 at 5:50 PM, Aldy Hernandez al...@redhat.com wrote: On 05/18/2015 06:56 AM, Richard Biener wrote: BTW, thanks for the review. On Fri, May 8, 2015 at 2:40 AM, Aldy Hernandez al...@redhat.com wrote: As seen on TV. +/* FIRST_TIME is set to TRUE for the first time we are

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-22 Thread Richard Biener
On Wed, May 20, 2015 at 11:45 PM, Aldy Hernandez al...@redhat.com wrote: On 05/20/2015 05:01 PM, Jan Hubicka wrote: commit 8824b5ecba26cef065e47b34609c72677c3c36fc Author: Aldy Hernandez al...@redhat.com Date: Wed May 20 16:31:14 2015 -0400 Set DECL_IGNORED_P on temporary arrays

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-22 Thread Aldy Hernandez
On 05/22/2015 07:23 AM, Richard Biener wrote: On Wed, May 20, 2015 at 5:50 PM, Aldy Hernandez al...@redhat.com wrote: On 05/18/2015 06:56 AM, Richard Biener wrote: diff --git a/gcc/tree-core.h b/gcc/tree-core.h index ad1bb23..2a9f417 100644 --- a/gcc/tree-core.h +++ b/gcc/tree-core.h @@

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-22 Thread Aldy Hernandez
On 05/22/2015 07:26 AM, Richard Biener wrote: On Wed, May 20, 2015 at 11:45 PM, Aldy Hernandez al...@redhat.com wrote: On 05/20/2015 05:01 PM, Jan Hubicka wrote: commit 8824b5ecba26cef065e47b34609c72677c3c36fc Author: Aldy Hernandez al...@redhat.com Date: Wed May 20 16:31:14 2015 -0400

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-20 Thread Jan Hubicka
commit 8824b5ecba26cef065e47b34609c72677c3c36fc Author: Aldy Hernandez al...@redhat.com Date: Wed May 20 16:31:14 2015 -0400 Set DECL_IGNORED_P on temporary arrays created in the switch conversion pass. diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-20 Thread Aldy Hernandez
How does this version, which has been committed to the debug-early branch, look? One more thing Richi. I merged trunk into the branch once again, and Go broke. I tracked it down to a temporary that was being created late that IMO shouldn't even get debug info. The fact that it gets

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-20 Thread Aldy Hernandez
On 05/20/2015 05:01 PM, Jan Hubicka wrote: commit 8824b5ecba26cef065e47b34609c72677c3c36fc Author: Aldy Hernandez al...@redhat.com Date: Wed May 20 16:31:14 2015 -0400 Set DECL_IGNORED_P on temporary arrays created in the switch conversion pass. diff --git

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-18 Thread Jan Hubicka
On Fri, May 8, 2015 at 2:40 AM, Aldy Hernandez al...@redhat.com wrote: As seen on TV. +/* FIRST_TIME is set to TRUE for the first time we are called for a + translation unit from finalize_compilation_unit() or false + otherwise. */ + static void -analyze_functions (void)

Re: [patch 10/10] debug-early merge: compiler proper

2015-05-18 Thread Richard Biener
On Fri, May 8, 2015 at 2:40 AM, Aldy Hernandez al...@redhat.com wrote: As seen on TV. +/* FIRST_TIME is set to TRUE for the first time we are called for a + translation unit from finalize_compilation_unit() or false + otherwise. */ + static void -analyze_functions (void) +analyze_functions

[patch 10/10] debug-early merge: compiler proper

2015-05-07 Thread Aldy Hernandez
As seen on TV. gcc/ * dwarf2out.c: Remove deferred_locations*. (dwarf2_debug_hooks): Add early_finish hook. Remove global_decl hook. Add early_global_decl and late_global_decl hook. Add dumped_early bit to die_struct. New global early_dwarf_dumping. (struct limbo_die_struct): Document