Ping rtlopt merge patches

Jan Hubicka hubicka@ucw.cz
Sat Oct 11 20:14:00 GMT 2003


> On Thu, Oct 09, 2003 at 11:25:09PM -0700, Andrew Pinski wrote:
> > http://gcc.gnu.org/ml/gcc-patches/2003-02/msg00501.html
> > rtlopt merge part 8 - webizer pass
> > (should really help SPEC on PPC) (had the doc problem).
> 
> Ok.
Thanks!
The patch needed bit of updating for new command line parsing code.  I
am attaching what I am going to commit now (once testing finishes)

	* Makefile.in (web.o): New.
	* web.c: New file.
	* rtl.h (web_main): Declare.
	* timervar.def (TV_WEB): New.
	* toplev.c (dump_file_index, dump_file_info): Add DFI_web.
	(rest_of_hanle_web): New.
	(flag_web): New static variable.
	(lang_independent_options): Add "web".
	(rest_of_compilation): Call rest_of_handle_web.
	* invoke.texi (-fweb): Document.
	* common.opt (fweb): New.
	* flags.h (flag_web): New.
	* opts.c (decode_options): Set flag_web at -O3.

	* passes.texi (web construction):  Document.
	* invoke.texi (-O3): Document that -fweb is enabled.
Index: Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1169
diff -c -3 -p -r1.1169 Makefile.in
*** Makefile.in	10 Oct 2003 20:33:04 -0000	1.1169
--- Makefile.in	11 Oct 2003 20:08:30 -0000
*************** OBJS-common = \
*** 847,853 ****
   sibcall.o simplify-rtx.o sreal.o ssa.o ssa-ccp.o ssa-dce.o stmt.o	   \
   stor-layout.o stringpool.o targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o \
   unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o		   \
!  alloc-pool.o et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) 
  
  OBJS-md = $(out_object_file)
  OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o	   \
--- 847,853 ----
   sibcall.o simplify-rtx.o sreal.o ssa.o ssa-ccp.o ssa-dce.o stmt.o	   \
   stor-layout.o stringpool.o targhooks.o timevar.o toplev.o tracer.o tree.o tree-dump.o \
   unroll.o varasm.o varray.o version.o vmsdbgout.o xcoffout.o		   \
!  alloc-pool.o et-forest.o cfghooks.o bt-load.o pretty-print.o $(GGC) web.o
  
  OBJS-md = $(out_object_file)
  OBJS-archive = $(EXTRA_OBJS) $(host_hook_obj) hashtable.o tree-inline.o	   \
*************** cse.o : cse.c $(CONFIG_H) $(SYSTEM_H) co
*** 1622,1627 ****
--- 1622,1629 ----
     hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
     output.h function.h $(BASIC_BLOCK_H) $(GGC_H) $(TM_P_H) $(TIMEVAR_H) \
     except.h $(TARGET_H) $(PARAMS_H)
+ web.o : web.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
+    hard-reg-set.h flags.h $(BASIC_BLOCK_H) function.h output.h toplev.h df.h
  gcse.o : gcse.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
     hard-reg-set.h flags.h real.h insn-config.h $(GGC_H) $(RECOG_H) $(EXPR_H) \
     $(BASIC_BLOCK_H) function.h output.h toplev.h $(TM_P_H) $(PARAMS_H) except.h gt-gcse.h
Index: common.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/common.opt,v
retrieving revision 1.17
diff -c -3 -p -r1.17 common.opt
*** common.opt	9 Oct 2003 09:08:32 -0000	1.17
--- common.opt	11 Oct 2003 20:08:30 -0000
*************** fverbose-asm
*** 715,720 ****
--- 715,724 ----
  Common
  Add extra commentary to assembler output
  
+ fweb
+ Common
+ Construct webs and split unrelated uses of single variable
+ 
  fwrapv
  Common
  Assume signed arithmetic overflow wraps around
Index: flags.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flags.h,v
retrieving revision 1.122
diff -c -3 -p -r1.122 flags.h
*** flags.h	9 Oct 2003 09:08:32 -0000	1.122
--- flags.h	11 Oct 2003 20:08:30 -0000
*************** extern int flag_signaling_nans;
*** 709,714 ****
--- 709,716 ----
  
  extern int flag_unit_at_a_time;
  
+ extern int flag_web;
+ 
  /* A string that's used when a random name is required.  NULL means
     to make it really random.  */
  
