[patch] Rewrite check_global_declarations() generically

2015-04-28 Thread Aldy Hernandez
entire branch real soon :). Thanks. Aldy commit 9429021847345e95ac8fec2b84affebdf5183a64 Author: Aldy Hernandez Date: Tue Apr 28 17:34:48 2015 -0700 Adjust global declaration warnings to work in a language agnostic way and use the symbol table infrastructure. diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 688c055.

[debug-early] gut out check_die

2015-04-28 Thread Aldy Hernandez
7431e22452 Author: Aldy Hernandez Date: Tue Apr 28 18:22:05 2015 -0700 Remove most sanity checks from check_die(). These were temporarily there during the branch work and were taking too long to execute while never finding anything of interest. diff --git a/gcc/dwarf2out.c b/gcc/d

[debug-early] adjust tests for new defined/used warnings

2015-04-29 Thread Aldy Hernandez
This fixes the remaining regressions. With the new design for check_global_declaration*(), we diagnose many more warnings and so far, no false positives. Committed to branch. commit 7aeb35184b29f3c67470b63fcf107b54f075ffd7 Author: Aldy Hernandez Date: Wed Apr 29 09:43:48 2015 -0700

[debug-early] fix -fdump-go-spec

2015-04-29 Thread Aldy Hernandez
ommitted to branch. Aldy commit 040d95e2436d7fa1ef75761dfe50b7481726373d Author: Aldy Hernandez Date: Wed Apr 29 17:37:21 2015 -0700 Fix -fdump-go-spec. diff --git a/gcc/godump.c b/gcc/godump.c index 94d0c8b..5de34db 100644 --- a/gcc/godump.c +++ b/gcc/godump.c @@ -517,6 +517,7 @@ go_functi

Re: [patch] Rewrite check_global_declarations() generically

2015-04-29 Thread Aldy Hernandez
On 04/29/2015 12:33 PM, Jason Merrill wrote: On 04/28/2015 09:01 PM, Aldy Hernandez wrote: The approach looks good to me. - analyze_functions (); + analyze_functions (true); In the C++ front end at least we comment anonymous boolean arguments, i.e. analyze_functions (/*first_time*/true

[debug-early] document new world and fix non-dwarf debugging backends

2015-04-30 Thread Aldy Hernandez
stsuite. Yay. Aldy commit bb51ad83395536cc6efc151b6fe3f1fa0616d7a4 Author: Aldy Hernandez Date: Thu Apr 30 10:10:27 2015 -0700 Adjust non dwarf debugging backends for the debug-early infrastructure. diff --git a/gcc/dbxout.c b/gcc/dbxout.c index 0c9a327..9f555c3 100644 --- a/gcc/dbxout.

[debug-early] revert removal of deferred_asm_names

2015-04-30 Thread Aldy Hernandez
ch. Regressions down to 2. Aldy commit c6cb62c9e8fbd60d800ed3aa709a50b77fedf9c8 Author: Aldy Hernandez Date: Thu Apr 30 15:52:12 2015 -0700 Revert removal of deferred_asm_name and move its clearing to dwarf2out_early_finish. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index f512ec7..c51cea1 100644 ---

[debug-early] fix problem with template parameter packs

2015-05-04 Thread Aldy Hernandez
The code handling parameter DIEs needed a little tweaking for variable length template arguments. I've relaxed the original assert, but this may require tweaking at branch review time-- hopefully later this week. Committing to branch. Aldy p.s. Richi/Jason: Winter is coming. Down to 1 GCC r

Re: [debug-early] fix problem with template parameter packs

2015-05-05 Thread Aldy Hernandez
On 05/05/2015 02:08 PM, Jason Merrill wrote: On 05/04/2015 09:29 PM, Aldy Hernandez wrote: The code handling parameter DIEs needed a little tweaking for variable length template arguments. I've relaxed the original assert, but this may require tweaking at branch review time-- hopefully

[debug-early] call debug_hooks->late_global_decl for optimized away symbols

2015-05-06 Thread Aldy Hernandez
branch. Both x86-64 Linux and ppc64 Linux are ready to go. Once AIX is happy, I will post the full patch for review. Aldy commit e817b2d5c219c7b1bc6918de01c39ea66b01cf15 Author: Aldy Hernandez Date: Wed May 6 17:22:16 2015 -0700 Call late_global_decl on DECLs that are about to be rem

Re: [debug-early] call debug_hooks->late_global_decl for optimized away symbols

2015-05-07 Thread Aldy Hernandez
-unknown-linux-gnu Committing to branch. Aldy p.s. I bet even David is happy now :). commit 6e0a19c9c9d955a398eb779f45f8381ad7d332ae Author: Aldy Hernandez Date: Thu May 7 08:10:23 2015 -0700 Revert debug-early changes to non dwarf backends. diff --git a/gcc/dbxout.c b/gcc/dbxout.c index

[patch 0/10] debug-early merge

2015-05-07 Thread Aldy Hernandez
Hi folks. I have divided the patches into 10 pieces. The patches are interdependent and cannot be applied independently. I am merely dividing them up to aid the relevant reviewers. As I've mentioned elsewhere, the patchset as posted has been bootstrapped and GCC tested on: x86_64

[patch 1/10] debug-early merge: Ada front-end

2015-05-07 Thread Aldy Hernandez
gcc/ada/ * gcc-interface/gigi.h (note_types_used_by_globals): New prototype. * gcc-interface/misc.c (gnat_parse_file): Call note_types_used_by_globals. * gcc-interface/utils.c: Remove global_decls. (gnat_pushdecl): Remove use of global_decls. (gnat_write_global_declarations): Rename to no

