aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJeff Law <law@redhat.com>2004-11-26 13:18:34 -0700
committerJeff Law <law@gcc.gnu.org>2004-11-26 13:18:34 -0700
commitb5c3569b079079d6c78f3a12ef69b0ed8b9d7e34 (patch)
tree0424a1a93625c4da7b4389c846fbabbd364534a8 /gcc
parente54c7471819ee8dc9e4ba0ada1db242bd5bd68ed (diff)
downloadgcc-b5c3569b079079d6c78f3a12ef69b0ed8b9d7e34.zip
gcc-b5c3569b079079d6c78f3a12ef69b0ed8b9d7e34.tar.gz
gcc-b5c3569b079079d6c78f3a12ef69b0ed8b9d7e34.tar.bz2
tree-ssa.c (verify_flow_sensitive_alias_info): Don't retrieve annotations or pointer info before it's necessary.
* tree-ssa.c (verify_flow_sensitive_alias_info): Don't retrieve annotations or pointer info before it's necessary. Reorder tests for early continue of the loop. Manually CSE SSA_NAME_VAR. From-SVN: r91347
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/tree-ssa.c11
2 files changed, 14 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 0ac278b..c3d7358 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@
+2004-11-26 Jeff Law <law@redhat.com>
+
+ * tree-ssa.c (verify_flow_sensitive_alias_info): Don't
+ retrieve annotations or pointer info before it's necessary.
+ Reorder tests for early continue of the loop. Manually CSE
+ SSA_NAME_VAR.
+
2004-11-26 Eric Botcazou <ebotcazou@libertysurf.fr>
* target.h (struct gcc_target): New field 'dwarf_handle_frame_unspec'.
diff --git a/gcc/tree-ssa.c b/gcc/tree-ssa.c
index 8e2e098..4aa8b26 100644
--- a/gcc/tree-ssa.c
+++ b/gcc/tree-ssa.c
@@ -404,31 +404,34 @@ verify_flow_sensitive_alias_info (void)
for (i = 1; i < num_ssa_names; i++)
{
+ tree var;
var_ann_t ann;
struct ptr_info_def *pi;
+
ptr = ssa_name (i);
if (!ptr)
continue;
- ann = var_ann (SSA_NAME_VAR (ptr));
- pi = SSA_NAME_PTR_INFO (ptr);
/* We only care for pointers that are actually referenced in the
program. */
- if (!TREE_VISITED (ptr) || !POINTER_TYPE_P (TREE_TYPE (ptr)))
+ if (!POINTER_TYPE_P (TREE_TYPE (ptr)) || !TREE_VISITED (ptr))
continue;
/* RESULT_DECL is special. If it's a GIMPLE register, then it
is only written-to only once in the return statement.
Otherwise, aggregate RESULT_DECLs may be written-to more than
once in virtual operands. */
- if (TREE_CODE (SSA_NAME_VAR (ptr)) == RESULT_DECL
+ var = SSA_NAME_VAR (ptr);
+ if (TREE_CODE (var) == RESULT_DECL
&& is_gimple_reg (ptr))
continue;
+ pi = SSA_NAME_PTR_INFO (ptr);
if (pi == NULL)
continue;
+ ann = var_ann (var);
if (pi->is_dereferenced && !pi->name_mem_tag && !ann->type_mem_tag)
{
error ("Dereferenced pointers should have a name or a type tag");