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] unbreak java


Yesterday's patch to move eh lowering code to apply to -O0 forgot
that Java doesn't use tree_rest_of_compilation.  :-(


r~


	* decl.c (end_java_method): Invoke remove_useless_stmts_and_vars
	and lower_eh_constructs.
	* parse.y (source_end_java_method): Likewise.

Index: decl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/decl.c,v
retrieving revision 1.128.2.21
diff -c -p -d -r1.128.2.21 decl.c
*** decl.c	24 Sep 2003 21:43:14 -0000	1.128.2.21
--- decl.c	1 Oct 2003 16:13:43 -0000
*************** The Free Software Foundation is independ
*** 46,51 ****
--- 46,52 ----
  #include "timevar.h"
  #include "tree-inline.h"
  #include "tree-dump.h"
+ #include "tree-flow.h"
  
  #if defined (DEBUG_JAVA_BINDING_LEVELS)
  extern void indent (void);
*************** end_java_method (void)
*** 1903,1910 ****
--- 1904,1917 ----
  
    cfun->x_whole_function_mode_p = 1;
  
+   /* PLEASE PLEASE PLEASE WORK ON USING TREE_REST_OF_COMPILATION!  */
+ 
    gimplify_function_tree (fndecl);
    dump_function (TDI_gimple, fndecl);
+ 
+   remove_useless_stmts_and_vars (&DECL_SAVED_TREE (fndecl), false);
+   lower_eh_constructs (&DECL_SAVED_TREE (fndecl));
+ 
    if (optimize > 0 && !flag_disable_tree_ssa)
      optimize_function_tree (fndecl);
    
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.387.2.31
diff -c -p -d -r1.387.2.31 parse.y
*** parse.y	28 Sep 2003 06:07:43 -0000	1.387.2.31
--- parse.y	1 Oct 2003 16:13:55 -0000
*************** definitions and other extensions.  */
*** 72,77 ****
--- 72,78 ----
  #include "debug.h"
  #include "tree-inline.h"
  #include "tree-dump.h"
+ #include "tree-flow.h"
  
  /* Local function prototypes */
  static char *java_accstring_lookup (int);
*************** source_end_java_method (void)
*** 7480,7485 ****
--- 7481,7487 ----
        && ! flag_emit_class_files
        && ! flag_emit_xref)
      {
+       /* PLEASE PLEASE PLEASE WORK ON USING TREE_REST_OF_COMPILATION!  */
        /* Convert function tree to GIMPLE.  */
        if (!flag_disable_gimple)
  	{
*************** source_end_java_method (void)
*** 7501,7506 ****
--- 7503,7511 ----
  
  	  /* Debugging dump after gimplification.  */
  	  dump_function (TDI_gimple, fndecl);
+ 
+ 	  remove_useless_stmts_and_vars (&DECL_SAVED_TREE (fndecl), false);
+ 	  lower_eh_constructs (&DECL_SAVED_TREE (fndecl));
  
  	  /* Run SSA optimizers if gimplify succeeded.  */
  	  if (optimize > 0 && !flag_disable_tree_ssa)


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