]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
2012-07-16 Dehao Chen <dehao@google.com>
authordehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Jul 2012 11:08:21 +0000 (11:08 +0000)
committerdehao <dehao@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 16 Jul 2012 11:08:21 +0000 (11:08 +0000)
Revert
2012-07-10  Dehao Chen  <dehao@google.com>

* tree.h (phi_arg_d): New field.
* tree-flow-inline.h (gimple_phi_arg_block): New function.
(gimple_phi_arg_block_from_edge): New function.
(gimple_phi_arg_set_block): New function.
(gimple_phi_arg_has_block): New function.
(redirect_edge_var_map_block): New function.
* tree-flow.h (_edge_var_map): New field.
* tree-ssa-live.c (remove_unused_locals): Mark phi_arg's block as used.
* tree-eh.c (cleanup_empty_eh_merge_phis): Add block debug info for
redirect_edge_var_map_add.
* tree-outof-ssa.c (_elim_graph): New field.
(insert_partition_copy_on_edge): New parameter.
(insert_value_copy_on_edge): New parameter.
(insert_rtx_to_part_on_edge): New parameter.
(insert_part_to_rtx_on_edge): New parameter.
(elim_graph_add_edge): New parameter.
(elim_graph_remove_succ_edge): New parameter.
(FOR_EACH_ELIM_GRAPH_SUCC): New parameter.
(FOR_EACH_ELIM_GRAPH_PRED): New parameter.
(new_elim_graph): Add block debug info.
(clear_elim_graph): Likewise.
(delete_elim_graph): Likewise.
(elim_graph_add_node): Likewise.
(elim_graph_add_edge): Likewise.
(elim_graph_remove_succ_edge): Likewise.
(eliminate_build): Likewise.
(elim_forward): Likewise.
(elim_unvisited_predecessor): Likewise.
(elim_backward): Likewise.
(elim_create): Likewise.
(eliminate_phi): Likewise.
(insert_backedge_copies): Likewise.
* tree-into-ssa.c (insert_phi_nodes_for): Add block debug info for
add_phi_arg.
(rewrite_add_phi_arguments): Likewise.
* tree-ssa-loop-im.c (execute_sm_if_changed): Likewise.
* tree-ssa-tail-merge.c (replace_block_by): Likewise.
* tree-ssa-threadupdate.c (copy_phi_args): Likewise.
* tree-loop-distribution.c (update_phis_for_loop_copy): Likewise.
* tree-ssa-loop-manip.c (create_iv): Likewise.
(add_exit_phis_edge): Likewise.
(split_loop_exit_edge): Likewise.
(copy_phi_node_args): Likewise.
(tree_transform_and_unroll_loop): Likewise.
* value-prof.c (gimple_ic): Likewise.
(gimple_stringop_fixed_value): Likewise.
* tree-tailcall.c (add_successor_phi_arg): Likewise.
(eliminate_tail_call): Likewise.
(create_tailcall_accumulator): Likewise.
(tree_optimize_tail_calls_1): Likewise.
* tree-phinodes.c (add_phi_arg): Likewise.
(make_phi_node): Likewise.
(resize_phi_node): Likewise.
(remove_phi_arg_num): Likewise.
* omp-low.c (expand_parallel_call): Likewise.
(expand_omp_for_static_chunk): Likewise.
* tree-vect-loop-manip.c (slpeel_update_phis_for_duplicate_loop):
Likewise.
(slpeel_update_phi_nodes_for_guard1): Likewise.
(slpeel_update_phi_nodes_for_guard2): Likewise.
(slpeel_tree_duplicate_loop_to_edge_cfg): Likewise.
(set_prologue_iterations): Likewise.
(slpeel_tree_peel_loop_to_edge): Likewise.
(vect_loop_versioning): Likewise.
* tree-parloops.c (create_phi_for_local_result): Likewise.
(transform_to_exit_first_loop): Likewise.
(create_parallel_loop): Likewise.
* ipa-split.c (split_function): Likewise.
* tree-vect-loop.c (get_initial_def_for_induction): Likewise.
(vect_create_epilog_for_reduction): Likewise.
* tree-vect-data-refs.c (vect_setup_realignment): Likewise.
* graphite-scop-detection.c (canonicalize_loop_closed_ssa): Likewise.
* tree-ssa-phiopt.c (cond_store_replacement): Likewise.
(cond_if_else_store_replacement_1): Likewise.
* tree-cfgcleanup.c (remove_forwarder_block): Likewise.
(remove_forwarder_block_with_phi): Likewise.
* tree-ssa-pre.c (insert_into_preds_of_block): Likewise.
* tree-predcom.c (initialize_root_vars): Likewise.
(initialize_root_vars_lm): Likewise.
* sese.c (sese_add_exit_phis_edge): Likewise.
* tree-ssa-dce.c (forward_edge_to_pdom): Likewise.
* tree-ssa.c (flush_pending_stmts): Likewise.
(redirect_edge_var_map_add): Likewise.
(ssa_redirect_edge): Likewise.
* gimple-streamer-in.c (input_phi): Likewise.
* tree-vect-stmts.c (vectorizable_load): Likewise.
* tree-inline.c (copy_phis_for_bb): Likewise.
* tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
* tree-switch-conversion.c (fix_phi_nodes): Likewise.
* tree-cfg.c (reinstall_phi_args): Likewise.
(gimple_make_forwarder_block): Likewise.
(add_phi_args_after_copy_edge): Likewise.
(gimple_duplicate_sese_tail): Likewise.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@189518 138bc75d-0d04-0410-961f-82ee72b054a4

38 files changed:
gcc/ChangeLog
gcc/gimple-streamer-in.c
gcc/graphite-scop-detection.c
gcc/ipa-split.c
gcc/omp-low.c
gcc/sese.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/debug_info_inline.c [deleted file]
gcc/tree-cfg.c
gcc/tree-cfgcleanup.c
gcc/tree-eh.c
gcc/tree-flow-inline.h
gcc/tree-flow.h
gcc/tree-inline.c
gcc/tree-into-ssa.c
gcc/tree-loop-distribution.c
gcc/tree-outof-ssa.c
gcc/tree-parloops.c
gcc/tree-phinodes.c
gcc/tree-predcom.c
gcc/tree-ssa-dce.c
gcc/tree-ssa-live.c
gcc/tree-ssa-loop-im.c
gcc/tree-ssa-loop-manip.c
gcc/tree-ssa-phiopt.c
gcc/tree-ssa-phiprop.c
gcc/tree-ssa-pre.c
gcc/tree-ssa-tail-merge.c
gcc/tree-ssa-threadupdate.c
gcc/tree-ssa.c
gcc/tree-switch-conversion.c
gcc/tree-tailcall.c
gcc/tree-vect-data-refs.c
gcc/tree-vect-loop-manip.c
gcc/tree-vect-loop.c
gcc/tree-vect-stmts.c
gcc/tree.h
gcc/value-prof.c

index 2decc3d7f13a804d72ac1aae148d1bf84dbd50aa..0bae7affffb4695a5185c853526c0809ec7e6a71 100644 (file)
@@ -1,3 +1,102 @@
+2012-07-16  Dehao Chen  <dehao@google.com>
+
+       Revert
+       2012-07-10  Dehao Chen  <dehao@google.com>
+
+       * tree.h (phi_arg_d): New field.
+       * tree-flow-inline.h (gimple_phi_arg_block): New function.
+       (gimple_phi_arg_block_from_edge): New function.
+       (gimple_phi_arg_set_block): New function.
+       (gimple_phi_arg_has_block): New function.
+       (redirect_edge_var_map_block): New function.
+       * tree-flow.h (_edge_var_map): New field.
+       * tree-ssa-live.c (remove_unused_locals): Mark phi_arg's block as used.
+       * tree-eh.c (cleanup_empty_eh_merge_phis): Add block debug info for
+       redirect_edge_var_map_add.
+       * tree-outof-ssa.c (_elim_graph): New field.
+       (insert_partition_copy_on_edge): New parameter.
+       (insert_value_copy_on_edge): New parameter.
+       (insert_rtx_to_part_on_edge): New parameter.
+       (insert_part_to_rtx_on_edge): New parameter.
+       (elim_graph_add_edge): New parameter.
+       (elim_graph_remove_succ_edge): New parameter.
+       (FOR_EACH_ELIM_GRAPH_SUCC): New parameter.
+       (FOR_EACH_ELIM_GRAPH_PRED): New parameter.
+       (new_elim_graph): Add block debug info.
+       (clear_elim_graph): Likewise.
+       (delete_elim_graph): Likewise.
+       (elim_graph_add_node): Likewise.
+       (elim_graph_add_edge): Likewise.
+       (elim_graph_remove_succ_edge): Likewise.
+       (eliminate_build): Likewise.
+       (elim_forward): Likewise.
+       (elim_unvisited_predecessor): Likewise.
+       (elim_backward): Likewise.
+       (elim_create): Likewise.
+       (eliminate_phi): Likewise.
+       (insert_backedge_copies): Likewise.
+       * tree-into-ssa.c (insert_phi_nodes_for): Add block debug info for
+       add_phi_arg.
+       (rewrite_add_phi_arguments): Likewise.
+       * tree-ssa-loop-im.c (execute_sm_if_changed): Likewise.
+       * tree-ssa-tail-merge.c (replace_block_by): Likewise.
+       * tree-ssa-threadupdate.c (copy_phi_args): Likewise.
+       * tree-loop-distribution.c (update_phis_for_loop_copy): Likewise.
+       * tree-ssa-loop-manip.c (create_iv): Likewise.
+       (add_exit_phis_edge): Likewise.
+       (split_loop_exit_edge): Likewise.
+       (copy_phi_node_args): Likewise.
+       (tree_transform_and_unroll_loop): Likewise.
+       * value-prof.c (gimple_ic): Likewise.
+       (gimple_stringop_fixed_value): Likewise.
+       * tree-tailcall.c (add_successor_phi_arg): Likewise.
+       (eliminate_tail_call): Likewise.
+       (create_tailcall_accumulator): Likewise.
+       (tree_optimize_tail_calls_1): Likewise.
+       * tree-phinodes.c (add_phi_arg): Likewise.
+       (make_phi_node): Likewise.
+       (resize_phi_node): Likewise.
+       (remove_phi_arg_num): Likewise.
+       * omp-low.c (expand_parallel_call): Likewise.
+       (expand_omp_for_static_chunk): Likewise.
+       * tree-vect-loop-manip.c (slpeel_update_phis_for_duplicate_loop):
+       Likewise.
+       (slpeel_update_phi_nodes_for_guard1): Likewise.
+       (slpeel_update_phi_nodes_for_guard2): Likewise.
+       (slpeel_tree_duplicate_loop_to_edge_cfg): Likewise.
+       (set_prologue_iterations): Likewise.
+       (slpeel_tree_peel_loop_to_edge): Likewise.
+       (vect_loop_versioning): Likewise.
+       * tree-parloops.c (create_phi_for_local_result): Likewise.
+       (transform_to_exit_first_loop): Likewise.
+       (create_parallel_loop): Likewise.
+       * ipa-split.c (split_function): Likewise.
+       * tree-vect-loop.c (get_initial_def_for_induction): Likewise.
+       (vect_create_epilog_for_reduction): Likewise.
+       * tree-vect-data-refs.c (vect_setup_realignment): Likewise.
+       * graphite-scop-detection.c (canonicalize_loop_closed_ssa): Likewise.
+       * tree-ssa-phiopt.c (cond_store_replacement): Likewise.
+       (cond_if_else_store_replacement_1): Likewise.
+       * tree-cfgcleanup.c (remove_forwarder_block): Likewise.
+       (remove_forwarder_block_with_phi): Likewise.
+       * tree-ssa-pre.c (insert_into_preds_of_block): Likewise.
+       * tree-predcom.c (initialize_root_vars): Likewise.
+       (initialize_root_vars_lm): Likewise.
+       * sese.c (sese_add_exit_phis_edge): Likewise.
+       * tree-ssa-dce.c (forward_edge_to_pdom): Likewise.
+       * tree-ssa.c (flush_pending_stmts): Likewise.
+       (redirect_edge_var_map_add): Likewise.
+       (ssa_redirect_edge): Likewise.
+       * gimple-streamer-in.c (input_phi): Likewise.
+       * tree-vect-stmts.c (vectorizable_load): Likewise.
+       * tree-inline.c (copy_phis_for_bb): Likewise.
+       * tree-ssa-phiprop.c (phiprop_insert_phi): Likewise.
+       * tree-switch-conversion.c (fix_phi_nodes): Likewise.
+       * tree-cfg.c (reinstall_phi_args): Likewise.
+       (gimple_make_forwarder_block): Likewise.
+       (add_phi_args_after_copy_edge): Likewise.
+       (gimple_duplicate_sese_tail): Likewise.
+
 2012-07-16 Sergey Melnikov <sergey.melnikov@intel.com>
 
        * config/i386/i386.md (stack_protect_set): Disable the pattern
