> gcc/ChangeLog:
> 
>       * common.opt: Add cache partitioning.
>       * flag-types.h (enum lto_partition_model): Likewise.
> 
> gcc/lto/ChangeLog:
> 
>       * lto-partition.cc (new_partition): Use new_partition_no_push.
>       (new_partition_no_push): New.
>       (free_ltrans_partition): New.
>       (free_ltrans_partitions): Use free_ltrans_partition.
>       (join_partitions): New.
>       (split_partition_into_nodes): New.
>       (is_partition_reorder): New.
>       (class partition_set): New.
>       (distribute_n_partitions): New.
>       (partition_over_target_split): New.
>       (partition_binary_split): New.
>       (partition_fixed_split): New.
>       (class partitioner_base): New.
>       (class partitioner_default): New.
>       (lto_cache_map): New.
>       * lto-partition.h (lto_cache_map): New.
>       * lto.cc (do_whole_program_analysis): Use lto_cache_map.
> 
> gcc/testsuite/ChangeLog:
> 
>       * gcc.dg/completion-2.c: Add -flto-partition=cache.
> +/* Free memory used by ltrans partition.
> +   Encoder can be kept to be freed after streaming.  */
> +static void
> +free_ltrans_partition (ltrans_partition part, bool delete_encoder)
> +  {
No two spaces here (indent everything to left by 2).
> +    if (part->initializers_visited)
> +      delete part->initializers_visited;
> +    if (delete_encoder)
> +      lto_symtab_encoder_delete (part->encoder);
> +    free (part);
It would make sense to turn this into C++ and use destructors
(incrementally).

OK,
Honza

Reply via email to