[patch 2/10] debug-early merge: C front-end (include c-family/)

2015-05-07 Thread Aldy Hernandez
gcc/c-family/ * c-common.h (c_parse_final_cleanups): New prototype. * c-opts.c (c_common_parse_file): Call c_parse_final_cleanups. gcc/c/ * c-decl.c (finish_struct): Save C_TYPE_INCOMPLETE_VARS and immediately clobber it. (c_write_global_declarations_1): Remove call to check_global_declar

[patch 3/10] debug-early merge: C++ front-end

2015-05-07 Thread Aldy Hernandez
gcc/cp/ * cp-objcp-common.c: Adjust comment for cxx_warn_unused_global_decl. * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS): New. * cp-tree.h (note_mangling_alias): Protoize. (cp_write_global_declarations): Remove. (cxx_post_compilatio

[patch 4/10] debug-early merge: Fortran front-end

2015-05-07 Thread Aldy Hernandez
gcc/fortran/ * f95-lang.c (gfc_write_global_declarations): Remove. (LANG_HOOKS_WRITE_GLOBALS): Remove. (gfc_write_global_declarations): Move code from here to... (gfc_be_parse_file): ...here. Call global_decl_processing. * trans-decl.c (gfc_emit_parameter_debug_info): Rename global_decl to

[patch 5/10] debug-early merge: Go front-end

2015-05-07 Thread Aldy Hernandez
gcc/go/ * go-gcc.cc (write_global_definitions): Remove call to finalize_compilation_unit. Remove Go specific debug generation. * go-lang.c (go_langhook_parse_file): Call go_write_globals. (go_langhook_write_globals): Remove. Remove LANG_HOOKS_WRITE_GLOBALS everywhere. diff --git a/gcc/go/g

[patch 6/10] debug-early merge: Java front-end

2015-05-07 Thread Aldy Hernandez
gcc/java/ * class.c: Remove pending_static_fields. (add_field): Remove use of pending_static_fields. (java_write_globals): Remove. * decl.c (java_mark_class_local): Remove use of pending_static_fields. * java-tree.h: Remove pending_static_fields and java_write_globals. * jcf-parse.c (java

[patch 7/10] debug-early merge: LTO

2015-05-07 Thread Aldy Hernandez
gcc/lto/ * lto-lang.c (lto_write_globals): Remove. (LANG_HOOKS_WRITE_GLOBALS): Same. diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index 073bf17..094ed1f 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -1116,19 +1116,6 @@ lto_getdecls (void) return NULL_TREE; } -static

[patch 8/10] debug-early merge: Objective-C front-end

2015-05-07 Thread Aldy Hernandez
gcc/objc/ * objc-act.c (objc_write_global_declarations): Adjust comment. * objc-gnu-runtime-abi-01.c (build_selector_table_decl): Set TREE_USED bit. diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c index 718fdf0..3528c89 100644 --- a/gcc/objc/objc-act.c +++ b/gcc/objc/objc-act.c @@ -439

[patch 9/10] debug-early merge: testsuite changes

2015-05-07 Thread Aldy Hernandez
gcc/testsuite/ * g++.dg/cpp0x/pr57101.C: Add warning. * g++.dg/debug/dwarf2/dwarf4-typedef.C: Same. * g++.dg/ext/visibility/anon7.C: Same. * g++.dg/ipa/pr63587-2.C: Same. * g++.dg/opt/dump1.C: Same. * g++.dg/opt/pr59622-3.C: Same. * g++.dg/opt/pr59622.C: Same. * g++.dg/torture/pr46383.C:

[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 crea

Re: [patch 0/10] debug-early merge

2015-05-08 Thread Aldy Hernandez
On 05/08/2015 07:41 AM, David Malcolm wrote: On Thu, 2015-05-07 at 17:30 -0700, Aldy Hernandez wrote: Hi folks. I have divided the patches into 10 pieces. The patches are interdependent and cannot be applied independently. I am merely dividing them up to aid the relevant reviewers. As I&#x

Re: [patch 1/10] debug-early merge: Ada front-end

2015-05-08 Thread Aldy Hernandez
On 05/08/2015 03:35 AM, Richard Biener wrote: On Fri, May 8, 2015 at 12:26 PM, Eric Botcazou wrote: @@ -5204,28 +5199,6 @@ gnat_write_global_declarations (void) types_used_by_var_decl_insert (t, dummy_global); } } - - /* Output debug information for all global type declar

Re: [patch 1/10] debug-early merge: Ada front-end

2015-05-08 Thread Aldy Hernandez
On 05/08/2015 03:26 AM, Eric Botcazou wrote: @@ -5204,28 +5199,6 @@ gnat_write_global_declarations (void) types_used_by_var_decl_insert (t, dummy_global); } } - - /* Output debug information for all global type declarations first. This - ensures that global types who

Re: [patch 3/10] debug-early merge: C++ front-end

2015-05-08 Thread Aldy Hernandez
On 05/08/2015 04:57 AM, Richard Biener wrote: On Fri, May 8, 2015 at 2:34 AM, Aldy Hernandez wrote: Maybe you can split out the Java aliases stuff (that annoyed me multiple times when trying to refactor the FE - middle-end interface). It looks unrelated enough. Thanks, Richard. Jason

Re: [debug-early] fix -fdump-go-spec

2015-05-08 Thread Aldy Hernandez
Thanks for working on this. Have you tried building with --enable-languages=go? On a GNU/Linux system it should build and pass all tests with no extra effort. Yes. No regressions. Thanks. Aldy

Re: [patch 5/10] debug-early merge: Go front-end

2015-05-08 Thread Aldy Hernandez
On 05/08/2015 11:08 AM, Ian Lance Taylor wrote: This is fine if it works. Thanks. Ian On Thu, May 7, 2015 at 5:36 PM, Aldy Hernandez wrote: As mentioned, no regressions with --enable-languages=go. I will mark the Go changes as approved pending on the rest of the patches being approved

Re: [PATCH] Non-working jit patch for debug-early (was Re: [patch 0/10] debug-early merge)

2015-05-08 Thread Aldy Hernandez
On 05/08/2015 10:38 AM, David Malcolm wrote: I tested your branch (at 09263eae7c260c305fa19ffa186afd1d89654fb8) with the jit configuration from the docs: ../src/configure \ --enable-host-shared \ --enable-languages=jit,c++ \ --disable-bootstrap \ --enable-checking=release \ --

[patch] defer C++ mangling aliases

2015-05-08 Thread Aldy Hernandez
thing else, and would like permission to commit it to mainline. Are you OK with your own patch? :-) Aldy commit 23c95504e7e9acd674b8a0caf607780c85ec3eaf Author: Aldy Hernandez Date: Fri May 8 16:34:51 2015 -0700 * decl2.c (mangling_aliases): New variable. (note_mang

[patch/C++] adapt java method aliases to use create_same_body_alias

2015-05-08 Thread Aldy Hernandez
899570880aca6c3d2e6e85fddd80946648d2d352 Author: Aldy Hernandez Date: Fri May 8 16:31:06 2015 -0700 * decl2.c (collect_candidates_for_java_method_aliases): Remove. (build_java_method_aliases): Adapt to use create_same_body_alias instead of assemble_alias. Move variable declarations to

Re: [patch 3/10] debug-early merge: C++ front-end

2015-05-08 Thread Aldy Hernandez
Thanks. Aldy commit 73357de442ca317e478cfcb6c0f9da630d142775 Author: Aldy Hernandez Date: Fri May 8 17:26:32 2015 -0700 * cp-objcp-common.c: Update comment for cxx_warn_unused_global_decl. * cp-objcp-common.h (LANG_HOOKS_WRITE_GLOBALS): Remove. (LANG_HOOKS_POST_COMPILATION_PARSING_CLEANUPS

Re: [patch] defer C++ mangling aliases

2015-05-08 Thread Aldy Hernandez
On 05/08/2015 08:08 PM, Jason Merrill wrote: On 05/08/2015 07:45 PM, Aldy Hernandez wrote: Are you OK with your own patch? :-) Hmm... ... Well, alright. Jsaon Wait...Jsaon? This is not the same author :). Committed to mainline. Thank you. Aldy

Re: [patch] defer C++ mangling aliases

2015-05-09 Thread Aldy Hernandez
obvious. commit 3e820aa6675e608371ccf4f2ae691baa15a4be7f Author: Aldy Hernandez Date: Sat May 9 06:47:33 2015 -0700 PR bootstrap/66085 * decl2.c (note_mangling_alias): Declare arguments as unused. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index 6101301..27bacab 100644 --- a/gcc/cp

Re: [patch 0/10] debug-early merge

2015-05-11 Thread Aldy Hernandez
Perfect. Thanks for doing this. Aldy On May 11, 2015 4:23 AM, Kyrill Tkachov wrote: > > Hi Aldy, > > On 08/05/15 01:30, Aldy Hernandez wrote: > > Hi folks. > > > > I have divided the patches into 10 pieces.  The patches are > > interdependent and ca

Re: [patch] PR debug/58123: Set correct location for TRY blocks

2015-02-23 Thread Aldy Hernandez
On 02/23/2015 10:37 AM, Jason Merrill wrote: On 02/19/2015 12:31 PM, Aldy Hernandez wrote: As explained in the PR, I would ideally like to get rid of the kludge where we set the location of location-less FINALLY statements to be that of the TRY statement, but that may be by design, and/or

[patch] fix --enable-gather-detailed-mem-stats

2015-02-24 Thread Aldy Hernandez
I guess no one has used --enable-gather-detailed-mem-stats in a while, because it doesn't even build. Fixed with the attached patch. Tested by building cc1plus/cc1 with --enable-gather-detailed-mem-stats. Committed to mainline. commit 458f0b8665bc5adc99b5095d812089e918d62176 Author:

[patch] PR debug/58315: Mark cdtor_label as artificial

2015-02-24 Thread Aldy Hernandez
this is a compiler generated entity (I mean, it doesn't even have a name ;-)). OK for mainline pending tests? commit f113fced0629c2f47aa7f1ac91c7419a47ea9f3b Author: Aldy Hernandez Date: Tue Feb 24 14:05:41 2015 -0800 PR debug/58315 * decl.c (start_preparsed_functi

PING Re: [patch] PR debug/46102 Disable -feliminate-dwarf2-dups when reading a PCH

2015-02-25 Thread Aldy Hernandez
On 02/19/2015 10:41 AM, Jakub Jelinek wrote: On Thu, Feb 19, 2015 at 10:33:20AM -0800, Aldy Hernandez wrote: Well, any PCH file we generate will have some sort of early DIE in it (at the very least the compilation unit DIE) and we will read these in at PCH read-in time, obliterating whatever

Re: [patch] PR debug/46102 Disable -feliminate-dwarf2-dups when reading a PCH

2015-02-25 Thread Aldy Hernandez
time for dwarf4, and the fact that this has been broken since GCC 4.0 would hint that this may not be of P2 importance? OK for mainline pending tests? commit 512b997ad55f45898fce2704c0289d472d08cab1 Author: Aldy Hernandez Date: Wed Feb 25 08:49:59 2015 -0800 PR debug/46102

Re: [patch] PR debug/46102 Disable -feliminate-dwarf2-dups when reading a PCH

2015-02-25 Thread Aldy Hernandez
On 02/25/2015 01:13 PM, Jason Merrill wrote: On 02/25/2015 12:02 PM, Aldy Hernandez wrote: + if (flag_eliminate_dwarf2_dups) +{ + warning (0, "ignoring unimplemented option -feliminate-dwarf2-dups"); + flag_eliminate_dwarf2_dups = 0; +} I think we only want to

Re: [patch] PR debug/46102 Disable -feliminate-dwarf2-dups when reading a PCH

2015-02-25 Thread Aldy Hernandez
On 02/25/2015 06:47 PM, Jason Merrill wrote: On 02/25/2015 09:16 PM, Aldy Hernandez wrote: + warning (0, "ignoring unimplemented option -feliminate-dwarf2-dups"); Similarly, I'd rather say it's broken for C++. OK with that change. Interesting. As in "i

[patch] PR rtl-optimization/65220: avoid integer division in stack alignment

2015-02-26 Thread Aldy Hernandez
This is actually Jakub's patch from the PR, with a few minor tweaks that were needed to bootstrap and pass the regression suite. The splitter was using operand 0 without setting it first. It should've been operand 2. Also, there was a division by zero that was causing an invalid insn; fixed

[patch/committed] PR middle-end/65233 make walk-ssa_copies handle empty PHIs

2015-03-01 Thread Aldy Hernandez
s the ICE on an x86-64 Linux cross aarch64-linux-gnu cc1plus. Committed to mainline. commit cdb5a8f26178f61d6a2fdb2543f6c8b4c7136c94 Author: Aldy Hernandez Date: Sun Mar 1 21:21:37 2015 -0800 PR middle-end/65233 * ipa-polymorphic-call.c (walk_ssa_copies): Handle empty PHIs. diff

Re: [patch] PR rtl-optimization/65220: avoid integer division in stack alignment

2015-03-02 Thread Aldy Hernandez
On 03/02/2015 09:55 AM, Richard Henderson wrote: On 02/26/2015 05:46 PM, Aldy Hernandez wrote: +;; Optimize division or modulo by constant power of 2, if the constant +;; materializes only after expansion. +(define_insn_and_split "*udivmod4_pow2" + [(set (match_opera

[patch] PR lto/65276 remove odr_violated assert

2015-03-02 Thread Aldy Hernandez
TYPE_BINFO is null when no optimization is used, but odr_violated is unset. Fixed and approved in the PR by Honza. Tested on x86-64 Linux. Committed to mainline. commit a26ff3a2376a898bef8ca8ab17a457052d677a62 Author: Aldy Hernandez Date: Mon Mar 2 09:55:28 2015 -0800 PR lto/65276

Re: [patch] PR rtl-optimization/65220: avoid integer division in stack alignment

2015-03-02 Thread Aldy Hernandez
g a full round of tests. OK pending tests? commit ee167c8a716799af9eb0e2275156061d76719dac Author: Aldy Hernandez Date: Mon Mar 2 10:53:29 2015 -0800 * config/i386/i386.md (*udivmod4_pow2): Remove reload_completed. diff --git a/gcc/config/i386/i386.md b/gcc/config/i386/i386.md index 8495284..8a80415 100644 --- a

[patch] PR c++/65295: Allow return-value optimization for constexpr's

2015-03-03 Thread Aldy Hernandez
In constexpr handling, we can request an rval for a return-value both by an invisible reference and by virtue of named return value optimization. Fixed by removing the assert. Approved by Jason off-line. Committed to mainline. commit 1a8fdc708eeab70adc237193febf5f8db1eab995 Author: Aldy

[patch] Optimize empty class copies within a C++ return statement

2015-03-05 Thread Aldy Hernandez
{ D.2246 = {CLOBBER}; } Tested on x86-64 Linux. OK? commit 8fd545d608f2a6c11f889e11c700711b8f911c02 Author: Aldy Hernandez Date: Thu Mar 5 12:23:27 2015 -0800 * cp-gimplify.c (cp_gimplify_expr): Optimize empty class copies within a return statement. diff --git a/gcc/cp/cp-gimpl

Re: [patch] Optimize empty class copies within a C++ return statement

2015-03-06 Thread Aldy Hernandez
On 03/05/2015 10:20 PM, Jason Merrill wrote: On 03/05/2015 06:25 PM, Aldy Hernandez wrote: +tree ret = TREE_OPERAND (*expr_p, 0); +if (ret && (TREE_CODE (ret) == INIT_EXPR +|| TREE_CODE (ret) == MODIFY_EXPR) +&& TREE_CODE (TREE_OPERAND (ret, 0)

[patch] add LAMBDA_EXPR support to debug_tree()

2015-03-06 Thread Aldy Hernandez
uthor: Aldy Hernandez Date: Fri Mar 6 11:54:31 2015 -0800 * ptree.c (cxx_print_lambda_node): New. (cxx_print_xnode): Handle LAMBDA_EXPR. diff --git a/gcc/cp/ptree.c b/gcc/cp/ptree.c index 79c80a3..2d0b584 100644 --- a/gcc/cp/ptree.c +++ b/gcc/cp/ptree.c @@ -204,6 +2

Re: [patch] Optimize empty class copies within a C++ return statement

2015-03-06 Thread Aldy Hernandez
On 03/06/2015 01:46 PM, Jason Merrill wrote: On 03/06/2015 11:19 AM, Aldy Hernandez wrote: We are hitting the MODIFY_EXPR case. Indeed, _because_ we hit the MODIFY_EXPR is that we return the uninitialized temporary. For example, we start with: return retval = TARGET_EXPR which becomes

Re: [patch] Optimize empty class copies within a C++ return statement

2015-03-09 Thread Aldy Hernandez
On 03/06/2015 02:01 PM, Jason Merrill wrote: On 03/06/2015 05:01 PM, Jason Merrill wrote: On 03/06/2015 04:54 PM, Aldy Hernandez wrote: But doesn't this still involve a MODIFY_EXPR, i.e. return retval = D.2349? If I understand you correct, no. gimplify_return_expr creates a new temp

[patch] PR bootstrap/25672: Avoid CFLAGS in CFLAGS_FOR_TARGETS if cross-compiling

2015-03-09 Thread Aldy Hernandez
libraries start to build. OK for mainline? Aldy commit f2d130b93f334c5c680761553624964f87594adf Author: Aldy Hernandez Date: Mon Mar 9 15:12:33 2015 -0700 PR bootstrap/25672 * configure.ac: Do not initialize CFLAGS_FOR_TARGET from CFLAGS if cross-compiling. Similarl

Re: [patch] PR bootstrap/25672: Avoid CFLAGS in CFLAGS_FOR_TARGETS if cross-compiling

2015-03-10 Thread Aldy Hernandez
On 03/09/2015 11:35 PM, Jeff Law wrote: On 03/09/15 16:22, Aldy Hernandez wrote: Hello gentlemen. The problem here is that we pick up the system's CFLAGS and pass it down to the target libraries. This causes havoc when, for instance, CFLAGS is -march=x86-64 and the target is powerpc-linu

Re: [patch] Optimize empty class copies within a C++ return statement

2015-03-10 Thread Aldy Hernandez
Aldy commit 451ffe1998bd26175677fe62e9449313da642fbe Author: Aldy Hernandez Date: Thu Mar 5 12:23:27 2015 -0800 * cp-gimplify.c (simple_empty_class_p): New. * cp-gimplify.c (cp_gimplify_expr): Handle RETURN_EXPR. Abstract the code for empty class copies

Re: [patch] Optimize empty class copies within a C++ return statement

2015-03-10 Thread Aldy Hernandez
On 03/10/2015 04:59 PM, Jason Merrill wrote: On 03/10/2015 07:10 PM, Aldy Hernandez wrote: -/* Remove any copies of empty classes. We check that the RHS - has a simple form so that TARGET_EXPRs and non-empty - CONSTRUCTORs get reduced properly, and we leave the

Re: [patch] Optimize empty class copies within a C++ return statement

2015-03-10 Thread Aldy Hernandez
On 03/10/2015 05:55 PM, Jason Merrill wrote: On 03/10/2015 08:07 PM, Aldy Hernandez wrote: On 03/10/2015 04:59 PM, Jason Merrill wrote: On 03/10/2015 07:10 PM, Aldy Hernandez wrote: -/* Remove any copies of empty classes. We check that the RHS - has a simple form so that

[debug-early] equate new DIE with DW_AT_specificationto a previous declaration

2015-03-17 Thread Aldy Hernandez
The dwarf generation is as mainline, and we can build libstdc++ with no regressions to the guality testsuite. Does this sound reasonable, or is this something a lot more complicated? Thanks. Aldy commit 0a49042b9151e0387efc5f87c32cb24968896ae4 Author: Aldy Hernandez Date: Tue Mar 17 12:29:

[debug-early] allow DW_TAG_type_unit's in limbo

2015-03-17 Thread Aldy Hernandez
Twiddle the assert. A DW_TAG_type_unit in limbo can happen under normal circumstances while breaking out comdat types. Found while running the gdb testsuite. Committed to branch. Aldy commit 1c2137a25b7ffa2ab71fe4d534ab149624c5c841 Author: Aldy Hernandez Date: Tue Mar 17 16:50:14 2015

Re: [debug-early] equate new DIE with DW_AT_specificationto a previous declaration

2015-03-18 Thread Aldy Hernandez
On 03/17/2015 07:12 PM, Jason Merrill wrote: On 03/17/2015 03:58 PM, Aldy Hernandez wrote: The problem is that, for -fno-implicit-templates, the decl is now DECL_EXTERNAL, which means we never equate this new "DIE with DW_AT_specification" to the DECL. That is, we never fall th

[debug-early] Cache DW_TAG_label's if appropriate

2015-03-18 Thread Aldy Hernandez
n the immortal words of Shaggy... "wasn't me", so I'm leaving this bit untouched. Tested on x86-64 Linux with the gdb regression suite. Committed to branch. Aldy commit 8fea2b5c37026b3121afc0a98630542bb9a733dd Author: Aldy Hernandez Date: Wed Mar 18 09:55:38 2015 -0700

Re: [debug-early] Cache DW_TAG_label's if appropriate

2015-03-18 Thread Aldy Hernandez
On 03/18/2015 01:59 PM, Jason Merrill wrote: On 03/18/2015 01:03 PM, Aldy Hernandez wrote: By the way Jason, is there any reason we previously called equate_decl_number_to_die() only for abstract instances?: So that multiple concrete instances can find the abstract instance. Ah, I see

Re: [debug-early] emitting early debug for external variables

2015-03-19 Thread Aldy Hernandez
t fixes 4-5 gdb regressions. I will prune the unused DIEs in a subsequent patch; actually much later, when I'm done regression hunting. Let me know if you have any problems with this. I am committing to the branch. Aldy commit b1457fad19257267facddb6ce88c6041a24a5154 Author: Aldy Hernan

Re: [debug-early] emitting early debug for external variables

2015-03-19 Thread Aldy Hernandez
On 03/19/2015 12:43 PM, Jason Merrill wrote: On 03/19/2015 02:03 PM, Aldy Hernandez wrote: I have moved the debug early generation for _symbols_ to rest_of_decl_compilation I think you mean "variables". Functions are also symbols. :) Oops, yes I did :). I will adjust the comm

[debug-early] minor cleanups

2015-03-20 Thread Aldy Hernandez
Just cleaning up some left over or non-applicable comments. Committed to branch. commit b783ed568b4b56d42f4203ce32d964104be6a368 Author: Aldy Hernandez Date: Fri Mar 20 09:49:23 2015 -0700 Minor cleanups. diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index c538d2e..c4ffcf2 100644 --- a

[debug-early] disallow type DIEs in limbo

2015-03-20 Thread Aldy Hernandez
. Committed to branch. Aldy commit 703f3b342cd2d1aa7ec3af45881e08e5eea6942a Author: Aldy Hernandez Date: Fri Mar 20 10:42:05 2015 -0700 Disallow limbo type DIEs in late dwarf generation. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 48bd5b8..8884afd 100644 --- a/gcc/dwarf2out.c +++ b/gcc

[debug-early] Handle specification of class scoped static functions

2015-03-20 Thread Aldy Hernandez
uld you be so kind as to look at this two-liner to make sure you're OK with it? Thanks. Aldy commit cec08d43caffbf086720ac3994d068010dc103c9 Author: Aldy Hernandez Date: Fri Mar 20 09:55:31 2015 -0700 Handle specification of class scoped static functions. diff --git a/gcc/dw

Re: [debug-early] Handle specification of class scoped static functions

2015-03-20 Thread Aldy Hernandez
e (or OK) before committing to branch. Thanks. Aldy commit b3d910713d27dc29801f3ddbe8671a4a6e0de4c1 Author: Aldy Hernandez Date: Fri Mar 20 09:55:31 2015 -0700 Handle specification of class scoped static functions. Remove superfluous check for old_die. diff --git a/gcc/dwarf2out.c b/gcc/d

[debug-early] emit debug for Fortran named decls

2015-03-24 Thread Aldy Hernandez
I thought we could do without this, but rest_of_decl_compilation is not called for constant decls, so I've put back what the Fortran FE originally had. This fixes a gdb regression. Committed to branch. Aldy commit 0f6f7418836c533a49a5464828a0461aec437ebc Author: Aldy Hernandez Date:

[debug-early] avoid unnecessary dwarf passes

2015-03-24 Thread Aldy Hernandez
d336360ea4a7cb7238896eebbe797f Author: Aldy Hernandez Date: Tue Mar 24 10:17:38 2015 -0700 Cache CONST_DECL dies. Avoid unnecessary dwarf passes. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 044869d..48e2eed 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -19080,7 +19080

[debug-early] emit early dwarf for locally scoped functions

2015-03-24 Thread Aldy Hernandez
nerating early dwarf for Object_method and associates. I'm committing to the branch. Let me know if you have a problem with this. Tested with the guality.exp suite as well as the GDB testsuite. Aldy commit 8673cbf8204fcd7099507293a859b173343a0f9a Author: Aldy Hernandez Date: Tue Mar 24 10:47

Re: [debug-early] emit early dwarf for locally scoped functions

2015-03-25 Thread Aldy Hernandez
On 03/25/2015 12:37 PM, Jason Merrill wrote: On 03/24/2015 02:00 PM, Aldy Hernandez wrote: I found that for locally scoped functions we were not emitting early dwarf. Why weren't they being emitted as part of their enclosing function? They should be. Jason Hmm, you're right.

Re: [debug-early] emit early dwarf for locally scoped functions

2015-03-26 Thread Aldy Hernandez
On 03/25/2015 07:07 PM, Jason Merrill wrote: On 03/25/2015 05:05 PM, Aldy Hernandez wrote: Or we could cheat and just remove them as mainline does, but only when reusing a declaration (as in the attached patch). This seems right to me. Jason Ok thanks, committed. Aldy

[debug-early] Fill in array bounds for variable-length typedefs

2015-03-26 Thread Aldy Hernandez
uthor: Aldy Hernandez Date: Thu Mar 26 08:47:34 2015 -0700 Fill in array bounds for variable-length typedefs. diff --git a/gcc/dwarf2out.c b/gcc/dwarf2out.c index 4bc945f..1928846 100644 --- a/gcc/dwarf2out.c +++ b/gcc/dwarf2out.c @@ -17623,6 +17623,26 @@ decl_start_label (tree decl) } #

[debug-early] Remove redundant argument to add_subscript_info

2015-03-26 Thread Aldy Hernandez
ch for GCC 6, if it's ok with you. It can live in the debug-early work if you approve. Aldy commit eb0b7b1e769d3ea17cf4663d9fc1cb90fb406e59 Author: Aldy Hernandez Date: Thu Mar 26 09:03:51 2015 -0700 Remove redundant argument to add_subscript_info. diff --git a/gcc/dwarf2out.c b/

Re: [debug-early] equate new DIE with DW_AT_specificationto a previous declaration

2015-04-10 Thread Aldy Hernandez
On 04/03/2015 07:41 AM, Jason Merrill wrote: On 03/18/2015 11:51 AM, Aldy Hernandez wrote: On 03/17/2015 07:12 PM, Jason Merrill wrote: Why are we outlining a DECL_EXTERNAL function? SRA has no restrictions on whether a function is DECL_EXTERNAL. Aha. So it seems that DECL_EXTERNAL is the

Re: [debug-early] Handle specification of class scoped static functions

2015-04-13 Thread Aldy Hernandez
On 04/03/2015 07:48 AM, Jason Merrill wrote: On 03/20/2015 08:11 PM, Aldy Hernandez wrote: + /* For class scoped static functions, the dumped early + version was the declaration, whereas the next time + around with a different context should be the

Re: LTO early debug, day 2

2015-04-14 Thread Aldy Hernandez
On 04/14/2015 06:35 AM, Richard Biener wrote: Richard, thank you so much for working on this. It's good to see your progress here. the late dwarf generation is a bit awkward because it insists on creating type DIEs for all sort of contexts when we process scope vars. The type Types should

Re: debug-early branch merged into mainline

2015-06-08 Thread Aldy Hernandez
On 06/08/2015 09:30 AM, Richard Biener wrote: On Mon, Jun 8, 2015 at 2:05 PM, Aldy Hernandez wrote: On 06/08/2015 04:26 AM, Richard Biener wrote: On Mon, Jun 8, 2015 at 3:23 AM, Aldy Hernandez wrote: On 06/07/2015 02:33 PM, Richard Biener wrote: On June 7, 2015 6:00:05 PM GMT+02:00

Re: debug-early branch merged into mainline

2015-06-08 Thread Aldy Hernandez
On 06/08/2015 02:59 PM, Richard Biener wrote: On June 8, 2015 7:14:19 PM GMT+02:00, Aldy Hernandez wrote: On 06/08/2015 09:30 AM, Richard Biener wrote: On Mon, Jun 8, 2015 at 2:05 PM, Aldy Hernandez wrote: On 06/08/2015 04:26 AM, Richard Biener wrote: On Mon, Jun 8, 2015 at 3:23 AM, Aldy

Re: debug-early branch merged into mainline

2015-06-09 Thread Aldy Hernandez
On 06/09/2015 04:00 AM, Richard Biener wrote: On Mon, Jun 8, 2015 at 10:25 PM, Aldy Hernandez wrote: On 06/08/2015 02:59 PM, Richard Biener wrote: On June 8, 2015 7:14:19 PM GMT+02:00, Aldy Hernandez wrote: On 06/08/2015 09:30 AM, Richard Biener wrote: On Mon, Jun 8, 2015 at 2:05 PM

[patch] fix darwin bootstrap by avoiding duplicate DIE attributes

2015-06-11 Thread Aldy Hernandez
tes in the future. Comment #8 explains the add_location_or_const_value_attribute change and its testcase. Everything else is pretty obvious. Tested on x86_64 Linux and x86_64-apple-darwin*. OK for mainline? commit 8645dcda5e98879d05c4eb7eb8fcc6699093494b Author: Aldy Hernandez Date: Tue Jun

Re: [patch] fix darwin bootstrap by avoiding duplicate DIE attributes

2015-06-11 Thread Aldy Hernandez
Hi Jason. Attached is a new patch with the off-list corrections. Tested on x86_64 Linux. Aldy commit 1775f74c2b78b1601c89befa724114d89fc2e8be Author: Aldy Hernandez Date: Tue Jun 9 18:07:44 2015 -0400 PR bootstrap/66448 * dwarf2out.c (check_die): Check for common duplicate

Re: [patch] fix darwin bootstrap by avoiding duplicate DIE attributes

2015-06-12 Thread Aldy Hernandez
On 06/12/2015 12:22 AM, Andreas Schwab wrote: ../../gcc/dwarf2out.c:5693:1: error: 'void check_die(dw_die_ref)' defined but not used [-Werror=unused-function] Andreas. Committed as obvious. commit 76da2378b15ad786e8c2c64ddd8b39c132947738 Author: Aldy Hernandez Date: Fri Jun 1

[patch] PR debug/66482: Do not ICE in gen_formal_parameter_die

2015-06-12 Thread Aldy Hernandez
unction, I suggest we remove the assert and avoid sudden death. It's not like the we generated useful debugging for this testcase anyhow. Aldy commit 80f8e8aefc3c628ad22cd2b17b28beb8bf4f3523 Author: Aldy Hernandez Date: Fri Jun 12 09:53:44 2015 -0700 * dwarf2out.c (gen_forma

[committed] PR debug/66535: guard check into parent's DIE

2015-06-15 Thread Aldy Hernandez
ield without checking the existence of said parent. Long story short... committing as obvious. Aldy commit ee39c82907a029fe1403cf1d3a364b89e9dee998 Author: Aldy Hernandez Date: Mon Jun 15 09:19:45 2015 -0700 PR debug/66535 * dwarf2out.c (gen_subprogram_die): Do not check a paren

PING: Re: [patch] PR debug/66482: Do not ICE in gen_formal_parameter_die

2015-06-23 Thread Aldy Hernandez
On 06/12/2015 10:07 AM, Aldy Hernandez wrote: Hi. This is now a P2, as it is causing a secondary target bootstrap to fail (s390). Aldy Sigh. I must say my head is spinning with this testcase and what we do with it (-O3), even prior to the debug-early work: void f(int p) {} int g

[patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-24 Thread Aldy Hernandez
TEMPLATE_TYPE_PARAMs had been lowered by the time dwarf2out_decl was called, but here we are calling late_global_decl relatively early. The attached patch fixes the problem. Tested with --enable-languages=all. Ada had other issues, so I skipped it. OK for mainline? commit 302f9976c53aa09e431bd54f37d

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-25 Thread Aldy Hernandez
On 06/25/2015 06:53 AM, Eric Botcazou wrote: Tested with --enable-languages=all. Ada had other issues, so I skipped it. What other issues exactly? It's fine at r224930 for example. There were some defined but not used warnings (??) that caused it to fail, especially since I didn't configu

Re: [patch] PR debug/66653: avoid late_global_decl on decl_type_context()s

2015-06-25 Thread Aldy Hernandez
On 06/25/2015 02:48 AM, Richard Biener wrote: On Thu, Jun 25, 2015 at 5:12 AM, Aldy Hernandez wrote: The problem here is that we are trying to call dwarf2out_late_global_decl() on a static variable in a template which has a type of TEMPLATE_TYPE_PARM: template class A { static __thread T

[gomp4.1] document omp_get_max_task_priority and OMP_MAX_TASK_PRIORITY

2015-06-25 Thread Aldy Hernandez
ommit 98e12d99f2e83cd235af0aebe6435a25c69e3137 Author: Aldy Hernandez Date: Thu Jun 25 14:07:26 2015 -0700 * libgomp.texi: Document omp_get_max_task_priority and OMP_MAX_TASK_PRIORITY. diff --git a/libgomp/libgomp.texi b/libgomp/libgomp.texi index f3a138e..79e1b22 100644

[debug-early] fix C++ mangling issues with deferred_asm_name removal

2015-01-14 Thread Aldy Hernandez
ch to the branch. Thanks. commit 0c817fd43f95029153045b9523c1c8b49291e4a3 Author: Aldy Hernandez Date: Wed Jan 14 10:12:40 2015 -0800 cp/ * decl2.c (mangling_aliases): New variable. (note_mangling_alias, generate_mangling_aliases): New. (cp_write_global_declara

[debug-early] C++ clones and limbo DIEs

2015-01-15 Thread Aldy Hernandez
t before committing to this approach. Thanks. Aldy commit cd20df2a48ce4f0d4e64626d61f8f61a810cf742 Author: Aldy Hernandez Date: Wed Jan 14 13:33:40 2015 -0800 * cp/decl2.c (c_parse_final_cleanups): Emit early debug information for clones. * dbxout.c (dbx_debug_hooks

Re: [debug-early] C++ clones and limbo DIEs

2015-01-16 Thread Aldy Hernandez
On 01/15/2015 07:11 PM, Jason Merrill wrote: On 01/15/2015 09:58 PM, Aldy Hernandez wrote: Now back to limbdo_die_list... My approach is to flush the limbo list, generically, after the front-ends have finished, by adding a new "early_finish" debug hook. This gets rid of any perma

Re: [debug-early] C++ clones and limbo DIEs

2015-01-16 Thread Aldy Hernandez
On 01/16/2015 08:31 AM, Jason Merrill wrote: On 01/16/2015 05:55 AM, Richard Biener wrote: I'd hope that in the very distant future all early DIEs would be "created" by the frontends (that is, dwarf2out.c wouldn't walk into parents/siblings so much). Are you thinking that the front end would i

Re: [debug-early] C++ clones and limbo DIEs

2015-01-23 Thread Aldy Hernandez
Phew... ok, I'm a little stuck here with the interaction between dwarf2out and LTO, and I'm hoping y'all can shed some light. Please bear with me through the verbosity, it gets clearer (I hope) near the end. On 01/16/2015 12:45 PM, Jason Merrill wrote: On 01/16/2015 12:50 PM,

Re: [debug-early] C++ clones and limbo DIEs

2015-01-28 Thread Aldy Hernandez
On 01/27/2015 12:51 PM, Jason Merrill wrote: On 01/23/2015 01:45 PM, Aldy Hernandez wrote: It would expect [the flush] to be before free_lang_data and LTO streaming. The reason this wouldn't make a difference is because, as it stands, dwarf for the clones are not generated until fi

Re: [debug-early] C++ clones and limbo DIEs

2015-01-28 Thread Aldy Hernandez
And now with the actual patch ;-). * c-family/cilk.c (create_cilk_wrapper_body): Emit debug information for wrappers. * cp/decl2.c (emit_debug_for_namespace): Add FIXME note for templates. * cp/optimize.c (maybe_clone_body): Emit early debug for clones.

Re: [debug-early] C++ clones and limbo DIEs

2015-01-28 Thread Aldy Hernandez
On 01/16/2015 02:55 AM, Richard Biener wrote: On Fri, Jan 16, 2015 at 4:11 AM, Jason Merrill wrote: On 01/15/2015 09:58 PM, Aldy Hernandez wrote: I hoped we wouldn't need the limbo list at all ... that is, parent DIEs are always present when we create children. I think that should wo

<    1   2   3   4   5   6   7   8   9   10   >