This is the mail archive of the
mailing list for the GCC project.
Re: Symbol table 2/many: break out partitioning code out of lto.c
- From: Diego Novillo <dnovillo at google dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org, rguenther at suse dot de
- Date: Tue, 10 Apr 2012 09:48:02 -0400
- Subject: Re: Symbol table 2/many: break out partitioning code out of lto.c
- References: <20120410133247.GB6536@kam.mff.cuni.cz>
On 4/10/12 9:32 AM, Jan Hubicka wrote:
LTO partitioning logic is one of places that are really symmetric accross most types
of symbols; also the implementation is convoluted now by split in between lto.c that
computes cgraph/varpool node sets specifying partitions and lto-cgraph.c that
computes a boundaries (i.e. what functions/vars are referenced from given unit).
There is a lot of logic duplication in between the promotion done in lto.c and boundary
logic + there are subtle differences causing a lot of pain.
The plan is to reorg the code to new API and unify it, so the partitioning code
produce boundaries on the run and represents every of the partition by the encoder,
not by sets.
* lto.c: Update copyright; remove params.h, ipa-inline.h
and ipa-utils.h inlines; inline lto-partition.h
(ltrans_partition_def, ltrans_partition, add_cgraph_node_to_partition,
add_varpool_node_to_partition, new_partition, free_ltrans_partitions,
undo_partition, partition_cgraph_node_p, partition_varpool_node_p,
lto_1_to_1_map, node_cmp, varpool_node_cmp, lto_balanced_map,
promote_var, promote_fn, lto_promote_cross_file_statics): move to...
* lto-partition.c: ... here; new file.
* lto-partition.h: New file.
* Make-lang.in (lto.o): Update dependencies.