diff options
Diffstat (limited to 'gcc/tree-phinodes.c')
-rw-r--r-- | gcc/tree-phinodes.c | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/gcc/tree-phinodes.c b/gcc/tree-phinodes.c index 6408a525298..4bb10e59ac7 100644 --- a/gcc/tree-phinodes.c +++ b/gcc/tree-phinodes.c @@ -77,21 +77,17 @@ static unsigned long free_phinode_count; static int ideal_phi_node_len (int); -#ifdef GATHER_STATISTICS unsigned int phi_nodes_reused; unsigned int phi_nodes_created; -#endif /* Dump some simple statistics regarding the re-use of PHI nodes. */ -#ifdef GATHER_STATISTICS void phinodes_print_statistics (void) { fprintf (stderr, "PHI nodes allocated: %u\n", phi_nodes_created); fprintf (stderr, "PHI nodes reused: %u\n", phi_nodes_reused); } -#endif /* Allocate a PHI node with at least LEN arguments. If the free list happens to contain a PHI node with LEN arguments or more, return @@ -119,21 +115,19 @@ allocate_phi_node (size_t len) phi = VEC_pop (gimple, free_phinodes[bucket]); if (VEC_empty (gimple, free_phinodes[bucket])) VEC_free (gimple, gc, free_phinodes[bucket]); -#ifdef GATHER_STATISTICS - phi_nodes_reused++; -#endif + if (GATHER_STATISTICS) + phi_nodes_reused++; } else { phi = ggc_alloc_gimple_statement_d (size); -#ifdef GATHER_STATISTICS - phi_nodes_created++; + if (GATHER_STATISTICS) { enum gimple_alloc_kind kind = gimple_alloc_kind (GIMPLE_PHI); - gimple_alloc_counts[(int) kind]++; - gimple_alloc_sizes[(int) kind] += size; + phi_nodes_created++; + gimple_alloc_counts[(int) kind]++; + gimple_alloc_sizes[(int) kind] += size; } -#endif } return phi; @@ -195,7 +189,9 @@ make_phi_node (tree var, int len) gimple_init_singleton (phi); phi->gimple_phi.nargs = len; phi->gimple_phi.capacity = capacity; - if (TREE_CODE (var) == SSA_NAME) + if (!var) + ; + else if (TREE_CODE (var) == SSA_NAME) gimple_phi_set_result (phi, var); else gimple_phi_set_result (phi, make_ssa_name (var, phi)); |