On Thu, Apr 07, 2016 at 07:05:09PM +0530, Prathamesh Kulkarni wrote: > Hi, > This is a silly patch that moves the following assignments outside > if-else conditionals, > refs_node = node; > last_visited_node++; > resulting in empty else block. > OK for trunk ? > > Thanks, > Prathamesh
> diff --git a/gcc/lto/lto-partition.c b/gcc/lto/lto-partition.c > index 9eb63c2..dca59af 100644 > --- a/gcc/lto/lto-partition.c > +++ b/gcc/lto/lto-partition.c > @@ -568,14 +568,13 @@ lto_balanced_map (int n_lto_partitions) > symtab_node *snode = lto_symtab_encoder_deref (partition->encoder, > last_visited_node); > > + refs_node = snode; > + last_visited_node++; > + > if (cgraph_node *node = dyn_cast <cgraph_node *> (snode)) > { > struct cgraph_edge *edge; > > - refs_node = node; > - > - last_visited_node++; > - > gcc_assert (node->definition || node->weakref); > > /* Compute boundary cost of callgraph edges. */ > @@ -614,11 +613,6 @@ lto_balanced_map (int n_lto_partitions) > cost += edge_cost; > } > } > - else > - { > - refs_node = snode; But this is snode, not node. > - last_visited_node++; > - } > > /* Compute boundary cost of IPA REF edges and at the same time look > into > variables referenced from current partition and try to add them. > */ Marek