This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH 7/7] Plug ipa-prop escape analysis into gimple_call_arg_flags
- From: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 May 2014 15:03:17 +0200
- Subject: Re: [PATCH 7/7] Plug ipa-prop escape analysis into gimple_call_arg_flags
- Authentication-results: sourceware.org; auth=none
- References: <20140521131634 dot 178838544 at virgil dot suse dot cz> <20140521131634 dot 646352575 at virgil dot suse dot cz> <CAFiYyc3m-NLuKYcA65WKrONJsimRkrqPSN8XN5bRg99RTG9_jw at mail dot gmail dot com> <20140522124952 dot GA13095 at virgil dot suse> <CAFiYyc3FXT0VNQDst=Q8rZ5Y1+vNwhgGHcoJFMdfz6dbVV1OjQ at mail dot gmail dot com> <20140522152433 dot GB19612 at kam dot mff dot cuni dot cz> <dbe5cb14-709a-488e-af93-312eae7ebd95 at email dot android dot com> <20140522181130 dot GA10913 at atrey dot karlin dot mff dot cuni dot cz> <CAFiYyc0Oq8DgXZBxiBQR=xJu=Fg8y56u3GS0oMBfTfQ2Uy1LyA at mail dot gmail dot com> <20140524073913 dot GA27708 at kam dot mff dot cuni dot cz>
Jan Hubicka <email@example.com> writes:
>> I'm fine with enlarging tree_function_decl for now - ideally we'd push
>> stuff from it elsewhere (like target and optimization option tree nodes,
>> or most of the visibility and symbol related stuff). Not sure why
>> tree_type_decl inherits from tree_decl_non_common (and thus
>> tree_decl_with_vis). Probably because of the non-common parts
>> being (ab-)used by FEs. Otherwise I'd say simply put a symtab
>> node pointer into tree_decl_with_vis ... (can we move
>> section_name and comdat_group more easily than assembler_name?)
> this patch removes comdat_group pointer and adds direct symtab pointer. As
> expected, the change is not completely easy. The main uglyness in C++'s version
> of duplicate_decl that creates a duplicated decl with duplicated symtab node
> now and needs to remove it. Other problem is copy_node and c's duplicate_decl
> that does memcpy on a node and thus also copie the symtab pointer that is not
> the right thing to do.
> On the other hand on middle-end side several things simplify, so I think overall
> the approach works relatively well.
> I have bootstrapped/regtested x86_64-linux and I plan to give it more testing
> tomorrow and commit if there are no complains. Incrementally I would like then
> to cleanup way the decl_with_vis.symtab_node pointer is maintained. I do not
> want to allow users to tamper with it, so I did not make accessor macro for
> it, however there are more direct uses than I would like: I will need to figure
> out how to reduce those.
This patch broke Solaris bootstrap:
/vol/gcc/src/hg/trunk/local/gcc/config/sol2.c: In function 'void solaris_elf_asm_comdat_section(const char*, unsigned int, tree)':
/vol/gcc/src/hg/trunk/local/gcc/config/sol2.c:213:17: error: 'decl_comdat_group' was not declared in this scope
/vol/gcc/src/hg/trunk/local/gcc/config/sol2.c: In function 'int solaris_define_comdat_signature(comdat_entry**, void*)':
/vol/gcc/src/hg/trunk/local/gcc/config/sol2.c:267:12: error: 'decl_comdat_group' was not declared in this scope
The following snippet allows a sparc-sun-solaris2.11 bootstrap to go
along further, only to break again later in libjava for what seems to be
2014-05-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/sol2.c: Include cgraph.h.
diff --git a/gcc/config/sol2.c b/gcc/config/sol2.c
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3.
tree solaris_pending_aligns, solaris_pending_inits, solaris_pending_finis;
I'm not sure if this is the right approach, though, using
get_comdat_group seems to be preferred!?
ISTM that other ports might have similar problems: darwin.c, mep/mep.c,
and mips/mips.c all use DECL_COMDAT_GROUP without including cgraph.h.
> * mips.c (mips_start_unique_function): Likewise.
> (ix86_code_end): Likewise.
> (rs6000_code_end): Likweise.
The last two entries lack the file names.
Rainer Orth, Center for Biotechnology, Bielefeld University