index 42ea7cf9fd32bd8a11ae668618e449a94fdd068c..1b6bf4bd6d78cdadb482d98b5a84971aba2fcc0f 100644 (file)
@@ -67,7 +67,7 @@ input_phi (struct lto_input_block *ib, basic_block bb, struct data_in *data_in,
            break;
          }
 
-      add_phi_arg (result, def, e, arg_loc, NULL);
+      add_phi_arg (result, def, e, arg_loc);
     }
 
   return result;
index 89cd00da96573dfb98456ee4b23dc923f20c1678..cfa06ab60c5b9929abf1ff5d5e5951b61fba37c0 100644 (file)
@@ -1331,7 +1331,7 @@ canonicalize_loop_closed_ssa (loop_p loop)
                                          gimple_phi_result_ptr (close_phi));
                add_phi_arg (close_phi, arg,
                             gimple_phi_arg_edge (close_phi, 0),
-                            UNKNOWN_LOCATION, NULL);
+                            UNKNOWN_LOCATION);
                use_p = gimple_phi_arg_imm_use_ptr (phi, i);
                replace_exp (use_p, res);
                update_stmt (phi);
index 0595ab11d6a40dc34f43a9a921c8e1a545434dd0..1997f62538bffd8ff8372745bf72e13473d10c3c 100644 (file)
@@ -1286,8 +1286,7 @@ split_function (struct split_point *split_point)
                  /* When there is PHI, just update its value.  */
                  if (TREE_CODE (retval) == SSA_NAME
                      && !gsi_end_p (psi))
-                   add_phi_arg (gsi_stmt (psi), retval, e, UNKNOWN_LOCATION,
-                                NULL);
+                   add_phi_arg (gsi_stmt (psi), retval, e, UNKNOWN_LOCATION);
                  /* Otherwise update the return BB itself.
                     find_return_bb allows at most one assignment to return value,
                     so update first statement.  */
index ff7c10e1fbfff61cd1a38c4c785b640d00a4d335..d51715e2843d40de9e3c0faafe27fa82cdf0dff2 100644 (file)
@@ -3061,8 +3061,8 @@ expand_parallel_call (struct omp_region *region, basic_block bb,
            {
              gimple phi = create_phi_node (tmp_join, bb);
              SSA_NAME_DEF_STMT (tmp_join) = phi;
-             add_phi_arg (phi, tmp_then, e_then, UNKNOWN_LOCATION, NULL);
-             add_phi_arg (phi, tmp_else, e_else, UNKNOWN_LOCATION, NULL);
+             add_phi_arg (phi, tmp_then, e_then, UNKNOWN_LOCATION);
+             add_phi_arg (phi, tmp_else, e_else, UNKNOWN_LOCATION);
            }
 
          val = tmp_join;
@@ -4597,7 +4597,6 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
        {
          gimple nphi;
          source_location locus;
-         tree block;
 
          phi = gsi_stmt (psi);
          t = gimple_phi_result (phi);
@@ -4607,16 +4606,14 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
 
          t = PHI_ARG_DEF_FROM_EDGE (phi, se);
          locus = gimple_phi_arg_location_from_edge (phi, se);
-         block = gimple_phi_arg_block_from_edge (phi, se);
 
          /* A special case -- fd->loop.v is not yet computed in
             iter_part_bb, we need to use v_extra instead.  */
          if (t == fd->loop.v)
            t = v_extra;
-         add_phi_arg (nphi, t, ene, locus, block);
+         add_phi_arg (nphi, t, ene, locus);
          locus = redirect_edge_var_map_location (vm);
-         block = redirect_edge_var_map_block (vm);
-         add_phi_arg (nphi, redirect_edge_var_map_def (vm), re, locus, block);
+         add_phi_arg (nphi, redirect_edge_var_map_def (vm), re, locus);
        }
       gcc_assert (!gsi_end_p (psi) && i == VEC_length (edge_var_map, head));
       redirect_edge_var_map_clear (re);
@@ -4632,9 +4629,9 @@ expand_omp_for_static_chunk (struct omp_region *region, struct omp_for_data *fd)
       phi = create_phi_node (trip_main, iter_part_bb);
       SSA_NAME_DEF_STMT (trip_main) = phi;
       add_phi_arg (phi, trip_back, single_succ_edge (trip_update_bb),
-                  UNKNOWN_LOCATION, NULL);
+                  UNKNOWN_LOCATION);
       add_phi_arg (phi, trip_init, single_succ_edge (entry_bb),
-                  UNKNOWN_LOCATION, NULL);
+                  UNKNOWN_LOCATION);
     }
 
   set_immediate_dominator (CDI_DOMINATORS, trip_update_bb, cont_bb);
index dbfa8ed75b7efdeca47f2555c81631d9e7b09cab..03b9f3d62aa50afc0d20e0c6f3cda8721ee8c5d4 100644 (file)
@@ -349,8 +349,8 @@ sese_add_exit_phis_edge (basic_block exit, tree use, edge false_e, edge true_e)
 
   create_new_def_for (gimple_phi_result (phi), phi,
                      gimple_phi_result_ptr (phi));
-  add_phi_arg (phi, use, false_e, UNKNOWN_LOCATION, NULL);
-  add_phi_arg (phi, use, true_e, UNKNOWN_LOCATION, NULL);
+  add_phi_arg (phi, use, false_e, UNKNOWN_LOCATION);
+  add_phi_arg (phi, use, true_e, UNKNOWN_LOCATION);
 }
 
 /* Insert in the block BB phi nodes for variables defined in REGION
index 45f45317a025546f22879a5d043cf50063eb4ee3..239baafb8183e6553f1a9ae7cde6b7337bf7a271 100644 (file)
@@ -1,3 +1,10 @@
+2012-07-16  Dehao Chen  <dehao@google.com>
+
+       Revert
+       2012-07-10  Dehao Chen  <dehao@google.com>
+
+       * gcc.dg/debug_info_inline.c: New test.
+
 2012-07-16  Janus Weil  <janus@gcc.gnu.org>
 
        PR fortran/53956
diff --git a/gcc/testsuite/gcc.dg/debug_info_inline.c b/gcc/testsuite/gcc.dg/debug_info_inline.c
deleted file mode 100644 (file)
index a915261..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -g" } */
-
-int g, a;
-
-static int foo ()
-{
-  int ret = a;
-
-  if (g > -10)
-    return 10;
-
-  return ret;
-}
-
-int bar()
-{
-  if (foo())
-    return 0;
-  else
-    return 1;
-}
-
-/* { dg-final { scan-assembler "loc 1 19 0\n.*\n.LBB" } } */
index d8a396f90eadfe43abb6a1f0b3b34d83ede99c0b..decd1d6dffc1d45527fc1b99fc4b0dff82fdb22f 100644 (file)
@@ -2553,8 +2553,7 @@ reinstall_phi_args (edge new_edge, edge old_edge)
 
       gcc_assert (result == gimple_phi_result (phi));
 
-      add_phi_arg (phi, arg, new_edge, redirect_edge_var_map_location (vm),
-                  redirect_edge_var_map_block (vm));
+      add_phi_arg (phi, arg, new_edge, redirect_edge_var_map_location (vm));
     }
 
   redirect_edge_var_map_clear (old_edge);
@@ -5016,7 +5015,7 @@ gimple_make_forwarder_block (edge fallthru)
       SSA_NAME_DEF_STMT (var) = new_phi;
       gimple_phi_set_result (phi, make_ssa_name (SSA_NAME_VAR (var), phi));
       add_phi_arg (new_phi, gimple_phi_result (phi), fallthru,
-                  UNKNOWN_LOCATION, NULL);
+                  UNKNOWN_LOCATION);
     }
 
   /* Add the arguments we have stored on edges.  */
@@ -5477,8 +5476,7 @@ add_phi_args_after_copy_edge (edge e_copy)
       phi_copy = gsi_stmt (psi_copy);
       def = PHI_ARG_DEF_FROM_EDGE (phi, e);
       add_phi_arg (phi_copy, def, e_copy,
-                  gimple_phi_arg_location_from_edge (phi, e),
-                  gimple_phi_arg_block_from_edge (phi, e));
+                  gimple_phi_arg_location_from_edge (phi, e));
     }
 }
 
@@ -5853,8 +5851,7 @@ gimple_duplicate_sese_tail (edge entry ATTRIBUTE_UNUSED, edge exit ATTRIBUTE_UNU
          {
            phi = gsi_stmt (psi);
            def = PHI_ARG_DEF (phi, nexits[0]->dest_idx);
-           add_phi_arg (phi, def, e, gimple_phi_arg_location_from_edge (phi, e),
-                        gimple_phi_arg_block_from_edge (phi, e));
+           add_phi_arg (phi, def, e, gimple_phi_arg_location_from_edge (phi, e));
          }
       }
   e = redirect_edge_and_branch (nexits[1], nexits[0]->dest);
