diff options
author | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-17 17:47:47 +0000 |
---|---|---|
committer | rakdver <rakdver@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-06-17 17:47:47 +0000 |
commit | 3aaaf63fd1edbedcdd7c589ac28ac72328d71579 (patch) | |
tree | 4fcf2b4a4a942255116e20d36035b7def3cb2457 /gcc/tree-ssanames.c | |
parent | 5366615540879f7f51b8350e9985e5a722d26983 (diff) | |
download | gcc-3aaaf63fd1edbedcdd7c589ac28ac72328d71579.tar.gz |
PR tree-optimization/15991
* tree-cfg.c (tree_block_label): Export.
* tree-flow-inline.h (bsi_after_labels): New function.
* tree-flow.h (bsi_after_labels, tree_block_label): Declare.
* tree-ssa.c (propagate_into_addr): New function.
(replace_immediate_uses): Handle propagation of pointer constants.
(raise_value): Do not restrict propagation of pointer constants.
* tree-ssanames.c (duplicate_ssa_name): New function.
* tree.h (duplicate_ssa_name): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@83297 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r-- | gcc/tree-ssanames.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c index 6a0fda6006f..d4982706676 100644 --- a/gcc/tree-ssanames.c +++ b/gcc/tree-ssanames.c @@ -191,4 +191,29 @@ release_ssa_name (tree var) } } +/* Creates a duplicate of a ssa name NAME defined in statement STMT. */ + +tree +duplicate_ssa_name (tree name, tree stmt) +{ + tree new_name = make_ssa_name (SSA_NAME_VAR (name), stmt); + struct ptr_info_def *old_ptr_info = SSA_NAME_PTR_INFO (name); + struct ptr_info_def *new_ptr_info; + + if (!old_ptr_info) + return new_name; + + new_ptr_info = ggc_alloc (sizeof (struct ptr_info_def)); + *new_ptr_info = *old_ptr_info; + + if (old_ptr_info->pt_vars) + { + new_ptr_info->pt_vars = BITMAP_GGC_ALLOC (); + bitmap_copy (new_ptr_info->pt_vars, old_ptr_info->pt_vars); + } + + SSA_NAME_PTR_INFO (new_name) = new_ptr_info; + return new_name; +} + #include "gt-tree-ssanames.h" |