summaryrefslogtreecommitdiff
path: root/gcc/tree-cfg.c
diff options
context:
space:
mode:
authoraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-05 17:20:26 +0000
committeraldyh <aldyh@138bc75d-0d04-0410-961f-82ee72b054a4>2008-03-05 17:20:26 +0000
commitd03ba86f0cc373f30e8838c73e598cc767491b92 (patch)
tree581bbd0f679ef1aaf0ad42e7d8f0b56620d3e34a /gcc/tree-cfg.c
parent7dfd128a2ffae583f0348aabdabb7eab57d6d6f3 (diff)
downloadgcc-d03ba86f0cc373f30e8838c73e598cc767491b92.tar.gz
* cfg.c: Include tree-flow.h.
(remove_edge_raw): Call redirect_edge_var_map_clear. (redirect_edge_succ_nodup): Call redirect_edge_var_map_dup. * tree-flow-inline.h (redirect_edge_var_map_def): New. (redirect_edge_var_map_result): New. * tree-cfgcleanup.c (remove_forwarder_block_with_phi): Replace PENDING_STMT use with redirect_edge_var_map_*. * tree-ssa.c (edge_var_maps): New definition. (redirect_edge_var_map_add): New. (redirect_edge_var_map_clear): New. (redirect_edge_var_map_dup): New. (redirect_edge_var_map_vector): New. (redirect_edge_var_map_destroy): New. (ssa_redirect_edge): Replace PENDING_STMT use with redirect_edge_var_map_*. (flush_pending_stmts): Same. (delete_tree_ssa): Destroy edge var map. * tree-flow.h (struct _edge_var_map): New. Define edge_var_map vector type. Declare redirect_edge_var_map_* prototypes. * Makefile.in (cfg.o): Depend on TREE_FLOW_H. * tree-cfg.c (reinstall_phi_args): Replace PENDING_STMT use with redirect_edge_var_map_*. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@132903 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r--gcc/tree-cfg.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c
index abc1672fffb..71a6c9ad667 100644
--- a/gcc/tree-cfg.c
+++ b/gcc/tree-cfg.c
@@ -3031,24 +3031,28 @@ bsi_insert_on_edge_immediate (edge e, tree stmt)
static void
reinstall_phi_args (edge new_edge, edge old_edge)
{
- tree var, phi;
+ tree phi;
+ edge_var_map_vector v;
+ edge_var_map *vm;
+ int i;
- if (!PENDING_STMT (old_edge))
+ v = redirect_edge_var_map_vector (old_edge);
+ if (!v)
return;
- for (var = PENDING_STMT (old_edge), phi = phi_nodes (new_edge->dest);
- var && phi;
- var = TREE_CHAIN (var), phi = PHI_CHAIN (phi))
+ for (i = 0, phi = phi_nodes (new_edge->dest);
+ VEC_iterate (edge_var_map, v, i, vm) && phi;
+ i++, phi = PHI_CHAIN (phi))
{
- tree result = TREE_PURPOSE (var);
- tree arg = TREE_VALUE (var);
+ tree result = redirect_edge_var_map_result (vm);
+ tree arg = redirect_edge_var_map_def (vm);
gcc_assert (result == PHI_RESULT (phi));
add_phi_arg (phi, arg, new_edge);
}
- PENDING_STMT (old_edge) = NULL;
+ redirect_edge_var_map_clear (old_edge);
}
/* Returns the basic block after which the new basic block created