@@ -7427,8 +7424,7 @@ gimple_lv_adjust_loop_header_phi (basic_block first, basic_block second,
       phi1 = gsi_stmt (psi1);
       phi2 = gsi_stmt (psi2);
       def = PHI_ARG_DEF (phi2, e2->dest_idx);
-      add_phi_arg (phi1, def, e, gimple_phi_arg_location_from_edge (phi2, e2),
-                  gimple_phi_arg_block_from_edge (phi2, e2));
+      add_phi_arg (phi1, def, e, gimple_phi_arg_location_from_edge (phi2, e2));
     }
 }
 
index a5fbd756b265710e09913c108e88e9e569c4a435..78583c47e1b7fb11a22fa9716b6ae104a9a32ac2 100644 (file)
@@ -444,9 +444,7 @@ remove_forwarder_block (basic_block bb)
            {
              gimple phi = gsi_stmt (gsi);
              source_location l = gimple_phi_arg_location_from_edge (phi, succ);
-             tree b = gimple_phi_arg_block_from_edge (phi, succ);
-             add_phi_arg (phi, gimple_phi_arg_def (phi, succ->dest_idx), s, l,
-                          b);
+             add_phi_arg (phi, gimple_phi_arg_def (phi, succ->dest_idx), s, l);
            }
        }
     }
@@ -873,7 +871,6 @@ remove_forwarder_block_with_phi (basic_block bb)
          gimple phi = gsi_stmt (gsi);
          tree def = gimple_phi_arg_def (phi, succ->dest_idx);
          source_location locus = gimple_phi_arg_location_from_edge (phi, succ);
-         tree block = gimple_phi_arg_block_from_edge (phi, succ);
 
          if (TREE_CODE (def) == SSA_NAME)
            {
@@ -894,13 +891,12 @@ remove_forwarder_block_with_phi (basic_block bb)
                    {
                      def = new_arg;
                      locus = redirect_edge_var_map_location (vm);
-                     block = redirect_edge_var_map_block (vm);
                      break;
                    }
                }
            }
 
-         add_phi_arg (phi, def, s, locus, block);
+         add_phi_arg (phi, def, s, locus);
        }
 
       redirect_edge_var_map_clear (e);
index 246b34c47ca3794ef20cea7899f3bb8e389c6d92..3b35ca4286200c7dd506aa1b1cfb3511cb2e8ad2 100644 (file)
@@ -3853,15 +3853,13 @@ cleanup_empty_eh_merge_phis (basic_block new_bb, basic_block old_bb,
          FOR_EACH_EDGE (e, ei, old_bb->preds)
            {
              location_t oloc;
-             tree oblock;
              tree oop;
 
              if ((e->flags & EDGE_EH) == 0)
                continue;
              oop = gimple_phi_arg_def (ophi, e->dest_idx);
              oloc = gimple_phi_arg_location (ophi, e->dest_idx);
-             oblock = gimple_phi_arg_block (ophi, e->dest_idx);
-             redirect_edge_var_map_add (e, nresult, oop, oloc, oblock);
+             redirect_edge_var_map_add (e, nresult, oop, oloc);
            }
        }
       /* If we didn't find the PHI, but it's a VOP, remember to rename
@@ -3876,9 +3874,8 @@ cleanup_empty_eh_merge_phis (basic_block new_bb, basic_block old_bb,
        {
          location_t nloc
            = gimple_phi_arg_location (nphi, old_bb_out->dest_idx);
-         tree nblock = gimple_phi_arg_block (nphi, old_bb_out->dest_idx);
          FOR_EACH_EDGE (e, ei, old_bb->preds)
-           redirect_edge_var_map_add (e, nresult, nop, nloc, nblock);
+           redirect_edge_var_map_add (e, nresult, nop, nloc);
        }
     }
 
index 3e9ecfcd521216ec1b3eb7a905b9d4c70e63b9e6..748a97c236e88f6a3122b2813e1f00e6577010a6 100644 (file)
@@ -483,22 +483,6 @@ gimple_phi_arg_location_from_edge (gimple gs, edge e)
   return gimple_phi_arg (gs, e->dest_idx)->locus;
 }
 
-/* Return the block location of gimple argument I of phi node GS.  */
-
-static inline tree
-gimple_phi_arg_block (gimple gs, size_t i)
-{
-  return gimple_phi_arg (gs, i)->block;
-}
-
-/* Return the block location of the argument on edge E of phi node GS.  */
-
-static inline tree
-gimple_phi_arg_block_from_edge (gimple gs, edge e)
-{
-  return gimple_phi_arg (gs, e->dest_idx)->block;
-}
-
 /* Set the source location of gimple argument I of phi node GS to LOC.  */
 
 static inline void
@@ -507,14 +491,6 @@ gimple_phi_arg_set_location (gimple gs, size_t i, source_location loc)
   gimple_phi_arg (gs, i)->locus = loc;
 }
 
-/* Set the block location of gimple argument I of phi node GS to BLOCK.  */
-
-static inline void
-gimple_phi_arg_set_block (gimple gs, size_t i, tree block)
-{
-  gimple_phi_arg (gs, i)->block = block;
-}
-
 /* Return TRUE if argument I of phi node GS has a location record.  */
 
 static inline bool
@@ -523,13 +499,6 @@ gimple_phi_arg_has_location (gimple gs, size_t i)
   return gimple_phi_arg_location (gs, i) != UNKNOWN_LOCATION;
 }
 
-/* Return TRUE if argument I of phi node GS has a location record.  */
-
-static inline bool
-gimple_phi_arg_has_block (gimple gs, size_t i)
-{
-  return gimple_phi_arg_block (gs, i) != NULL;
-}
 
 /* Return the PHI nodes for basic block BB, or NULL if there are no
    PHI nodes.  */
@@ -1248,13 +1217,6 @@ redirect_edge_var_map_location (edge_var_map *v)
   return v->locus;
 }
 
-/* Given an edge_var_map V, return the PHI arg location.  */
-
-static inline tree
-redirect_edge_var_map_block (edge_var_map *v)
-{
-  return v->block;
-}
 
 /* Return an SSA_NAME node for variable VAR defined in statement STMT
    in function cfun.  */
index 3bcb6f5ccb8b3b32e3d005a4d040fa920c51dbc4..8f7d336037e77c42ceb363057fe37443342bbe7e 100644 (file)
@@ -507,7 +507,7 @@ extern void find_referenced_vars_in (gimple);
 extern void reserve_phi_args_for_new_edge (basic_block);
 extern void add_phi_node_to_bb (gimple phi, basic_block bb);
 extern gimple create_phi_node (tree, basic_block);
-extern void add_phi_arg (gimple, tree, edge, source_location, tree);
+extern void add_phi_arg (gimple, tree, edge, source_location);
 extern void remove_phi_args (edge);
 extern void remove_phi_node (gimple_stmt_iterator *, bool);
 extern void remove_phi_nodes (basic_block);
@@ -531,7 +531,6 @@ struct _edge_var_map {
   tree result;                 /* PHI result.  */
   tree def;                    /* PHI arg definition.  */
   source_location locus;        /* PHI arg location.  */
-  tree block;                  /* PHI arg block.  */
 };
 typedef struct _edge_var_map edge_var_map;
 
@@ -542,7 +541,7 @@ DEF_VEC_ALLOC_O(edge_var_map, heap);
 typedef VEC(edge_var_map, heap) *edge_var_map_vector;
 
 extern void init_tree_ssa (struct function *);
-extern void redirect_edge_var_map_add (edge, tree, tree, source_location, tree);
+extern void redirect_edge_var_map_add (edge, tree, tree, source_location);
 extern void redirect_edge_var_map_clear (edge);
 extern void redirect_edge_var_map_dup (edge, edge);
 extern edge_var_map_vector redirect_edge_var_map_vector (edge);
index f576ee5f168cd0c12f73c8197fbf1652a836f5c8..061f4c5a99763124c5d16b8f5c21942d4a7d1eb3 100644 (file)
@@ -2019,7 +2019,6 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id)
              tree arg;
              tree new_arg;
              tree block = id->block;
-             tree arg_block, *n;
              edge_iterator ei2;
 
              /* When doing partial cloning, we allow PHIs on the entry block
@@ -2047,15 +2046,8 @@ copy_phis_for_bb (basic_block bb, copy_body_data *id)
                  gsi_insert_seq_on_edge (new_edge, stmts);
                  inserted = true;
                }
-             n = (tree *) pointer_map_contains (id->decl_map,
-               gimple_phi_arg_block_from_edge (phi, old_edge));
-             if (n)
-               arg_block = *n;
-             else
-               arg_block = NULL;
              add_phi_arg (new_phi, new_arg, new_edge,
-                          gimple_phi_arg_location_from_edge (phi, old_edge),
-                          arg_block);
+                          gimple_phi_arg_location_from_edge (phi, old_edge));
            }
        }
     }
index b9e52c856ff285b660ab28e0decea45c5ce1b5c7..102b699c5008b2a53479658cb26ef4af7e820bc3 100644 (file)
@@ -1119,7 +1119,7 @@ insert_phi_nodes_for (tree var, bitmap phi_insertion_points, bool update_p)
             renamer will use the symbol on the LHS to get its
             reaching definition.  */
          FOR_EACH_EDGE (e, ei, bb->preds)
-           add_phi_arg (phi, var, e, UNKNOWN_LOCATION, NULL);
+           add_phi_arg (phi, var, e, UNKNOWN_LOCATION);
        }
       else
        {
@@ -1474,8 +1474,7 @@ rewrite_add_phi_arguments (basic_block bb)
          phi = gsi_stmt (gsi);
          currdef = get_reaching_def (SSA_NAME_VAR (gimple_phi_result (phi)));
          stmt = SSA_NAME_DEF_STMT (currdef);
-         add_phi_arg (phi, currdef, e, gimple_location (stmt),
-                      gimple_block (stmt));
+         add_phi_arg (phi, currdef, e, gimple_location (stmt));
        }
     }
 }
index 459b1e2cb1f98536a080128261025043a20aee5b..58ed12b1e69003953921a1552cd05da28be24034 100644 (file)
@@ -171,7 +171,6 @@ update_phis_for_loop_copy (struct loop *orig_loop, struct loop *new_loop)
     {
       tree def;
       source_location locus;
-      tree block;
       gimple phi_new = gsi_stmt (si_new);
       gimple phi_orig = gsi_stmt (si_orig);
 
@@ -179,14 +178,12 @@ update_phis_for_loop_copy (struct loop *orig_loop, struct loop *new_loop)
         associated with the entry of NEW_LOOP)  */
       def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_entry_e);
       locus = gimple_phi_arg_location_from_edge (phi_orig, orig_entry_e);
