From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 126590 invoked by alias); 22 May 2015 11:26:32 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 126578 invoked by uid 89); 22 May 2015 11:26:31 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.6 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ob0-f177.google.com Received: from mail-ob0-f177.google.com (HELO mail-ob0-f177.google.com) (209.85.214.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 22 May 2015 11:26:30 +0000 Received: by obfe9 with SMTP id e9so10863100obf.1 for ; Fri, 22 May 2015 04:26:28 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.182.101.197 with SMTP id fi5mr6302473obb.60.1432293988483; Fri, 22 May 2015 04:26:28 -0700 (PDT) Received: by 10.76.115.167 with HTTP; Fri, 22 May 2015 04:26:28 -0700 (PDT) In-Reply-To: <555D0071.9000607@redhat.com> References: <554C060F.6000609@redhat.com> <555CAD35.5040304@redhat.com> <555CF12C.7080300@redhat.com> <20150520210149.GA22803@kam.mff.cuni.cz> <555D0071.9000607@redhat.com> Date: Fri, 22 May 2015 11:45:00 -0000 Message-ID: Subject: Re: [patch 10/10] debug-early merge: compiler proper From: Richard Biener To: Aldy Hernandez Cc: Jan Hubicka , Jason Merrill , gcc-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-05/txt/msg02093.txt.bz2 On Wed, May 20, 2015 at 11:45 PM, Aldy Hernandez wrote: > On 05/20/2015 05:01 PM, Jan Hubicka wrote: >>> >>> >>> commit 8824b5ecba26cef065e47b34609c72677c3c36fc >>> Author: Aldy Hernandez >>> 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 >>> index 6b68a16..a4bcdba 100644 >>> --- a/gcc/tree-switch-conversion.c >>> +++ b/gcc/tree-switch-conversion.c >>> @@ -1097,6 +1097,7 @@ build_one_array (gswitch *swtch, int num, tree >>> arr_index_type, >>> DECL_ARTIFICIAL (decl) = 1; >>> TREE_CONSTANT (decl) = 1; >>> TREE_READONLY (decl) = 1; >>> + DECL_IGNORED_P (decl) = 1; >>> varpool_node::finalize_decl (decl); >> >> >> This looks obvious enough to me. Technically speaking the array type >> constructed >> probalby should be TREE_ARTIFICAIL, but probably it does not matter. Fine to commit to trunk btw. > > Yeah, that's what I thought. I ignored the type because it won't make it to > the debugging back end if we stop things at the DECL itself. > > FWIW, Ada is filled with these temporaries and/or types that should really > be ignored, and are currently causing grief. > >> If you grep for finalize_decl, there are several other calls: >> asan.c: varpool_node::finalize_decl (var); >> asan.c: varpool_node::finalize_decl (var); >> cgraphbuild.c: varpool_node::finalize_decl (decl); >> cgraphunit.c: - varpool_finalize_decl >> cgraphunit.c: varpool_node::finalize_decl (decl); >> cgraphunit.c:varpool_node::finalize_decl (tree decl) >> coverage.c: varpool_node::finalize_decl (var); >> coverage.c: varpool_node::finalize_decl (var); > > > Etc etc. > > Hmmm, I bet mainline is generating dwarf for all this. I don't feel > comfortable touching all this (ok, I'm lazy), but it would seem like almost > all of these calls would benefit from DECL_IGNORED_P. Perhaps we could add > an argument to finalize_decl() and do it in there. The only issue are in passes using build_decl directly. I guess we'd want a middle-end-ish "create new global static" similar to what we have for locals (create_tmp_var). Some of the callers above already set DECL_IGNORED_P properly. Richard. > Aldy > > >> coverage.c: varpool_node::finalize_decl (fn_info_ary); >> coverage.c: varpool_node::finalize_decl (gcov_info_var); >> omp-low.c: varpool_node::finalize_decl (t); >> omp-low.c: varpool_node::finalize_decl (t); >> omp-low.c: varpool_node::finalize_decl (decl); >> omp-low.c: varpool_node::finalize_decl (vars_decl); >> omp-low.c: varpool_node::finalize_decl (funcs_decl); >> passes.c: varpool_node::finalize_decl (decl); >> tree-chkp.c: varpool_node::finalize_decl (var); >> tree-chkp.c: varpool_node::finalize_decl (bnd_var); >> tree-profile.c: varpool_node::finalize_decl (ic_void_ptr_var); >> tree-profile.c: varpool_node::finalize_decl (ic_gcov_type_ptr_var); >> tree-switch-conversion.c: varpool_node::finalize_decl (decl); >> ubsan.c: varpool_node::finalize_decl (decl); >> ubsan.c: varpool_node::finalize_decl (var); >> ubsan.c: varpool_node::finalize_decl (array); >> varasm.c: varpool_node::finalize_decl (decl); >> varpool.c: Unlike finalize_decl function is intended to be used >> varpool.c: varpool_node::finalize_decl (decl); >> >> I would say most of them needs similar treatment (I am not 100% sure about >> OMP >> ones that may be user visible) >> >> Honza >>> >>> >>> fetch = build4 (ARRAY_REF, value_type, decl, tidx, NULL_TREE, > >