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] remove some dead code


This feature is handled by honor_protect_cleanup_actions
in tree-eh.c.


r~


        * gimplify.c (maybe_protect_cleanup): Remove.
        * tree-simple.h (maybe_protect_cleanup): Remove.
        * c-simplify.c (gimplify_cleanup): Don't call it.

Index: c-simplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/c-simplify.c,v
retrieving revision 1.1.4.73
diff -c -p -d -r1.1.4.73 c-simplify.c
*** c-simplify.c	14 Oct 2003 00:12:58 -0000	1.1.4.73
--- c-simplify.c	16 Oct 2003 18:37:48 -0000
*************** gimplify_cleanup (tree *stmt_p, tree *ne
*** 424,431 ****
    enum tree_code code
      = (CLEANUP_EH_ONLY (stmt) ? TRY_CATCH_EXPR : TRY_FINALLY_EXPR);
  
-   cleanup = maybe_protect_cleanup (cleanup);
- 
    c_gimplify_stmt (&body);
  
    *stmt_p = build (code, void_type_node, body, cleanup);
--- 424,429 ----
Index: gimplify.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/gimplify.c,v
retrieving revision 1.1.2.95
diff -c -p -d -r1.1.2.95 gimplify.c
*** gimplify.c	15 Oct 2003 03:16:59 -0000	1.1.2.95
--- gimplify.c	16 Oct 2003 18:37:51 -0000
*************** gimplify_cleanup_point_expr (tree *expr_
*** 2916,2948 ****
      *expr_p = body;
  }
  
- /* If the language requires some sort of exception protection of cleanup
-    actions (i.e. calling terminate in C++), modify the cleanup to reflect
-    that.  */
- 
- tree
- maybe_protect_cleanup (tree cleanup)
- {
- #if 0
-   /* Ack!  We only want to protect the cleanup if it's run in the EH path.
-      There's currently no reasonable way to express this in GENERIC.  FIXME
-      FIXME FIXME!  Don't mess with this for now; it will still get handled
-      properly in the expander.  */
-   tree protect_cleanup_actions
-     = (lang_protect_cleanup_actions
-        ? (*lang_protect_cleanup_actions) ()
-        : NULL_TREE);
- 
-   if (protect_cleanup_actions)
-     /* Wrap cleanups in MUST_NOT_THROW equivalent if appropriate.  FIXME
-        perhaps this should be done earlier in the frontend so we don't need
-        a hook.  */
-     cleanup = gimple_build_eh_filter (cleanup, NULL_TREE,
- 				      protect_cleanup_actions);
- #endif
-   return cleanup;
- }
- 
  /* Insert a cleanup marker for gimplify_cleanup_point_expr.  CLEANUP
     is the cleanup action required.  */
  
--- 2916,2921 ----
*************** static void
*** 2950,2957 ****
  gimple_push_cleanup (tree cleanup, tree *pre_p)
  {
    tree wce;
- 
-   cleanup = maybe_protect_cleanup (cleanup);
  
    if (gimple_conditional_context ())
      {
--- 2923,2928 ----
Index: tree-simple.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Attic/tree-simple.h,v
retrieving revision 1.1.4.34
diff -c -p -d -r1.1.4.34 tree-simple.h
*** tree-simple.h	15 Oct 2003 03:16:59 -0000	1.1.4.34
--- tree-simple.h	16 Oct 2003 18:37:51 -0000
*************** void mark_not_gimple (tree *);
*** 102,108 ****
  void unshare_all_trees (tree);
  tree voidify_wrapper_expr (tree);
  tree gimple_build_eh_filter (tree, tree, tree);
- tree maybe_protect_cleanup (tree);
  tree build_and_jump (tree *);
  
  
--- 102,107 ----


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