-      block = gimple_phi_arg_block_from_edge (phi_orig, orig_entry_e);
-      add_phi_arg (phi_new, def, new_loop_entry_e, locus, block);
+      add_phi_arg (phi_new, def, new_loop_entry_e, locus);
 
       /* Add the second phi argument for the phi in NEW_LOOP (the one
         associated with the latch of NEW_LOOP)  */
       def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch);
       locus = gimple_phi_arg_location_from_edge (phi_orig, orig_loop_latch);
-      block = gimple_phi_arg_block_from_edge (phi_orig, orig_loop_latch);
 
       if (TREE_CODE (def) == SSA_NAME)
        {
@@ -201,8 +198,7 @@ update_phis_for_loop_copy (struct loop *orig_loop, struct loop *new_loop)
        /* Could be an integer.  */
        new_ssa_name = def;
 
-      add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop), locus,
-                  block);
+      add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop), locus);
     }
 }
 
index 96d2ecd4e127f31152b4327de343083f19202dff..f52b26030121e0d87922cc127c99e21436c6e6c5 100644 (file)
@@ -78,9 +78,6 @@ typedef struct _elim_graph {
   /* Source locus on each edge */
   VEC(source_location,heap) *edge_locus;
 
-  /* Block location on each edge.  */
-  VEC(tree,heap) *edge_block;
-
   /* Visited vector.  */
   sbitmap visited;
 
@@ -99,9 +96,6 @@ typedef struct _elim_graph {
 
   /* Source locations for any constant copies.  */
   VEC(source_location,heap) *copy_locus;
-
-  /* Block locations for any constant copies.  */
-  VEC(tree,heap) *copy_block;
 } *elim_graph;
 
 
@@ -180,8 +174,7 @@ emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp)
 /* Insert a copy instruction from partition SRC to DEST onto edge E.  */
 
 static void
-insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus,
-                              tree block)
+insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus)
 {
   tree var;
   rtx seq;
@@ -201,10 +194,7 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus,
   set_location_for_edge (e);
   /* If a locus is provided, override the default.  */
   if (locus)
-    {
-      set_curr_insn_source_location (locus);
-      set_curr_insn_block (block);
-    }
+    set_curr_insn_source_location (locus);
 
   var = partition_to_var (SA.map, src);
   seq = emit_partition_copy (SA.partition_to_pseudo[dest],
@@ -219,8 +209,7 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus,
    onto edge E.  */
 
 static void
-insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus,
-                          tree block)
+insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus)
 {
   rtx seq, x;
   enum machine_mode dest_mode, src_mode;
@@ -242,10 +231,7 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus,
   set_location_for_edge (e);
   /* If a locus is provided, override the default.  */
   if (locus)
-    {
-      set_curr_insn_source_location (locus);
-      set_curr_insn_block (block);
-    }
+    set_curr_insn_source_location (locus);
 
   start_sequence ();
 
@@ -283,7 +269,7 @@ insert_value_copy_on_edge (edge e, int dest, tree src, source_location locus,
 
 static void
 insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp,
-                           source_location locus, tree block)
+                           source_location locus)
 {
   rtx seq;
   if (dump_file && (dump_flags & TDF_DETAILS))
@@ -301,10 +287,7 @@ insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp,
   set_location_for_edge (e);
   /* If a locus is provided, override the default.  */
   if (locus)
-    {
-      set_curr_insn_source_location (locus);
-      set_curr_insn_block (block);
-    }
+    set_curr_insn_source_location (locus);
 
   /* We give the destination as sizeexp in case src/dest are BLKmode
      mems.  Usually we give the source.  As we result from SSA names
@@ -321,8 +304,7 @@ insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp,
    onto edge E.  */
 
 static void
-insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus,
-                           tree block)
+insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus)
 {
   tree var;
   rtx seq;
@@ -341,10 +323,7 @@ insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus,
   set_location_for_edge (e);
   /* If a locus is provided, override the default.  */
   if (locus)
-    {
-      set_curr_insn_source_location (locus);
-      set_curr_insn_block (block);
-    }
+    set_curr_insn_source_location (locus);
 
   var = partition_to_var (SA.map, src);
   seq = emit_partition_copy (dest,
@@ -368,10 +347,8 @@ new_elim_graph (int size)
   g->const_dests = VEC_alloc (int, heap, 20);
   g->const_copies = VEC_alloc (tree, heap, 20);
   g->copy_locus = VEC_alloc (source_location, heap, 10);
-  g->copy_block = VEC_alloc (tree, heap, 10);
   g->edge_list = VEC_alloc (int, heap, 20);
   g->edge_locus = VEC_alloc (source_location, heap, 10);
-  g->edge_block = VEC_alloc (tree, heap, 10);
   g->stack = VEC_alloc (int, heap, 30);
 
   g->visited = sbitmap_alloc (size);
@@ -388,7 +365,6 @@ clear_elim_graph (elim_graph g)
   VEC_truncate (int, g->nodes, 0);
   VEC_truncate (int, g->edge_list, 0);
   VEC_truncate (source_location, g->edge_locus, 0);
-  VEC_truncate (tree, g->edge_block, 0);
 }
 
 
@@ -404,9 +380,7 @@ delete_elim_graph (elim_graph g)
   VEC_free (int, heap, g->const_dests);
   VEC_free (int, heap, g->nodes);
   VEC_free (source_location, heap, g->copy_locus);
-  VEC_free (tree, heap, g->copy_block);
   VEC_free (source_location, heap, g->edge_locus);
-  VEC_free (tree, heap, g->edge_block);
 
   free (g);
 }
@@ -439,13 +413,11 @@ elim_graph_add_node (elim_graph g, int node)
 /* Add the edge PRED->SUCC to graph G.  */
 
 static inline void
-elim_graph_add_edge (elim_graph g, int pred, int succ, source_location locus,
-                    tree block)
+elim_graph_add_edge (elim_graph g, int pred, int succ, source_location locus)
 {
   VEC_safe_push (int, heap, g->edge_list, pred);
   VEC_safe_push (int, heap, g->edge_list, succ);
   VEC_safe_push (source_location, heap, g->edge_locus, locus);
-  VEC_safe_push (tree, heap, g->edge_block, block);
 }
 
 
