summaryrefslogtreecommitdiff
path: root/gcc/tree-flow-inline.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/tree-flow-inline.h')
-rw-r--r--gcc/tree-flow-inline.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/gcc/tree-flow-inline.h b/gcc/tree-flow-inline.h
index 748a97c236e..3e9ecfcd521 100644
--- a/gcc/tree-flow-inline.h
+++ b/gcc/tree-flow-inline.h
@@ -483,6 +483,22 @@ 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
@@ -491,6 +507,14 @@ 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
@@ -499,6 +523,13 @@ 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. */
@@ -1217,6 +1248,13 @@ 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. */