aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssanames.c
diff options
context:
space:
mode:
authorDorit Nuzman <dorit@gcc.gnu.org>2005-03-29 16:10:22 +0000
committerDorit Nuzman <dorit@gcc.gnu.org>2005-03-29 16:10:22 +0000
commit8bb46326fbe9a12661c8d936622ef09dee0eb6d9 (patch)
tree3b6e04f8be928ef4cb17b708c1898650d3020a60 /gcc/tree-ssanames.c
parent1a612e0a6cc76824017ca688693c9340114f1a76 (diff)
downloadgcc-8bb46326fbe9a12661c8d936622ef09dee0eb6d9.zip
gcc-8bb46326fbe9a12661c8d936622ef09dee0eb6d9.tar.gz
gcc-8bb46326fbe9a12661c8d936622ef09dee0eb6d9.tar.bz2
tree-ssanames.c (duplicate_ssa_name_ptr_info): New function.
* tree-ssanames.c (duplicate_ssa_name_ptr_info): New function. (duplicate_ssa_name): Call duplicate_ssa_name_ptr_info. * tree-vect-analyze.c (vect_object_analysis): additional parm pass back a "struct ptr_info_def *" with the points-to info. (vect_analyze_data_refs): set the STMT_VINFO_PTR_INFO for the statement using info returned from vect_object_analysis. * tree-vect-transform.c (update_vuses_to_preheader): New function. (vect_create_data_ref_ptr): Remove updates to vars_to_rename for virtual uses and defs when creating a replacement vector reference. Call duplicate_ssa_name_ptr_info to define points-to info for vector pointer replacement using STMT_VINFO_PTR_INFO. (vectorizable_store): copy_virtual_operands and update definition statements. (vectorizable_load): copy_virtual_operands. Remove call to mark_call_clobbered_vars_to_rename for call to "const" builtin. * tree-vectorizer.c (vectorize_loops): Remove calls to rewrite_into_ssa and bitmap_clear (vars_to_rename). (new_stmt_vec_info): initialize STMT_VINFO_PTR_INFO for stmt. * tree-vectorizer.h (_stmt_vec_info): add field ptr_info and define macro STMT_VINFO_PTR_INFO for use in accessing. * tree.h add export of duplicate_ssa_name_ptr_info. * rs6000.c (altivec_init_builtins): Declare builtin function __builtin_altivec_mask_for_load to be "const". From-SVN: r97164
Diffstat (limited to 'gcc/tree-ssanames.c')
-rw-r--r--gcc/tree-ssanames.c30
1 files changed, 23 insertions, 7 deletions
diff --git a/gcc/tree-ssanames.c b/gcc/tree-ssanames.c
index 38aab0b..a89d608 100644
--- a/gcc/tree-ssanames.c
+++ b/gcc/tree-ssanames.c
@@ -279,22 +279,38 @@ 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);
+
+ if (old_ptr_info)
+ duplicate_ssa_name_ptr_info (new_name, old_ptr_info);
+
+ return new_name;
+}
+
+
+/* Creates a duplicate of the ptr_info_def at PTR_INFO for use by
+ the ssa name NAME. */
+
+void
+duplicate_ssa_name_ptr_info (tree name, struct ptr_info_def *ptr_info)
+{
struct ptr_info_def *new_ptr_info;
- if (!old_ptr_info)
- return new_name;
+ gcc_assert (POINTER_TYPE_P (TREE_TYPE (name)));
+ gcc_assert (!SSA_NAME_PTR_INFO (name));
+
+ if (!ptr_info)
+ return;
new_ptr_info = ggc_alloc (sizeof (struct ptr_info_def));
- *new_ptr_info = *old_ptr_info;
+ *new_ptr_info = *ptr_info;
- if (old_ptr_info->pt_vars)
+ if (ptr_info->pt_vars)
{
new_ptr_info->pt_vars = BITMAP_GGC_ALLOC ();
- bitmap_copy (new_ptr_info->pt_vars, old_ptr_info->pt_vars);
+ bitmap_copy (new_ptr_info->pt_vars, ptr_info->pt_vars);
}
- SSA_NAME_PTR_INFO (new_name) = new_ptr_info;
- return new_name;
+ SSA_NAME_PTR_INFO (name) = new_ptr_info;
}