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]

Re: Inliner for Java


On Tue, Aug 06, 2002 at 08:08:23PM +0100, Andrew Haley wrote:
> *************** copy_body_r (tp, walk_subtrees, data)
> *** 364,367 ****
> --- 450,462 ----
>   	  TREE_CHAIN (*tp) = goto_stmt;
>   	}
> + #else /* INLINER_FOR_JAVA */
> +       tree assignment = TREE_OPERAND (return_stmt, 0);
> +       if (assignment)
> + 	{
> + 	  copy_body_r (&assignment, walk_subtrees, data);
> + 	  *tp = build (COMPOUND_EXPR, void_type_node, assignment, goto_stmt);
> + 	  TREE_SIDE_EFFECTS (*tp) = 1;	    
> + 	}
> + #endif /* INLINER_FOR_JAVA */
>         /* If we're not returning anything just do the jump.  */
>         else

This hunk looks wrong wrt the declaration of "assignment".

> *************** initialize_inlined_parameters (id, args,
> *** 601,611 ****
> --- 758,778 ----
>   
>   static tree
> + #ifndef INLINER_FOR_JAVA
>   declare_return_variable (id, use_stmt)
> + #else /* INLINER_FOR_JAVA */
> + declare_return_variable (id, var)
> + #endif /* INLINER_FOR_JAVA */
>        struct inline_data *id;
> + #ifndef INLINER_FOR_JAVA
>        tree *use_stmt;
> + #else /* INLINER_FOR_JAVA */
> +      tree *var;
> + #endif /* INLINER_FOR_JAVA */

Would you clean up some of this by hand?

> + #if 0
> +       if (! uninlinable
> + 	  /* Save function tree for inlining.  Should return 0 if the
> +              language does not support function deferring or the
> +              function could not be deferred.  */
> + 	  && defer_fn (fndecl))
> + 	{
> + 	  /* Let the back-end know that this function exists.  */
> + 	  (*debug_hooks->deferred_inline_function) (fndecl);
> +           timevar_pop (TV_INTEGRATION);
> + 	  return;
> + 	}
> + #endif

Adding if 0 code?

The patch is ok, with above cleanups, for mainline.  I'll be
glad to get this cleaned up for tree-ssa-branch, but I agree
this is the best that can be done for now.


r~


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