gcc/
        * tree-ssa-propagate.h (typedef ssa_prop_visit_phi_fn): Strengthen
        type of parameter from gimple to gimple_phi.

        * tree-complex.c (complex_visit_phi): Update signature of callback
        implementation accordingly.
        * tree-ssa-ccp.c (ccp_visit_phi_node): Likewise.
        * tree-ssa-copy.c (copy_prop_visit_phi_node): Likewise.
        * tree-vrp.c (vrp_visit_phi_node): Likewise.

        * tree-ssa-propagate.c (simulate_stmt): Add a checked cast to
        gimple_phi when invoking the ssa_prop_visit_phi callback.
---
 gcc/tree-complex.c       | 2 +-
 gcc/tree-ssa-ccp.c       | 2 +-
 gcc/tree-ssa-copy.c      | 2 +-
 gcc/tree-ssa-propagate.c | 2 +-
 gcc/tree-ssa-propagate.h | 2 +-
 gcc/tree-vrp.c           | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/gcc/tree-complex.c b/gcc/tree-complex.c
index 848b5a6..03e8864 100644
--- a/gcc/tree-complex.c
+++ b/gcc/tree-complex.c
@@ -401,7 +401,7 @@ complex_visit_stmt (gimple stmt, edge *taken_edge_p 
ATTRIBUTE_UNUSED,
 /* Evaluate a PHI node against the complex lattice defined above.  */
 
 static enum ssa_prop_result
-complex_visit_phi (gimple phi)
+complex_visit_phi (gimple_phi phi)
 {
   complex_lattice_t new_l, old_l;
   unsigned int ver;
diff --git a/gcc/tree-ssa-ccp.c b/gcc/tree-ssa-ccp.c
index 3d05258..ead744a 100644
--- a/gcc/tree-ssa-ccp.c
+++ b/gcc/tree-ssa-ccp.c
@@ -998,7 +998,7 @@ ccp_lattice_meet (prop_value_t *val1, prop_value_t *val2)
    of the PHI node that are incoming via executable edges.  */
 
 static enum ssa_prop_result
-ccp_visit_phi_node (gimple phi)
+ccp_visit_phi_node (gimple_phi phi)
 {
   unsigned i;
   prop_value_t *old_val, new_val;
diff --git a/gcc/tree-ssa-copy.c b/gcc/tree-ssa-copy.c
index 0dd5e14..4895ac9 100644
--- a/gcc/tree-ssa-copy.c
+++ b/gcc/tree-ssa-copy.c
@@ -342,7 +342,7 @@ copy_prop_visit_stmt (gimple stmt, edge *taken_edge_p, tree 
*result_p)
    set it to be the value of the LHS of PHI.  */
 
 static enum ssa_prop_result
-copy_prop_visit_phi_node (gimple phi)
+copy_prop_visit_phi_node (gimple_phi phi)
 {
   enum ssa_prop_result retval;
   unsigned i;
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c
index 783b651..dd2536a 100644
--- a/gcc/tree-ssa-propagate.c
+++ b/gcc/tree-ssa-propagate.c
@@ -322,7 +322,7 @@ simulate_stmt (gimple stmt)
 
   if (gimple_code (stmt) == GIMPLE_PHI)
     {
-      val = ssa_prop_visit_phi (stmt);
+      val = ssa_prop_visit_phi (stmt->as_a_gimple_phi ());
       output_name = gimple_phi_result (stmt);
     }
   else
diff --git a/gcc/tree-ssa-propagate.h b/gcc/tree-ssa-propagate.h
index 1b8bf90..925f995 100644
--- a/gcc/tree-ssa-propagate.h
+++ b/gcc/tree-ssa-propagate.h
@@ -63,7 +63,7 @@ enum ssa_prop_result {
 
 /* Call-back functions used by the value propagation engine.  */
 typedef enum ssa_prop_result (*ssa_prop_visit_stmt_fn) (gimple, edge *, tree 
*);
-typedef enum ssa_prop_result (*ssa_prop_visit_phi_fn) (gimple);
+typedef enum ssa_prop_result (*ssa_prop_visit_phi_fn) (gimple_phi);
 typedef bool (*ssa_prop_fold_stmt_fn) (gimple_stmt_iterator *gsi);
 typedef tree (*ssa_prop_get_value_fn) (tree);
 
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index ffcf220..ad90ebc 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -8331,7 +8331,7 @@ vrp_meet (value_range_t *vr0, value_range_t *vr1)
    value ranges, set a new range for the LHS of PHI.  */
 
 static enum ssa_prop_result
-vrp_visit_phi_node (gimple phi)
+vrp_visit_phi_node (gimple_phi phi)
 {
   size_t i;
   tree lhs = PHI_RESULT (phi);
-- 
1.7.11.7

Reply via email to