@@ -453,8 +425,7 @@ elim_graph_add_edge (elim_graph g, int pred, int succ, source_location locus,
    return the successor node.  -1 is returned if there is no such edge.  */
 
 static inline int
-elim_graph_remove_succ_edge (elim_graph g, int node, source_location *locus,
-                            tree *block)
+elim_graph_remove_succ_edge (elim_graph g, int node, source_location *locus)
 {
   int y;
   unsigned x;
@@ -466,12 +437,9 @@ elim_graph_remove_succ_edge (elim_graph g, int node, source_location *locus,
        VEC_replace (int, g->edge_list, x + 1, -1);
        *locus = VEC_index (source_location, g->edge_locus, x / 2);
        VEC_replace (source_location, g->edge_locus, x / 2, UNKNOWN_LOCATION);
-       *block = VEC_index (tree, g->edge_block, x / 2);
-       VEC_replace (tree, g->edge_block, x / 2, NULL);
        return y;
       }
   *locus = UNKNOWN_LOCATION;
-  *block = NULL;
   return -1;
 }
 
@@ -480,7 +448,7 @@ elim_graph_remove_succ_edge (elim_graph g, int node, source_location *locus,
    edge list.  VAR will hold the partition number found.  CODE is the
    code fragment executed for every node found.  */
 
-#define FOR_EACH_ELIM_GRAPH_SUCC(GRAPH, NODE, VAR, LOCUS, BLOCK, CODE) \
+#define FOR_EACH_ELIM_GRAPH_SUCC(GRAPH, NODE, VAR, LOCUS, CODE)                \
 do {                                                                   \
   unsigned x_;                                                         \
   int y_;                                                              \
@@ -492,8 +460,6 @@ do {                                                                        \
       (void) ((VAR) = VEC_index (int, (GRAPH)->edge_list, x_ + 1));    \
       (void) ((LOCUS) = VEC_index (source_location,                    \
                                   (GRAPH)->edge_locus, x_ / 2));       \
-      (void) ((BLOCK) = VEC_index (tree,                               \
-                                  (GRAPH)->edge_block, x_ / 2));       \
       CODE;                                                            \
     }                                                                  \
 } while (0)
@@ -503,7 +469,7 @@ do {                                                                        \
    GRAPH.  VAR will hold the partition number found.  CODE is the
    code fragment executed for every node found.  */
 
-#define FOR_EACH_ELIM_GRAPH_PRED(GRAPH, NODE, VAR, LOCUS, BLOCK, CODE) \
+#define FOR_EACH_ELIM_GRAPH_PRED(GRAPH, NODE, VAR, LOCUS, CODE)                \
 do {                                                                   \
   unsigned x_;                                                         \
   int y_;                                                              \
@@ -515,8 +481,6 @@ do {                                                                        \
       (void) ((VAR) = VEC_index (int, (GRAPH)->edge_list, x_));                \
       (void) ((LOCUS) = VEC_index (source_location,                    \
                                   (GRAPH)->edge_locus, x_ / 2));       \
-      (void) ((BLOCK) = VEC_index (tree,                               \
-                                  (GRAPH)->edge_block, x_ / 2));       \
       CODE;                                                            \
     }                                                                  \
 } while (0)
@@ -547,7 +511,6 @@ eliminate_build (elim_graph g)
     {
       gimple phi = gsi_stmt (gsi);
       source_location locus;
-      tree block;
 
       p0 = var_to_partition (g->map, gimple_phi_result (phi));
       /* Ignore results which are not in partitions.  */
@@ -556,7 +519,6 @@ eliminate_build (elim_graph g)
 
       Ti = PHI_ARG_DEF (phi, g->e->dest_idx);
       locus = gimple_phi_arg_location_from_edge (phi, g->e);
-      block = gimple_phi_arg_block_from_edge (phi, g->e);
 
       /* If this argument is a constant, or a SSA_NAME which is being
         left in SSA form, just queue a copy to be emitted on this
@@ -570,7 +532,6 @@ eliminate_build (elim_graph g)
          VEC_safe_push (int, heap, g->const_dests, p0);
          VEC_safe_push (tree, heap, g->const_copies, Ti);
          VEC_safe_push (source_location, heap, g->copy_locus, locus);
-         VEC_safe_push (tree, heap, g->copy_block, block);
        }
       else
         {
@@ -579,7 +540,7 @@ eliminate_build (elim_graph g)
            {
              eliminate_name (g, p0);
              eliminate_name (g, pi);
-             elim_graph_add_edge (g, p0, pi, locus, block);
+             elim_graph_add_edge (g, p0, pi, locus);
            }
        }
     }
@@ -593,10 +554,9 @@ elim_forward (elim_graph g, int T)
 {
   int S;
   source_location locus;
-  tree block;
 
   SET_BIT (g->visited, T);
-  FOR_EACH_ELIM_GRAPH_SUCC (g, T, S, locus, block,
+  FOR_EACH_ELIM_GRAPH_SUCC (g, T, S, locus,
     {
       if (!TEST_BIT (g->visited, S))
         elim_forward (g, S);
@@ -612,9 +572,8 @@ elim_unvisited_predecessor (elim_graph g, int T)
 {
   int P;
   source_location locus;
-  tree block;
 
-  FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, block,
+  FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus,
     {
       if (!TEST_BIT (g->visited, P))
         return 1;
@@ -629,15 +588,14 @@ elim_backward (elim_graph g, int T)
 {
   int P;
   source_location locus;
-  tree block;
 
   SET_BIT (g->visited, T);
-  FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, block,
+  FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus,
     {
       if (!TEST_BIT (g->visited, P))
         {
          elim_backward (g, P);
-         insert_partition_copy_on_edge (g->e, P, T, locus, block);
+         insert_partition_copy_on_edge (g->e, P, T, locus);
        }
     });
 }
@@ -666,7 +624,6 @@ elim_create (elim_graph g, int T)
 {
   int P, S;
   source_location locus;
-  tree block;
 
   if (elim_unvisited_predecessor (g, T))
     {
@@ -674,24 +631,23 @@ elim_create (elim_graph g, int T)
       rtx U = get_temp_reg (var);
       int unsignedsrcp = TYPE_UNSIGNED (TREE_TYPE (var));
 
-      insert_part_to_rtx_on_edge (g->e, U, T, UNKNOWN_LOCATION, NULL);
-      FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus, block,
+      insert_part_to_rtx_on_edge (g->e, U, T, UNKNOWN_LOCATION);
+      FOR_EACH_ELIM_GRAPH_PRED (g, T, P, locus,
        {
          if (!TEST_BIT (g->visited, P))
            {
              elim_backward (g, P);
-             insert_rtx_to_part_on_edge (g->e, P, U, unsignedsrcp, locus,
-                                         block);
+             insert_rtx_to_part_on_edge (g->e, P, U, unsignedsrcp, locus);
            }
        });
     }
   else
     {
-      S = elim_graph_remove_succ_edge (g, T, &locus, &block);
+      S = elim_graph_remove_succ_edge (g, T, &locus);
       if (S != -1)
        {
          SET_BIT (g->visited, T);
-         insert_partition_copy_on_edge (g->e, T, S, locus, block);
+         insert_partition_copy_on_edge (g->e, T, S, locus);
        }
     }
 }
@@ -706,7 +662,6 @@ eliminate_phi (edge e, elim_graph g)
 
   gcc_assert (VEC_length (tree, g->const_copies) == 0);
   gcc_assert (VEC_length (source_location, g->copy_locus) == 0);
-  gcc_assert (VEC_length (tree, g->copy_block) == 0);
 
   /* Abnormal edges already have everything coalesced.  */
   if (e->flags & EDGE_ABNORMAL)
@@ -744,13 +699,11 @@ eliminate_phi (edge e, elim_graph g)
       int dest;
       tree src;
       source_location locus;
-      tree block;
 
       src = VEC_pop (tree, g->const_copies);
       dest = VEC_pop (int, g->const_dests);
       locus = VEC_pop (source_location, g->copy_locus);
-      block = VEC_pop (tree, g->copy_block);
-      insert_value_copy_on_edge (e, dest, src, locus, block);
+      insert_value_copy_on_edge (e, dest, src, locus);
     }
 }
 
@@ -1135,12 +1088,8 @@ insert_backedge_copies (void)
 
                  /* copy location if present.  */
                  if (gimple_phi_arg_has_location (phi, i))
-                   {
-                     gimple_set_location (stmt,
-                                          gimple_phi_arg_location (phi, i));
-                     gimple_set_block (stmt,
-                                       gimple_phi_arg_block (phi, i));
-                   }
+                   gimple_set_location (stmt,
+                                        gimple_phi_arg_location (phi, i));
 
                  /* Insert the new statement into the block and update
                     the PHI node.  */
index 0dd163275c888d1918c517c88f17d720484b77a4..86036b426391ddd82ee4f889120ef49a94e4195f 100644 (file)
@@ -998,7 +998,6 @@ create_phi_for_local_result (void **slot, void *data)
   basic_block store_bb;
   tree local_res;
   source_location locus;
-  tree block;
 
   /* STORE_BB is the block where the phi
      should be stored.  It is the destination of the loop exit.
@@ -1018,12 +1017,11 @@ create_phi_for_local_result (void **slot, void *data)
     = make_ssa_name (SSA_NAME_VAR (gimple_assign_lhs (reduc->reduc_stmt)),
                     NULL);
   locus = gimple_location (reduc->reduc_stmt);
-  block = gimple_block (reduc->reduc_stmt);
   new_phi = create_phi_node (local_res, store_bb);
   SSA_NAME_DEF_STMT (local_res) = new_phi;
-  add_phi_arg (new_phi, reduc->init, e, locus, block);
+  add_phi_arg (new_phi, reduc->init, e, locus);
   add_phi_arg (new_phi, gimple_assign_lhs (reduc->reduc_stmt),
-              FALLTHRU_EDGE (loop->latch), locus, block);
+              FALLTHRU_EDGE (loop->latch), locus);
   reduc->new_phi = new_phi;
 
   return 1;
@@ -1502,7 +1500,7 @@ transform_to_exit_first_loop (struct loop *loop, htab_t reduction_list, tree nit
       SET_PHI_RESULT (phi, t);
       nphi = create_phi_node (res, orig_header);
       SSA_NAME_DEF_STMT (res) = nphi;
-      add_phi_arg (nphi, t, hpred, UNKNOWN_LOCATION, NULL);
+      add_phi_arg (nphi, t, hpred, UNKNOWN_LOCATION);
 
       if (res == control)
        {
@@ -1658,7 +1656,6 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data,
   for (gsi = gsi_start_phis (ex_bb); !gsi_end_p (gsi); gsi_next (&gsi))
     {
       source_location locus;
-      tree block;
       tree def;
       phi = gsi_stmt (gsi);
       stmt = SSA_NAME_DEF_STMT (PHI_ARG_DEF_FROM_EDGE (phi, exit));
@@ -1666,14 +1663,11 @@ create_parallel_loop (struct loop *loop, tree loop_fn, tree data,
       def = PHI_ARG_DEF_FROM_EDGE (stmt, loop_preheader_edge (loop));
       locus = gimple_phi_arg_location_from_edge (stmt,
                                                 loop_preheader_edge (loop));
-      block = gimple_phi_arg_block_from_edge (stmt,
-                                             loop_preheader_edge (loop));
-      add_phi_arg (phi, def, guard, locus, block);
+      add_phi_arg (phi, def, guard, locus);
 
       def = PHI_ARG_DEF_FROM_EDGE (stmt, loop_latch_edge (loop));
       locus = gimple_phi_arg_location_from_edge (stmt, loop_latch_edge (loop));
-      block = gimple_phi_arg_block_from_edge (stmt, loop_latch_edge (loop));
-      add_phi_arg (phi, def, end, locus, block);
+      add_phi_arg (phi, def, end, locus);
     }
   e = redirect_edge_and_branch (exit, nexit->dest);
   PENDING_STMT (e) = NULL;
index e52af31bededb144fafcf368c77f0bf14dfecbb5..6408a52529806c8f9bb7b1d8ca58f09602e34ed5 100644 (file)
@@ -205,7 +205,6 @@ make_phi_node (tree var, int len)
       use_operand_p  imm;
 
       gimple_phi_arg_set_location (phi, i, UNKNOWN_LOCATION);
-      gimple_phi_arg_set_block (phi, i ,NULL);
       imm = gimple_phi_arg_imm_use_ptr (phi, i);
       imm->use = gimple_phi_arg_def_ptr (phi, i);
       imm->prev = NULL;
@@ -276,7 +275,6 @@ resize_phi_node (gimple phi, size_t len)
       use_operand_p imm;
 
       gimple_phi_arg_set_location (new_phi, i, UNKNOWN_LOCATION);
-      gimple_phi_arg_set_block (new_phi, i, NULL);
       imm = gimple_phi_arg_imm_use_ptr (new_phi, i);
       imm->use = gimple_phi_arg_def_ptr (new_phi, i);
       imm->prev = NULL;
@@ -364,7 +362,7 @@ create_phi_node (tree var, basic_block bb)
    PHI points to the reallocated phi node when we return.  */
 
 void
-add_phi_arg (gimple phi, tree def, edge e, source_location locus, tree block)
+add_phi_arg (gimple phi, tree def, edge e, source_location locus)
 {
   basic_block bb = e->dest;
 
@@ -388,7 +386,6 @@ add_phi_arg (gimple phi, tree def, edge e, source_location locus, tree block)
 
   SET_PHI_ARG_DEF (phi, e->dest_idx, def);
   gimple_phi_arg_set_location (phi, e->dest_idx, locus);
-  gimple_phi_arg_set_block (phi, e->dest_idx, block);
 }
 
 
@@ -420,8 +417,6 @@ remove_phi_arg_num (gimple phi, int i)
       /* Move the location as well.  */
       gimple_phi_arg_set_location (phi, i,
                                   gimple_phi_arg_location (phi, num_elem - 1));
-      gimple_phi_arg_set_block (phi, i,
-                               gimple_phi_arg_block (phi, num_elem - 1));
     }
 
   /* Shrink the vector and return.  Note that we do not have to clear
index 42d2a29ba6f0c370c0fa04b315cbaf701e9aa133..310fe3bd1d7c6d9e33e8675084ea8cb104d23ec5 100644 (file)
@@ -1531,8 +1531,8 @@ initialize_root_vars (struct loop *loop, chain_p chain, bitmap tmp_vars)
 
       phi = create_phi_node (var, loop->header);
       SSA_NAME_DEF_STMT (var) = phi;
-      add_phi_arg (phi, init, entry, UNKNOWN_LOCATION, NULL);
-      add_phi_arg (phi, next, latch, UNKNOWN_LOCATION, NULL);
+      add_phi_arg (phi, init, entry, UNKNOWN_LOCATION);
+      add_phi_arg (phi, next, latch, UNKNOWN_LOCATION);
     }
 }
 
@@ -1595,8 +1595,8 @@ initialize_root_vars_lm (struct loop *loop, dref root, bool written,
       next = VEC_index (tree, *vars, 1);
       phi = create_phi_node (var, loop->header);
       SSA_NAME_DEF_STMT (var) = phi;
-      add_phi_arg (phi, init, entry, UNKNOWN_LOCATION, NULL);
-      add_phi_arg (phi, next, latch, UNKNOWN_LOCATION, NULL);
+      add_phi_arg (phi, init, entry, UNKNOWN_LOCATION);
+      add_phi_arg (phi, next, latch, UNKNOWN_LOCATION);
     }
   else
     {
index 42888b4f90dc55a3f528608327cc46a2a7510d39..8763cfb28d2b8ded3aff1c65c06a1ab36c68ac92 100644 (file)
@@ -1129,7 +1129,6 @@ forward_edge_to_pdom (edge e, basic_block post_dom_bb)
          gimple phi = gsi_stmt (gsi);
          tree op;
          source_location locus;
-         tree block;
 
          /* PHIs for virtuals have no control dependency relation on them.
             We are lost here and must force renaming of the symbol.  */
@@ -1149,8 +1148,7 @@ forward_edge_to_pdom (edge e, basic_block post_dom_bb)
 
          op = gimple_phi_arg_def (phi, e2->dest_idx);
          locus = gimple_phi_arg_location (phi, e2->dest_idx);
-         block = gimple_phi_arg_block (phi, e2->dest_idx);
-         add_phi_arg (phi, op, e, locus, block);
+         add_phi_arg (phi, op, e, locus);
          /* The resulting PHI if not dead can only be degenerate.  */
          gcc_assert (degenerate_phi_p (phi));
          gsi_next (&gsi);
index e0f9d9cb536ae90a332a25cdca485138d6e9c969..8f504f005fe39dfbde1817db95728e889561431c 100644 (file)
@@ -765,10 +765,6 @@ remove_unused_locals (void)
           FOR_EACH_PHI_ARG (arg_p, phi, i, SSA_OP_ALL_USES)
             {
              tree arg = USE_FROM_PTR (arg_p);
-             int index = PHI_ARG_INDEX_FROM_USE (arg_p);
-             tree block = gimple_phi_arg_block (phi, index);
-             if (block != NULL)
-               TREE_USED (block) = true;
              mark_all_vars_used (&arg, global_unused_vars);
             }
         }
