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-profiling] tree-inline cleanup 2/many


Hi,
another if 0 hunk that should be unnecesary - we warn about returns
early in the pre-inline optimization block and thus we should not need
take any special care of functions being inlined.

Honza

Index: tree-inline.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree-inline.c,v
retrieving revision 1.26.2.83.2.38
diff -c -3 -p -r1.26.2.83.2.38 tree-inline.c
*** tree-inline.c	15 Apr 2005 13:27:36 -0000	1.26.2.83.2.38
--- tree-inline.c	16 Apr 2005 12:51:59 -0000
*************** expand_call_inline (tree *tp, int *walk_
*** 2378,2398 ****
       a self-referential call; if we're calling ourselves, we need to
       duplicate our body before altering anything.  */
    dup_fndecl = copy_body (id, id->oic_basic_block->count, id->oic_basic_block->frequency);
- #if 0
-   /* If the function uses a return slot, then it may legitimately
-      fall through while still returning a value, so we have to skip
-      the warning here.  */
-   if (warn_return_type
-       && !TREE_NO_WARNING (fn)
-       && !VOID_TYPE_P (TREE_TYPE (TREE_TYPE (fn)))
-       && return_slot_addr == NULL_TREE
-       && block_may_fallthru (dup_fndecl))
-     {
-       warning ("control may reach end of non-void function %qD being inlined",
-       	 fn);
-       TREE_NO_WARNING (fn) = 1;
-     }
- #endif
    id->current_node = old_node;
    my_cfun = DECL_STRUCT_FUNCTION (dup_fndecl);
    /* Append copied EH information to that of current function.  */
--- 2358,2363 ----


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