Index: opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.39
diff -c -3 -p -r1.39 opts.c
*** opts.c	9 Oct 2003 09:08:32 -0000	1.39
--- opts.c	11 Oct 2003 20:08:30 -0000
*************** decode_options (unsigned int argc, const
*** 557,562 ****
--- 557,563 ----
        flag_reorder_blocks = 1;
        flag_reorder_functions = 1;
        flag_unit_at_a_time = 1;
+       flag_web = 1;
      }
  
    if (optimize >= 3)
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.435
diff -c -3 -p -r1.435 rtl.h
*** rtl.h	12 Sep 2003 15:07:50 -0000	1.435
--- rtl.h	11 Oct 2003 20:08:31 -0000
*************** extern rtx remove_death (unsigned int, r
*** 2055,2060 ****
--- 2055,2062 ----
  extern void dump_combine_stats (FILE *);
  extern void dump_combine_total_stats (FILE *);
  #endif
+ /* In web.c */
+ extern void web_main			PARAMS ((void));
  
  /* In sched.c.  */
  #ifdef BUFSIZ
Index: timevar.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/timevar.def,v
retrieving revision 1.19
diff -c -3 -p -r1.19 timevar.def
*** timevar.def	9 Jul 2003 01:20:22 -0000	1.19
--- timevar.def	11 Oct 2003 20:08:31 -0000
*************** DEFTIMEVAR (TV_GCSE                  , "
*** 69,74 ****
--- 69,75 ----
  DEFTIMEVAR (TV_LOOP                  , "loop analysis")
  DEFTIMEVAR (TV_BYPASS                , "bypass jumps")
  DEFTIMEVAR (TV_TRACER                , "tracer")
+ DEFTIMEVAR (TV_WEB                   , "web")
  DEFTIMEVAR (TV_CSE2                  , "CSE 2")
  DEFTIMEVAR (TV_BRANCH_PROB           , "branch prediction")
  DEFTIMEVAR (TV_FLOW                  , "flow analysis")
Index: toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.831
diff -c -3 -p -r1.831 toplev.c
*** toplev.c	9 Oct 2003 09:08:33 -0000	1.831
--- toplev.c	11 Oct 2003 20:08:31 -0000
*************** enum dump_file_index
*** 266,271 ****
--- 266,272 ----
    DFI_bp,
    DFI_ce1,
    DFI_tracer,
+   DFI_web,
    DFI_loop2,
    DFI_cse2,
    DFI_life,
*************** enum dump_file_index
*** 295,301 ****
     Remaining -d letters:
  
  	"            m   q         "
! 	"         JK   O Q    V  YZ"
  */
  
  static struct dump_file_info dump_file[DFI_MAX] =
--- 296,302 ----
     Remaining -d letters:
  
  	"            m   q         "
! 	"         JK   O Q    V  Y "
  */
  
  static struct dump_file_info dump_file[DFI_MAX] =
*************** static struct dump_file_info dump_file[D
*** 319,324 ****
--- 320,326 ----
    { "bp",	'b', 1, 0, 0 },
    { "ce1",	'C', 1, 0, 0 },
    { "tracer",	'T', 1, 0, 0 },
+   { "web",      'Z', 0, 0, 0 },
    { "loop2",	'L', 1, 0, 0 },
    { "cse2",	't', 1, 0, 0 },
    { "life",	'f', 1, 0, 0 },	/* Yes, duplicate enable switch.  */
*************** int flag_complex_divide_method = 0;
*** 654,659 ****
--- 656,665 ----
  
  int flag_syntax_only = 0;
  
+ /* Nonzero means performs web construction pass.  */
+ 
+ int flag_web;
+ 
  /* Nonzero means perform loop optimizer.  */
  
  int flag_loop_optimize;
*************** static const lang_independent_options f_
*** 1065,1070 ****
--- 1071,1077 ----
    {"pcc-struct-return", &flag_pcc_struct_return, 1 },
    {"reg-struct-return", &flag_pcc_struct_return, 0 },
    {"delayed-branch", &flag_delayed_branch, 1 },
+   {"web", &flag_web, 1},
    {"gcse", &flag_gcse, 1 },
    {"gcse-lm", &flag_gcse_lm, 1 },
    {"gcse-sm", &flag_gcse_sm, 1 },
*************** rest_of_handle_if_after_combine (tree de
*** 2427,2432 ****
--- 2434,2453 ----
    timevar_pop (TV_IFCVT);
  }
  
+ static void
+ rest_of_handle_web (tree decl, rtx insns)
+ {
+   open_dump_file (DFI_web, decl);
+   timevar_push (TV_WEB);
+   web_main ();
+   delete_trivially_dead_insns (insns, max_reg_num ());
+   cleanup_cfg (CLEANUP_EXPENSIVE);
+ 
+   timevar_pop (TV_WEB);
+   close_dump_file (DFI_web, print_rtl_with_bb, insns);
+   reg_scan (get_insns (), max_reg_num (), 0);
+ }
+ 
  /* Do branch profiling and static profile estimation passes.  */
  static void
  rest_of_handle_branch_prob (tree decl, rtx insns)
*************** rest_of_compilation (tree decl)
*** 3312,3317 ****
--- 3333,3341 ----
    timevar_push (TV_FLOW);
  
    rest_of_handle_cfg (decl, insns);
+ 
+   if (flag_web)
+     rest_of_handle_web (decl, insns);
  
    if (optimize > 0
        || profile_arc_flag || flag_test_coverage || flag_branch_probabilities)



More information about the Gcc-patches mailing list