This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 7/7] Plug ipa-prop escape analysis into gimple_call_arg_flags

Jan Hubicka <> 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?)
> Hi,
> 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
unrelated reasons.

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
--- a/gcc/config/sol2.c
+++ b/gcc/config/sol2.c
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3.  
 #include "diagnostic-core.h"
 #include "ggc.h"
 #include "hash-table.h"
+#include "cgraph.h"
 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]