index 6433cc2681bfef06fc7d0d4cd4beb51201d99a00..290cb7400a16a05ea44352512c5e1c3155341dcd 100644 (file)
@@ -2086,7 +2086,7 @@ execute_sm_if_changed (edge ex, tree mem, tree tmp_var, tree flag)
          if (gimple_phi_arg_edge (phi, i)->src == new_bb)
            {
              tree arg = gimple_phi_arg_def (phi, i);
-             add_phi_arg (phi, arg, then_old_edge, UNKNOWN_LOCATION, NULL);
+             add_phi_arg (phi, arg, then_old_edge, UNKNOWN_LOCATION);
              update_stmt (phi);
            }
       }
index 7d3cc2aa7437b2b13bf661ce5ba8022a4d1979e1..e2e76058251a13ccbada9c59e3fa6b0142df0922 100644 (file)
@@ -121,9 +121,8 @@ create_iv (tree base, tree step, tree var, struct loop *loop,
 
   stmt = create_phi_node (vb, loop->header);
   SSA_NAME_DEF_STMT (vb) = stmt;
-  add_phi_arg (stmt, initial, loop_preheader_edge (loop), UNKNOWN_LOCATION,
-              NULL);
-  add_phi_arg (stmt, va, loop_latch_edge (loop), UNKNOWN_LOCATION, NULL);
+  add_phi_arg (stmt, initial, loop_preheader_edge (loop), UNKNOWN_LOCATION);
+  add_phi_arg (stmt, va, loop_latch_edge (loop), UNKNOWN_LOCATION);
 }
 
 /* Add exit phis for the USE on EXIT.  */
@@ -153,7 +152,7 @@ add_exit_phis_edge (basic_block exit, tree use)
   create_new_def_for (gimple_phi_result (phi), phi,
                      gimple_phi_result_ptr (phi));
   FOR_EACH_EDGE (e, ei, exit->preds)
-    add_phi_arg (phi, use, e, UNKNOWN_LOCATION, NULL);
+    add_phi_arg (phi, use, e, UNKNOWN_LOCATION);
 }
 
 /* Add exit phis for VAR that is used in LIVEIN.
@@ -486,14 +485,12 @@ split_loop_exit_edge (edge exit)
   use_operand_p op_p;
   gimple_stmt_iterator psi;
   source_location locus;
-  tree block;
 
   for (psi = gsi_start_phis (dest); !gsi_end_p (psi); gsi_next (&psi))
     {
       phi = gsi_stmt (psi);
       op_p = PHI_ARG_DEF_PTR_FROM_EDGE (phi, single_succ_edge (bb));
       locus = gimple_phi_arg_location_from_edge (phi, single_succ_edge (bb));
-      block = gimple_phi_arg_block_from_edge (phi, single_succ_edge (bb));
 
       name = USE_FROM_PTR (op_p);
 
@@ -507,7 +504,7 @@ split_loop_exit_edge (edge exit)
       new_name = duplicate_ssa_name (name, NULL);
       new_phi = create_phi_node (new_name, bb);
       SSA_NAME_DEF_STMT (new_name) = new_phi;
-      add_phi_arg (new_phi, name, exit, locus, block);
+      add_phi_arg (new_phi, name, exit, locus);
       SET_USE (op_p, new_name);
     }
 
@@ -1027,8 +1024,8 @@ tree_transform_and_unroll_loop (struct loop *loop, unsigned factor,
       phi_rest = create_phi_node (new_init, rest);
       SSA_NAME_DEF_STMT (new_init) = phi_rest;
 
-      add_phi_arg (phi_rest, init, precond_edge, UNKNOWN_LOCATION, NULL);
-      add_phi_arg (phi_rest, next, new_exit, UNKNOWN_LOCATION, NULL);
+      add_phi_arg (phi_rest, init, precond_edge, UNKNOWN_LOCATION);
+      add_phi_arg (phi_rest, next, new_exit, UNKNOWN_LOCATION);
       SET_USE (op, new_init);
     }
 
index 51a21c0dc782d906cf98880ef2f5e1663bf619df..46d8a2c4e603bad441d96faebceedb539ba068b4 100644 (file)
@@ -1454,7 +1454,6 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb,
   gimple newphi, new_stmt;
   gimple_stmt_iterator gsi;
   source_location locus;
-  tree block;
 
   /* Check if middle_bb contains of only one store.  */
   if (!assign
@@ -1462,7 +1461,6 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb,
     return false;
 
   locus = gimple_location (assign);
-  block = gimple_block (assign);
   lhs = gimple_assign_lhs (assign);
   rhs = gimple_assign_rhs1 (assign);
   if (TREE_CODE (lhs) != MEM_REF
@@ -1496,15 +1494,14 @@ cond_store_replacement (basic_block middle_bb, basic_block join_bb,
   name = make_ssa_name (condstoretemp, new_stmt);
   gimple_assign_set_lhs (new_stmt, name);
   gimple_set_location (new_stmt, locus);
-  gimple_set_block (new_stmt, block);
   gsi_insert_on_edge (e1, new_stmt);
 
   /* 4) Create a PHI node at the join block, with one argument
         holding the old RHS, and the other holding the temporary
         where we stored the old memory contents.  */
   newphi = create_phi_node (condstoretemp, join_bb);
-  add_phi_arg (newphi, rhs, e0, locus, block);
-  add_phi_arg (newphi, name, e1, locus, block);
+  add_phi_arg (newphi, rhs, e0, locus);
+  add_phi_arg (newphi, name, e1, locus);
 
   lhs = unshare_expr (lhs);
   new_stmt = gimple_build_assign (lhs, PHI_RESULT (newphi));
@@ -1531,7 +1528,6 @@ cond_if_else_store_replacement_1 (basic_block then_bb, basic_block else_bb,
 {
   tree lhs_base, lhs, then_rhs, else_rhs;
   source_location then_locus, else_locus;
-  tree then_block, else_block;
   gimple_stmt_iterator gsi;
   gimple newphi, new_stmt;
 
@@ -1557,8 +1553,6 @@ cond_if_else_store_replacement_1 (basic_block then_bb, basic_block else_bb,
   else_rhs = gimple_assign_rhs1 (else_assign);
   then_locus = gimple_location (then_assign);
   else_locus = gimple_location (else_assign);
-  then_block = gimple_block (then_assign);
-  else_block = gimple_block (else_assign);
 
   /* Now we've checked the constraints, so do the transformation:
      1) Remove the stores.  */
@@ -1582,10 +1576,8 @@ cond_if_else_store_replacement_1 (basic_block then_bb, basic_block else_bb,
        holding the old RHS, and the other holding the temporary
        where we stored the old memory contents.  */
   newphi = create_phi_node (condstoretemp, join_bb);
-  add_phi_arg (newphi, then_rhs, EDGE_SUCC (then_bb, 0), then_locus,
-              then_block);
-  add_phi_arg (newphi, else_rhs, EDGE_SUCC (else_bb, 0), else_locus,
-              else_block);
+  add_phi_arg (newphi, then_rhs, EDGE_SUCC (then_bb, 0), then_locus);
+  add_phi_arg (newphi, else_rhs, EDGE_SUCC (else_bb, 0), else_locus);
 
   new_stmt = gimple_build_assign (lhs, PHI_RESULT (newphi));
 
index 2a52a27fb54f0f99f85a1ebbcf593daf3c4bcb98..306443725644e43a6aa741202c302b788ed11b77 100644 (file)
@@ -159,11 +159,9 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt,
       tree old_arg, new_var;
       gimple tmp;
       source_location locus;
-      tree block;
 
       old_arg = PHI_ARG_DEF_FROM_EDGE (phi, e);
       locus = gimple_phi_arg_location_from_edge (phi, e);
-      block = gimple_phi_arg_block_from_edge (phi, e);
       while (TREE_CODE (old_arg) == SSA_NAME
             && (SSA_NAME_VERSION (old_arg) >= n
                 || phivn[SSA_NAME_VERSION (old_arg)].value == NULL_TREE))
@@ -171,7 +169,6 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt,
          gimple def_stmt = SSA_NAME_DEF_STMT (old_arg);
          old_arg = gimple_assign_rhs1 (def_stmt);
          locus = gimple_location (def_stmt);
-         block = gimple_block (def_stmt);
        }
 
       if (TREE_CODE (old_arg) == SSA_NAME)
@@ -206,7 +203,6 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt,
          new_var = make_ssa_name (new_var, tmp);
          gimple_assign_set_lhs (tmp, new_var);
          gimple_set_location (tmp, locus);
-         gimple_set_block (tmp, block);
 
          gsi_insert_on_edge (e, tmp);
          update_stmt (tmp);
@@ -220,7 +216,7 @@ phiprop_insert_phi (basic_block bb, gimple phi, gimple use_stmt,
            }
        }
 
-      add_phi_arg (new_phi, new_var, e, locus, block);
+      add_phi_arg (new_phi, new_var, e, locus);
     }
 
   update_stmt (new_phi);
index 940e6873cb7ab47cd2c5dbb584618ad8b9bb1b27..9adf55d18cf24bc23ee03f1d159deb81c8885f10 100644 (file)
@@ -3403,10 +3403,10 @@ insert_into_preds_of_block (basic_block block, unsigned int exprnum,
       gcc_assert (get_expr_type (ae) == type
                  || useless_type_conversion_p (type, get_expr_type (ae)));
       if (ae->kind == CONSTANT)
-       add_phi_arg (phi, PRE_EXPR_CONSTANT (ae), pred, UNKNOWN_LOCATION, NULL);
+       add_phi_arg (phi, PRE_EXPR_CONSTANT (ae), pred, UNKNOWN_LOCATION);
       else
        add_phi_arg (phi, PRE_EXPR_NAME (avail[pred->src->index]), pred,
-                    UNKNOWN_LOCATION, NULL);
+                    UNKNOWN_LOCATION);
     }
 
   newphi = get_or_alloc_expr_for_name (gimple_phi_result (phi));
index 72eab9dee86a093c3db5a2a9300f9eec5f290fc4..9ec3b8a5091b1a6a67deef5157ee84be4d0bc4a5 100644 (file)
@@ -1466,7 +1466,7 @@ replace_block_by (basic_block bb1, basic_block bb2)
       bb2_phi = vop_phi (bb2);
 
       add_phi_arg (bb2_phi, SSA_NAME_VAR (gimple_phi_result (bb2_phi)),
-                  pred_edge, UNKNOWN_LOCATION, NULL);
+                  pred_edge, UNKNOWN_LOCATION);
     }
 
   bb2->frequency += bb1->frequency;
index a5e67e3362d68e9ae0210d82132827a4952391f5..65be1b926a63d004f637d32a7a8d33991baef434 100644 (file)
@@ -316,9 +316,7 @@ copy_phi_args (basic_block bb, edge src_e, edge tgt_e)
     {
       gimple phi = gsi_stmt (gsi);
       source_location locus = gimple_phi_arg_location (phi, src_indx);
-      tree block = gimple_phi_arg_block (phi, src_indx);
-      add_phi_arg (phi, gimple_phi_arg_def (phi, src_indx), tgt_e, locus,
-                  block);
+      add_phi_arg (phi, gimple_phi_arg_def (phi, src_indx), tgt_e, locus);
     }
 }
 
