From: Gabriel Dos Reis Date: Tue, 25 Feb 2003 14:11:59 +0000 (+0000) Subject: decl.c (add_binding): Time TV_NAME_LOOKUP. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7d9f2df2637ee19e5c9a33f1a83c84364209b02a;p=gcc.git decl.c (add_binding): Time TV_NAME_LOOKUP. * decl.c (add_binding): Time TV_NAME_LOOKUP. (push_class_binding): Likewise. (set_namespace_binding): Likewise. From-SVN: r63410 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e793ab10893..3f4c7f69f24 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-02-24 Gabriel Dos Reis + + * decl.c (add_binding): Time TV_NAME_LOOKUP. + (push_class_binding): Likewise. + (set_namespace_binding): Likewise. + 2003-02-24 Mark Mitchell PR c++/9836 diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index caf389150d6..b249e5c0314 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -935,6 +935,7 @@ add_binding (tree id, tree decl) tree binding = IDENTIFIER_BINDING (id); int ok = 1; + timevar_push (TV_NAME_LOOKUP); if (TREE_CODE (decl) == TYPE_DECL && DECL_ARTIFICIAL (decl)) /* The new name is the type name. */ BINDING_TYPE (binding) = decl; @@ -991,7 +992,7 @@ add_binding (tree id, tree decl) ok = 0; } - return ok; + POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, ok); } /* Add DECL to the list of things declared in B. */ @@ -1071,6 +1072,7 @@ push_class_binding (tree id, tree decl) tree binding = IDENTIFIER_BINDING (id); tree context; + timevar_push (TV_NAME_LOOKUP); /* Note that we declared this value so that we can issue an error if this is an invalid redeclaration of a name already used for some other purpose. */ @@ -1113,7 +1115,7 @@ push_class_binding (tree id, tree decl) in this class. */ INHERITED_VALUE_BINDING_P (binding) = 1; - return result; + POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, result); } /* Remove the binding for DECL which should be the innermost binding @@ -2114,6 +2116,7 @@ set_namespace_binding (tree name, tree scope, tree val) { tree b; + timevar_push (TV_NAME_LOOKUP); if (scope == NULL_TREE) scope = global_namespace; @@ -2123,11 +2126,12 @@ set_namespace_binding (tree name, tree scope, tree val) if (b == NULL_TREE || TREE_CODE (b) != CPLUS_BINDING) { IDENTIFIER_NAMESPACE_BINDINGS (name) = val; - return; + POP_TIMEVAR_AND_RETURN (TV_NAME_LOOKUP, (void)0); } } b = binding_for_name (name, scope); BINDING_VALUE (b) = val; + timevar_pop (TV_NAME_LOOKUP); } /* Push into the scope of the NAME namespace. If NAME is NULL_TREE, then we