From b5c3569b079079d6c78f3a12ef69b0ed8b9d7e34 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Fri, 26 Nov 2004 13:18:34 -0700 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/tree-ssa.c | 11 +++++++---- 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 + + * 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 * 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"); -- 2.7.4