index f488ee4ee09844b8e3816c31249fcfc931ee9589..d545ffd21d29af126a1800f059b40d26e6f8704f 100644 (file)
@@ -51,8 +51,7 @@ static struct pointer_map_t *edge_var_maps;
 /* Add a mapping with PHI RESULT and PHI DEF associated with edge E.  */
 
 void
-redirect_edge_var_map_add (edge e, tree result, tree def, source_location locus,
-                          tree block)
+redirect_edge_var_map_add (edge e, tree result, tree def, source_location locus)
 {
   void **slot;
   edge_var_map_vector old_head, head;
@@ -71,7 +70,6 @@ redirect_edge_var_map_add (edge e, tree result, tree def, source_location locus,
   new_node.def = def;
   new_node.result = result;
   new_node.locus = locus;
-  new_node.block = block;
 
   VEC_safe_push (edge_var_map, heap, head, &new_node);
   if (old_head != head)
@@ -195,17 +193,15 @@ ssa_redirect_edge (edge e, basic_block dest)
     {
       tree def;
       source_location locus ;
-      tree block;
 
       phi = gsi_stmt (gsi);
       def = gimple_phi_arg_def (phi, e->dest_idx);
       locus = gimple_phi_arg_location (phi, e->dest_idx);
-      block = gimple_phi_arg_block (phi, e->dest_idx);
 
       if (def == NULL_TREE)
        continue;
 
-      redirect_edge_var_map_add (e, gimple_phi_result (phi), def, locus, block);
+      redirect_edge_var_map_add (e, gimple_phi_result (phi), def, locus);
     }
 
   e = redirect_edge_succ_nodup (e, dest);
@@ -238,8 +234,7 @@ flush_pending_stmts (edge e)
 
       phi = gsi_stmt (gsi);
       def = redirect_edge_var_map_def (vm);
-      add_phi_arg (phi, def, e, redirect_edge_var_map_location (vm),
-                  redirect_edge_var_map_block (vm));
+      add_phi_arg (phi, def, e, redirect_edge_var_map_location (vm));
     }
 
   redirect_edge_var_map_clear (e);
index b90d147e93cbec6a6ddb24aa11830bc749304e03..80457989a476f897ebcea486854243dd07bbfa9d 100644 (file)
@@ -1188,10 +1188,8 @@ fix_phi_nodes (edge e1f, edge e2f, basic_block bbf,
        !gsi_end_p (gsi); gsi_next (&gsi), i++)
     {
       gimple phi = gsi_stmt (gsi);
-      add_phi_arg (phi, info->target_inbound_names[i], e1f, UNKNOWN_LOCATION,
-                  NULL);
-      add_phi_arg (phi, info->target_outbound_names[i], e2f, UNKNOWN_LOCATION,
-                  NULL);
+      add_phi_arg (phi, info->target_inbound_names[i], e1f, UNKNOWN_LOCATION);
+      add_phi_arg (phi, info->target_outbound_names[i], e2f, UNKNOWN_LOCATION);
     }
 }
 
index 65025d9b68540b6d71fef3f3672cffba9b56a07c..02e1113f4832a0bd4991e81698be6755047c59e4 100644 (file)
@@ -597,7 +597,7 @@ add_successor_phi_arg (edge e, tree var, tree phi_arg)
       break;
 
   gcc_assert (!gsi_end_p (gsi));
-  add_phi_arg (gsi_stmt (gsi), phi_arg, e, UNKNOWN_LOCATION, NULL);
+  add_phi_arg (gsi_stmt (gsi), phi_arg, e, UNKNOWN_LOCATION);
 }
 
 /* Creates a GIMPLE statement which computes the operation specified by
@@ -853,7 +853,7 @@ eliminate_tail_call (struct tailcall *t)
       phi = gsi_stmt (gsi);
       gcc_assert (param == SSA_NAME_VAR (PHI_RESULT (phi)));
 
-      add_phi_arg (phi, arg, e, gimple_location (stmt), gimple_block (stmt));
+      add_phi_arg (phi, arg, e, gimple_location (stmt));
       gsi_next (&gsi);
     }
 
@@ -948,7 +948,7 @@ create_tailcall_accumulator (const char *label, basic_block bb, tree init)
   phi = create_phi_node (tmp, bb);
   /* RET_TYPE can be a float when -ffast-maths is enabled.  */
   add_phi_arg (phi, fold_convert (ret_type, init), single_pred_edge (bb),
-              UNKNOWN_LOCATION, NULL);
+              UNKNOWN_LOCATION);
   return PHI_RESULT (phi);
 }
 
@@ -1012,7 +1012,7 @@ tree_optimize_tail_calls_1 (bool opt_tailcalls)
                phi = create_phi_node (name, first);
                SSA_NAME_DEF_STMT (name) = phi;
                add_phi_arg (phi, new_name, single_pred_edge (first),
-                            EXPR_LOCATION (param), NULL);
+                            EXPR_LOCATION (param));
              }
          phis_constructed = true;
        }
index 6d64c7bb198cbdadeb603165ae4749789204e806..bfc983b878defcd48cbb63ff9b64d709d65613fe 100644 (file)
@@ -4433,7 +4433,7 @@ vect_setup_realignment (gimple stmt, gimple_stmt_iterator *gsi,
   msq = make_ssa_name (vec_dest, NULL);
   phi_stmt = create_phi_node (msq, containing_loop->header);
   SSA_NAME_DEF_STMT (msq) = phi_stmt;
-  add_phi_arg (phi_stmt, msq_init, pe, UNKNOWN_LOCATION, NULL);
+  add_phi_arg (phi_stmt, msq_init, pe, UNKNOWN_LOCATION);
 
   return msq;
 }
index 87afb6e15b1580501e0bf15cc955b1e1560b200a..9ac0d9a04ebd50cb92a834de55c040652d275e36 100644 (file)
@@ -294,15 +294,13 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
        gsi_next (&gsi_new), gsi_next (&gsi_orig))
     {
       source_location locus;
-      tree block;
       phi_new = gsi_stmt (gsi_new);
       phi_orig = gsi_stmt (gsi_orig);
 
       /* step 1.  */
       def = PHI_ARG_DEF_FROM_EDGE (phi_orig, entry_arg_e);
       locus = gimple_phi_arg_location_from_edge (phi_orig, entry_arg_e);
-      block = gimple_phi_arg_block_from_edge (phi_orig, entry_arg_e);
-      add_phi_arg (phi_new, def, new_loop_entry_e, locus, block);
+      add_phi_arg (phi_new, def, new_loop_entry_e, locus);
 
       /* step 2.  */
       def = PHI_ARG_DEF_FROM_EDGE (phi_orig, orig_loop_latch);
@@ -319,8 +317,7 @@ slpeel_update_phis_for_duplicate_loop (struct loop *orig_loop,
        }
 
       /* An ordinary ssa name defined in the loop.  */
-      add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop), locus,
-                  block);
+      add_phi_arg (phi_new, new_ssa_name, loop_latch_edge (new_loop), locus);
 
       /* Drop any debug references outside the loop, if they would
         become ill-formed SSA.  */
@@ -515,7 +512,6 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop,
        gsi_next (&gsi_orig), gsi_next (&gsi_update))
     {
       source_location loop_locus, guard_locus;
-      tree loop_block, guard_block;
       orig_phi = gsi_stmt (gsi_orig);
       update_phi = gsi_stmt (gsi_update);
 
@@ -531,19 +527,13 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop,
       loop_locus = gimple_phi_arg_location_from_edge (orig_phi,
                                                      EDGE_SUCC (loop->latch,
                                                                 0));
-      loop_block = gimple_phi_arg_block_from_edge (orig_phi,
-                                                  EDGE_SUCC (loop->latch,
-                                                             0));
-
       guard_arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, loop_preheader_edge (loop));
       guard_locus
        = gimple_phi_arg_location_from_edge (orig_phi,
                                             loop_preheader_edge (loop));
-      guard_block = gimple_phi_arg_block_from_edge (orig_phi,
-                                                   loop_preheader_edge (loop));
 
-      add_phi_arg (new_phi, loop_arg, new_exit_e, loop_locus, loop_block);
-      add_phi_arg (new_phi, guard_arg, guard_edge, guard_locus, guard_block);
+      add_phi_arg (new_phi, loop_arg, new_exit_e, loop_locus);
+      add_phi_arg (new_phi, guard_arg, guard_edge, guard_locus);
 
       /* 1.3. Update phi in successor block.  */
       gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == loop_arg
