From 6ce57611c71db9c99791f7f293ab0593e2cbc61d Mon Sep 17 00:00:00 2001 From: law Date: Fri, 26 Nov 2004 20:18:34 +0000 Subject: [PATCH] * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91347 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 7 +++++++ gcc/tree-ssa.c | 11 +++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0ac278bfb69..c3d7358c4fa 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 8e2e0982cde..4aa8b26cc46 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.11.4.GIT