This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[tree-ssa, committed] Kill language specific handling in cgraph


Hi,

bootstrapped, regtested i686-pc-gnu-linux.

Honza
2003-12-14  Jan Hubicka  <jh@suse.cz>
	* cgraphunit.c (record_call_1): Do not call analyze_expr hook
	* langhooks-def.h (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Kill.
	(LANG_HOOKS_CALLGRAPH_INITIALIZER): Update.
	* longhooks.h (lang_hooks_for_callgraph): Kill analyze_expr.

	* cp-lang.c (LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR): Kill.
	* cp-tree.h (cxx_callgraph_analyze_expr): Kill.
	* decl2.c (cxx_callgraph_analyze_expr): Kill.
Index: cgraphunit.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cgraphunit.c,v
retrieving revision 1.1.4.20
diff -c -3 -p -r1.1.4.20 cgraphunit.c
*** cgraphunit.c	13 Dec 2003 19:39:47 -0000	1.1.4.20
--- cgraphunit.c	13 Dec 2003 22:00:32 -0000
*************** record_call_1 (tree *tp, int *walk_subtr
*** 283,289 ****
  	}
  
        if ((unsigned int) TREE_CODE (t) >= LAST_AND_UNUSED_TREE_CODE)
! 	return (*lang_hooks.callgraph.analyze_expr) (tp, walk_subtrees, data);
        break;
      }
  
--- 283,289 ----
  	}
  
        if ((unsigned int) TREE_CODE (t) >= LAST_AND_UNUSED_TREE_CODE)
! 	abort ();
        break;
      }
  
Index: langhooks-def.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/langhooks-def.h,v
retrieving revision 1.34.2.24
diff -c -3 -p -r1.34.2.24 langhooks-def.h
*** langhooks-def.h	25 Nov 2003 02:09:48 -0000	1.34.2.24
--- langhooks-def.h	13 Dec 2003 22:00:33 -0000
*************** extern int lhd_gimplify_expr (tree *, tr
*** 187,197 ****
    LANG_HOOKS_TREE_INLINING_ESTIMATE_NUM_INSNS \
  }
  
- #define LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR lhd_callgraph_analyze_expr
  #define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION NULL
  
  #define LANG_HOOKS_CALLGRAPH_INITIALIZER { \
-   LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR, \
    LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION, \
  }
  
--- 187,195 ----
Index: langhooks.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/langhooks.h,v
retrieving revision 1.42.2.25
diff -c -3 -p -r1.42.2.25 langhooks.h
*** langhooks.h	25 Nov 2003 02:09:48 -0000	1.42.2.25
--- langhooks.h	13 Dec 2003 22:00:33 -0000
*************** struct lang_hooks_for_tree_inlining
*** 53,62 ****
  
  struct lang_hooks_for_callgraph
  {
-   /* The node passed is a language-specific tree node.  If its contents
-      are relevant to use of other declarations, mark them.  */
-   tree (*analyze_expr) (tree *, int *, tree);
- 
    /* Produce RTL for function passed as argument.  */
    void (*expand_function) (tree);
  };
--- 53,58 ----
Index: cp/cp-lang.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-lang.c,v
retrieving revision 1.36.2.24
diff -c -3 -p -r1.36.2.24 cp-lang.c
*** cp/cp-lang.c	25 Oct 2003 19:42:53 -0000	1.36.2.24
--- cp/cp-lang.c	13 Dec 2003 22:00:33 -0000
*************** static void cxx_initialize_diagnostics (
*** 168,175 ****
  #undef LANG_HOOKS_EXPR_SIZE
  #define LANG_HOOKS_EXPR_SIZE cp_expr_size
  
- #undef LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR
- #define LANG_HOOKS_CALLGRAPH_ANALYZE_EXPR cxx_callgraph_analyze_expr
  #undef LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION
  #define LANG_HOOKS_CALLGRAPH_EXPAND_FUNCTION expand_body
  
--- 168,173 ----
Index: cp/cp-tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/cp-tree.h,v
retrieving revision 1.719.2.45
diff -c -3 -p -r1.719.2.45 cp-tree.h
*** cp/cp-tree.h	12 Dec 2003 23:32:16 -0000	1.719.2.45
--- cp/cp-tree.h	13 Dec 2003 22:00:34 -0000
*************** extern tree build_artificial_parm (tree,
*** 3740,3746 ****
  extern tree get_guard (tree);
  extern tree get_guard_cond (tree);
  extern tree set_guard (tree);
- extern tree cxx_callgraph_analyze_expr (tree *, int *, tree);
  
  /* XXX Not i18n clean.  */
  #define cp_deprecated(STR)						\
--- 3740,3745 ----
Index: cp/decl2.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/decl2.c,v
retrieving revision 1.540.2.42
diff -c -3 -p -r1.540.2.42 decl2.c
*** cp/decl2.c	25 Nov 2003 02:10:48 -0000	1.540.2.42
--- cp/decl2.c	13 Dec 2003 22:00:34 -0000
*************** generate_ctor_and_dtor_functions_for_pri
*** 2504,2540 ****
    return 0;
  }
  
- /* Called via LANGHOOK_CALLGRAPH_ANALYZE_EXPR.  It is supposed to mark
-    decls referenced from frontend specific constructs; it will be called
-    only for language-specific tree nodes.
- 
-    Here we must deal with member pointers.  */
- 
- tree
- cxx_callgraph_analyze_expr (tree *tp, int *walk_subtrees ATTRIBUTE_UNUSED,
- 			    tree from ATTRIBUTE_UNUSED)
- {
-   tree t = *tp;
- 
-   if (flag_unit_at_a_time)
-     switch (TREE_CODE (t))
-       {
-       case PTRMEM_CST:
- 	if (TYPE_PTRMEMFUNC_P (TREE_TYPE (t)))
- 	  cgraph_mark_needed_node (cgraph_node (PTRMEM_CST_MEMBER (t)));
- 	break;
-       case BASELINK:
- 	if (TREE_CODE (BASELINK_FUNCTIONS (t)) == FUNCTION_DECL)
- 	  cgraph_mark_needed_node (cgraph_node (BASELINK_FUNCTIONS (t)));
- 	break;
- 
-       default:
- 	break;
-       }
- 
-   return NULL;
- }
- 
  /* This routine is called from the last rule in yyparse ().
     Its job is to create all the code needed to initialize and
     destroy the global aggregates.  We do the destruction
--- 2504,2509 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]