@@ -562,7 +552,7 @@ slpeel_update_phi_nodes_for_guard1 (edge guard_edge, struct loop *loop,
                                  *new_exit_bb);
 
       /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop.  */
-      add_phi_arg (new_phi, loop_arg, single_exit (loop), loop_locus, loop_block);
+      add_phi_arg (new_phi, loop_arg, single_exit (loop), loop_locus);
 
       /* 2.3. Update phi in successor of NEW_EXIT_BB:  */
       gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg);
@@ -690,8 +680,8 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop,
       if (new_name2)
         guard_arg = new_name2;
 
-      add_phi_arg (new_phi, loop_arg, new_exit_e, UNKNOWN_LOCATION, NULL);
-      add_phi_arg (new_phi, guard_arg, guard_edge, UNKNOWN_LOCATION, NULL);
+      add_phi_arg (new_phi, loop_arg, new_exit_e, UNKNOWN_LOCATION);
+      add_phi_arg (new_phi, guard_arg, guard_edge, UNKNOWN_LOCATION);
 
       /* 1.3. Update phi in successor block.  */
       gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi, e) == orig_def);
@@ -706,8 +696,7 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop,
                                  *new_exit_bb);
 
       /* 2.2. NEW_EXIT_BB has one incoming edge: the exit-edge of the loop.  */
-      add_phi_arg (new_phi, loop_arg, single_exit (loop), UNKNOWN_LOCATION,
-                  NULL);
+      add_phi_arg (new_phi, loop_arg, single_exit (loop), UNKNOWN_LOCATION);
 
       /* 2.3. Update phi in successor of NEW_EXIT_BB:  */
       gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, new_exit_e) == loop_arg);
@@ -744,7 +733,7 @@ slpeel_update_phi_nodes_for_guard2 (edge guard_edge, struct loop *loop,
       /* 3.3. GUARD_BB has one incoming edge:  */
       gcc_assert (EDGE_COUNT (guard_edge->src->preds) == 1);
       add_phi_arg (new_phi, arg, EDGE_PRED (guard_edge->src, 0),
-                  UNKNOWN_LOCATION, NULL);
+                  UNKNOWN_LOCATION);
 
       /* 3.4. Update phi in successor of GUARD_BB:  */
       gcc_assert (PHI_ARG_DEF_FROM_EDGE (update_phi2, guard_edge)
@@ -870,16 +859,14 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, edge e)
        {
          edge new_loop_exit_edge;
          source_location locus;
-         tree block;
 
          locus = gimple_phi_arg_location_from_edge (phi, single_exit (loop));
-         block = gimple_phi_arg_block_from_edge (phi, single_exit (loop));
          if (EDGE_SUCC (new_loop->header, 0)->dest == new_loop->latch)
            new_loop_exit_edge = EDGE_SUCC (new_loop->header, 1);
          else
            new_loop_exit_edge = EDGE_SUCC (new_loop->header, 0);
 
-         add_phi_arg (phi, phi_arg, new_loop_exit_edge, locus, block);
+         add_phi_arg (phi, phi_arg, new_loop_exit_edge, locus);
        }
     }
 
@@ -918,8 +905,7 @@ slpeel_tree_duplicate_loop_to_edge_cfg (struct loop *loop, edge e)
          phi_arg = PHI_ARG_DEF_FROM_EDGE (phi, entry_e);
          if (phi_arg)
            add_phi_arg (phi, phi_arg, new_exit_e,
-                        gimple_phi_arg_location_from_edge (phi, entry_e),
-                        gimple_phi_arg_block_from_edge (phi, entry_e));
+                        gimple_phi_arg_location_from_edge (phi, entry_e));
        }
 
       redirect_edge_and_branch_force (entry_e, new_loop->header);
@@ -1103,8 +1089,8 @@ set_prologue_iterations (basic_block bb_before_first_loop,
 
   newphi = create_phi_node (var, bb_before_first_loop);
   add_phi_arg (newphi, prologue_after_cost_adjust_name, e_fallthru,
-              UNKNOWN_LOCATION, NULL);
-  add_phi_arg (newphi, *first_niters, e_false, UNKNOWN_LOCATION, NULL);
+              UNKNOWN_LOCATION);
+  add_phi_arg (newphi, *first_niters, e_false, UNKNOWN_LOCATION);
 
   *first_niters = PHI_RESULT (newphi);
 }
@@ -1207,7 +1193,7 @@ slpeel_tree_peel_loop_to_edge (struct loop *loop,
                                          new_phi);
            use_operand_p use_p;
 
-           add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION, NULL);
+           add_phi_arg (new_phi, vop, exit_e, UNKNOWN_LOCATION);
            gimple_phi_set_result (new_phi, new_vop);
            FOR_EACH_IMM_USE_STMT (stmt, imm_iter, vop)
              if (stmt != new_phi && gimple_bb (stmt) != loop->header)
@@ -2565,8 +2551,7 @@ vect_loop_versioning (loop_vec_info loop_vinfo,
                                  new_exit_bb);
       arg = PHI_ARG_DEF_FROM_EDGE (orig_phi, e);
       add_phi_arg (new_phi, arg, new_exit_e,
-                  gimple_phi_arg_location_from_edge (orig_phi, e),
-                  gimple_phi_arg_block_from_edge (orig_phi, e));
+                  gimple_phi_arg_location_from_edge (orig_phi, e));
       adjust_phi_and_debug_stmts (orig_phi, e, PHI_RESULT (new_phi));
     }
 
index 4ddc9fbfe98386438f5bbd52f90ab13b4ad6bd3a..166b69d70e4604f7e3727cb7f45725b02be5023e 100644 (file)
@@ -3123,9 +3123,9 @@ get_initial_def_for_induction (gimple iv_phi)
                                                    NULL));
 
   /* Set the arguments of the phi node:  */
-  add_phi_arg (induction_phi, vec_init, pe, UNKNOWN_LOCATION, NULL);
+  add_phi_arg (induction_phi, vec_init, pe, UNKNOWN_LOCATION);
   add_phi_arg (induction_phi, vec_def, loop_latch_edge (iv_loop),
-              UNKNOWN_LOCATION, NULL);
+              UNKNOWN_LOCATION);
 
 
   /* In case that vectorization factor (VF) is bigger than the number
@@ -3609,13 +3609,13 @@ vect_create_epilog_for_reduction (VEC (tree, heap) *vect_defs, gimple stmt,
         {
           /* Set the loop-entry arg of the reduction-phi.  */
           add_phi_arg (phi, vec_init_def, loop_preheader_edge (loop),
-                       UNKNOWN_LOCATION, NULL);
+                       UNKNOWN_LOCATION);
 
           /* Set the loop-latch arg for the reduction-phi.  */
           if (j > 0)
             def = vect_get_vec_def_for_stmt_copy (vect_unknown_def_type, def);
 
-          add_phi_arg (phi, def, loop_latch_edge (loop), UNKNOWN_LOCATION, NULL);
+          add_phi_arg (phi, def, loop_latch_edge (loop), UNKNOWN_LOCATION);
 
           if (vect_print_dump_info (REPORT_DETAILS))
             {
@@ -4233,10 +4233,9 @@ vect_finalize_reduction:
                   /* Update phi node arguments with vs0 and vs2.  */
                   add_phi_arg (vect_phi, vect_phi_init,
                                loop_preheader_edge (outer_loop),
-                               UNKNOWN_LOCATION, NULL);
+                               UNKNOWN_LOCATION);
                   add_phi_arg (vect_phi, PHI_RESULT (inner_phi),
-                               loop_latch_edge (outer_loop), UNKNOWN_LOCATION,
-                              NULL);
+                               loop_latch_edge (outer_loop), UNKNOWN_LOCATION);
                   if (vect_print_dump_info (REPORT_DETAILS))
                     {
                       fprintf (vect_dump, "created double reduction phi "
index 19e36e013228c26e197351410b11dbaf5cdce046..671b229ef9a2b93b48d1fc7d8953024e3a103d32 100644 (file)
@@ -5060,7 +5060,7 @@ vectorizable_load (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt,
                      if (i == vec_num - 1 && j == ncopies - 1)
                        add_phi_arg (phi, lsq,
                                     loop_latch_edge (containing_loop),
-                                    UNKNOWN_LOCATION, NULL);
+                                    UNKNOWN_LOCATION);
                      msq = lsq;
                    }
                }
index 42d2e66762e393ea234af781c0efa65520715b4f..f5ffb1cd2a02f078ec8bd3164e95a4295e86fa2b 100644 (file)
@@ -2035,7 +2035,6 @@ struct GTY(()) phi_arg_d {
      pointer arithmetic with it.  See phi_arg_index_from_use.  */
   struct ssa_use_operand_d imm_use;
   tree def;
-  tree block;
   location_t locus;
 };
 
index 58ba30a11a53886edb285dce8fd3d3f7aa1ac6d9..69051c6a7884d1d4e0088b9a40910e2bb073ce90 100644 (file)
@@ -1245,12 +1245,10 @@ gimple_ic (gimple icall_stmt, struct cgraph_node *direct_call,
       SSA_NAME_DEF_STMT (result) = phi;
       gimple_call_set_lhs (icall_stmt,
                           make_ssa_name (SSA_NAME_VAR (result), icall_stmt));
-      add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION,
-                  NULL);
+      add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION);
       gimple_call_set_lhs (dcall_stmt,
                           make_ssa_name (SSA_NAME_VAR (result), dcall_stmt));
-      add_phi_arg (phi, gimple_call_lhs (dcall_stmt), e_dj, UNKNOWN_LOCATION,
-                  NULL);
+      add_phi_arg (phi, gimple_call_lhs (dcall_stmt), e_dj, UNKNOWN_LOCATION);
     }
 
   /* Build an EH edge for the direct call if necessary.  */
@@ -1478,12 +1476,10 @@ gimple_stringop_fixed_value (gimple vcall_stmt, tree icall_size, int prob,
       SSA_NAME_DEF_STMT (result) = phi;
       gimple_call_set_lhs (vcall_stmt,
                           make_ssa_name (SSA_NAME_VAR (result), vcall_stmt));
-      add_phi_arg (phi, gimple_call_lhs (vcall_stmt), e_vj, UNKNOWN_LOCATION,
-                  NULL);
+      add_phi_arg (phi, gimple_call_lhs (vcall_stmt), e_vj, UNKNOWN_LOCATION);
       gimple_call_set_lhs (icall_stmt,
                           make_ssa_name (SSA_NAME_VAR (result), icall_stmt));
-      add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION,
-                  NULL);
+      add_phi_arg (phi, gimple_call_lhs (icall_stmt), e_ij, UNKNOWN_LOCATION);
     }
 
   /* Because these are all string op builtins, they're all nothrow.  */