On Wed, 23 Mar 2011, Richard Guenther wrote: > > IPA struct reorg has been un-enableable on the 4.6 branch for half > a year now. This completes this disabling by removing it and > IPA type escape analysis which it is the only remaining user of. > > Bootstrap and regtest running on x86_64-unknown-linux-gnu.
Forgot about documentation, params and timevars. Committed. Richard. 2011-03-23 Richard Guenther <rguent...@suse.de> * Makefile.in (IPA_TYPE_ESCAPE_H): Remove. (OBJS-archive): Remove ipa-struct-reorg.o and ipa-type-escape.o. (tree-ssa-alias.o): Do not depend on IPA_TYPE_ESCAPE_H. (alias.o): Likewise. (ipa-type-escape.o): Remove. (ipa-struct-reorg.o): Likewise. (GTFILES): Remove ipa-struct-reorg.c. * alias.c: Do not include ipa-type-escape.h. * tree-ssa-alias.c: Likewise. * common.opt (fipa-struct-reorg): Preserve for backward compatibility. * opts.c (finish_options): Do not reset flag_ipa_struct_reorg. * passes.c (init_optimization_passes): Remove ipa-struct-reorg and ipa-type-escape passes. * tree-pass.h (pass_ipa_type_escape): Remove. (pass_ipa_struct_reorg): Likewise. * ipa-struct-reorg.h: Remove. * ipa-struct-reorg.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-type-escape.c: Likewise. * doc/invoke.texi (-fipa-struct-reorg): Remove. (--param struct-reorg-cold-struct-ratio): Likewise. * params.def (PARAM_STRUCT_REORG_COLD_STRUCT_RATIO): Likewise. * params.h (STRUCT_REORG_COLD_STRUCT_RATIO): Likewise. * timevar.def (TV_IPA_TYPE_ESCAPE): Likewise. * gcc.dg/struct: Remove directory and contents. Index: trunk/gcc/Makefile.in =================================================================== *** trunk.orig/gcc/Makefile.in 2011-03-22 13:33:17.000000000 +0100 --- trunk/gcc/Makefile.in 2011-03-23 14:17:15.000000000 +0100 *************** CFGLOOP_H = cfgloop.h $(BASIC_BLOCK_H) $ *** 921,927 **** $(BITMAP_H) sbitmap.h IPA_UTILS_H = ipa-utils.h $(TREE_H) $(CGRAPH_H) IPA_REFERENCE_H = ipa-reference.h $(BITMAP_H) $(TREE_H) - IPA_TYPE_ESCAPE_H = ipa-type-escape.h $(TREE_H) CGRAPH_H = cgraph.h $(VEC_H) $(TREE_H) $(BASIC_BLOCK_H) $(FUNCTION_H) \ cif-code.def ipa-ref.h ipa-ref-inline.h $(LINKER_PLUGIN_API_H) DF_H = df.h $(BITMAP_H) $(REGSET_H) sbitmap.h $(BASIC_BLOCK_H) \ --- 921,926 ---- *************** OBJS-archive = \ *** 1467,1474 **** ipa-pure-const.o \ ipa-reference.o \ ipa-ref.o \ - ipa-struct-reorg.o \ - ipa-type-escape.o \ ipa-utils.o \ ipa.o \ matrix-reorg.o \ --- 1466,1471 ---- *************** tree-ssa-alias.o : tree-ssa-alias.c $(TR *** 2612,2618 **** $(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \ $(TREE_DUMP_H) $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \ $(GIMPLE_H) $(VEC_H) $(TARGET_H) \ ! $(IPA_TYPE_ESCAPE_H) vecprim.h pointer-set.h alloc-pool.h \ tree-pretty-print.h tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ --- 2609,2615 ---- $(FUNCTION_H) $(TIMEVAR_H) convert.h $(TM_H) coretypes.h langhooks.h \ $(TREE_DUMP_H) $(TREE_PASS_H) $(PARAMS_H) $(BASIC_BLOCK_H) $(DIAGNOSTIC_H) \ $(GIMPLE_H) $(VEC_H) $(TARGET_H) \ ! vecprim.h pointer-set.h alloc-pool.h \ tree-pretty-print.h tree-ssa-reassoc.o : tree-ssa-reassoc.c $(TREE_FLOW_H) $(CONFIG_H) \ $(SYSTEM_H) $(TREE_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ *************** ipa-pure-const.o : ipa-pure-const.c $(CO *** 3034,3052 **** $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) $(TIMEVAR_H) \ $(DIAGNOSTIC_H) $(CFGLOOP_H) $(SCEV_H) $(LTO_STREAMER_H) \ gimple-pretty-print.h - ipa-type-escape.o : ipa-type-escape.c $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TM_H) $(TREE_H) $(TREE_FLOW_H) $(TREE_INLINE_H) langhooks.h \ - pointer-set.h $(GGC_H) $(IPA_TYPE_ESCAPE_H) $(IPA_UTILS_H) $(SPLAY_TREE_H) \ - $(GIMPLE_H) $(CGRAPH_H) output.h $(FLAGS_H) $(TREE_PASS_H) \ - $(TIMEVAR_H) $(DIAGNOSTIC_H) $(FUNCTION_H) tree-pretty-print.h - ipa-struct-reorg.o: ipa-struct-reorg.c ipa-struct-reorg.h $(CONFIG_H) $(SYSTEM_H) \ - coretypes.h $(TM_H) $(GGC_H) $(TREE_H) $(RTL_H) $(GIMPLE_H) tree-inline.h \ - $(TREE_FLOW_H) langhooks.h pointer-set.h $(HASHTAB_H) $(DIAGNOSTIC_CORE_H) \ - $(FLAGS_H) debug.h $(TARGET_H) $(CGRAPH_H) $(DIAGNOSTIC_H) $(TIMEVAR_H) \ - $(PARAMS_H) $(FIBHEAP_H) intl.h $(FUNCTION_H) $(BASIC_BLOCK_H) tree-iterator.h \ - $(TREE_PASS_H) $(OPTS_H) $(IPA_TYPE_ESCAPE_H) $(TREE_DUMP_H) \ - $(GIMPLE_H) tree-pretty-print.h gimple-pretty-print.h - coverage.o : coverage.c $(GCOV_IO_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(RTL_H) $(TREE_H) $(FLAGS_H) output.h $(REGS_H) $(EXPR_H) \ $(FUNCTION_H) $(BASIC_BLOCK_H) toplev.h $(DIAGNOSTIC_CORE_H) $(GGC_H) langhooks.h $(COVERAGE_H) \ --- 3031,3036 ---- *************** alias.o : alias.c $(CONFIG_H) $(SYSTEM_H *** 3303,3309 **** $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(DIAGNOSTIC_CORE_H) output.h \ $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H) $(TM_P_H) \ langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \ ! $(SPLAY_TREE_H) $(IPA_TYPE_ESCAPE_H) $(DF_H) $(TREE_PASS_H) \ tree-ssa-alias.h pointer-set.h $(TREE_FLOW_H) stack-ptr-mod.o : stack-ptr-mod.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \ --- 3287,3293 ---- $(FLAGS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(REGS_H) $(DIAGNOSTIC_CORE_H) output.h \ $(ALIAS_H) $(EMIT_RTL_H) $(GGC_H) $(FUNCTION_H) cselib.h $(TREE_H) $(TM_P_H) \ langhooks.h $(TARGET_H) gt-alias.h $(TIMEVAR_H) $(CGRAPH_H) \ ! $(SPLAY_TREE_H) $(DF_H) $(TREE_PASS_H) \ tree-ssa-alias.h pointer-set.h $(TREE_FLOW_H) stack-ptr-mod.o : stack-ptr-mod.c $(CONFIG_H) $(SYSTEM_H) coretypes.h \ $(TM_H) $(TREE_H) $(RTL_H) $(REGS_H) $(EXPR_H) $(TREE_PASS_H) \ *************** GTFILES = $(CPP_ID_DATA_H) $(srcdir)/inp *** 3715,3721 **** $(srcdir)/reload.h $(srcdir)/caller-save.c \ $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \ $(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c $(srcdir)/matrix-reorg.c \ ! $(srcdir)/dbxout.c $(srcdir)/ipa-struct-reorg.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \ $(srcdir)/tree-vect-generic.c \ $(srcdir)/dojump.c \ $(srcdir)/emit-rtl.c $(srcdir)/except.h $(srcdir)/explow.c $(srcdir)/expr.c \ --- 3699,3705 ---- $(srcdir)/reload.h $(srcdir)/caller-save.c \ $(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \ $(srcdir)/ipa-prop.c $(srcdir)/ipa-cp.c $(srcdir)/ipa-inline.c $(srcdir)/matrix-reorg.c \ ! $(srcdir)/dbxout.c $(srcdir)/dwarf2out.c $(srcdir)/dwarf2asm.c \ $(srcdir)/tree-vect-generic.c \ $(srcdir)/dojump.c \ $(srcdir)/emit-rtl.c $(srcdir)/except.h $(srcdir)/explow.c $(srcdir)/expr.c \ Index: trunk/gcc/alias.c =================================================================== *** trunk.orig/gcc/alias.c 2010-11-30 15:31:10.000000000 +0100 --- trunk/gcc/alias.c 2011-03-23 14:05:31.000000000 +0100 *************** along with GCC; see the file COPYING3. *** 43,49 **** #include "target.h" #include "cgraph.h" #include "tree-pass.h" - #include "ipa-type-escape.h" #include "df.h" #include "tree-ssa-alias.h" #include "pointer-set.h" --- 43,48 ---- Index: trunk/gcc/common.opt =================================================================== *** trunk.orig/gcc/common.opt 2011-03-16 10:53:46.000000000 +0100 --- trunk/gcc/common.opt 2011-03-23 14:03:48.000000000 +0100 *************** Perform matrix layout flattening and tra *** 1249,1257 **** on profiling information. fipa-struct-reorg ! Common Report Var(flag_ipa_struct_reorg) ! Perform structure layout optimizations based ! on profiling information. fira-algorithm= Common Joined RejectNegative Enum(ira_algorithm) Var(flag_ira_algorithm) Init(IRA_ALGORITHM_CB) --- 1249,1256 ---- on profiling information. fipa-struct-reorg ! Common Ignore ! Does nothing. Preserved for backward compatibility. fira-algorithm= Common Joined RejectNegative Enum(ira_algorithm) Var(flag_ira_algorithm) Init(IRA_ALGORITHM_CB) Index: trunk/gcc/opts.c =================================================================== *** trunk.orig/gcc/opts.c 2011-03-23 10:25:39.000000000 +0100 --- trunk/gcc/opts.c 2011-03-23 14:04:15.000000000 +0100 *************** finish_options (struct gcc_options *opts *** 777,783 **** { /* These passes are not WHOPR compatible yet. */ opts->x_flag_ipa_pta = 0; - opts->x_flag_ipa_struct_reorg = 0; } if (opts->x_flag_lto) --- 777,782 ---- Index: trunk/gcc/passes.c =================================================================== *** trunk.orig/gcc/passes.c 2011-03-23 14:02:04.000000000 +0100 --- trunk/gcc/passes.c 2011-03-23 14:52:09.000000000 +0100 *************** init_optimization_passes (void) *** 798,806 **** NEXT_PASS (pass_ipa_inline); NEXT_PASS (pass_ipa_pure_const); NEXT_PASS (pass_ipa_reference); - NEXT_PASS (pass_ipa_type_escape); NEXT_PASS (pass_ipa_pta); - NEXT_PASS (pass_ipa_struct_reorg); *p = NULL; p = &all_lto_gen_passes; --- 798,804 ---- Index: trunk/gcc/tree-ssa-alias.c =================================================================== *** trunk.orig/gcc/tree-ssa-alias.c 2011-03-03 11:55:22.000000000 +0100 --- trunk/gcc/tree-ssa-alias.c 2011-03-23 14:05:50.000000000 +0100 *************** along with GCC; see the file COPYING3. *** 40,46 **** #include "tree-pass.h" #include "convert.h" #include "params.h" - #include "ipa-type-escape.h" #include "vec.h" #include "bitmap.h" #include "vecprim.h" --- 40,45 ---- Index: trunk/gcc/tree-pass.h =================================================================== *** trunk.orig/gcc/tree-pass.h 2011-02-01 17:14:02.000000000 +0100 --- trunk/gcc/tree-pass.h 2011-03-23 14:24:08.000000000 +0100 *************** extern struct simple_ipa_opt_pass pass_i *** 463,471 **** extern struct ipa_opt_pass_d pass_ipa_cp; extern struct ipa_opt_pass_d pass_ipa_reference; extern struct ipa_opt_pass_d pass_ipa_pure_const; - extern struct simple_ipa_opt_pass pass_ipa_type_escape; extern struct simple_ipa_opt_pass pass_ipa_pta; - extern struct simple_ipa_opt_pass pass_ipa_struct_reorg; extern struct ipa_opt_pass_d pass_ipa_lto_wpa_fixup; extern struct ipa_opt_pass_d pass_ipa_lto_finish_out; extern struct ipa_opt_pass_d pass_ipa_profile; --- 463,469 ---- Index: trunk/gcc/doc/invoke.texi =================================================================== *** trunk.orig/gcc/doc/invoke.texi 2011-03-23 10:25:23.000000000 +0100 --- trunk/gcc/doc/invoke.texi 2011-03-23 14:52:48.000000000 +0100 *************** Objective-C and Objective-C++ Dialects}. *** 351,357 **** -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol -finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg @gol -fipa-pta -fipa-profile -fipa-pure-const -fipa-reference @gol ! -fipa-struct-reorg -fira-algorithm=@var{algorithm} @gol -fira-region=@var{region} @gol -fira-loop-pressure -fno-ira-share-save-slots @gol -fno-ira-share-spill-slots -fira-verbose=@var{n} @gol --- 351,357 ---- -finline-functions -finline-functions-called-once -finline-limit=@var{n} @gol -finline-small-functions -fipa-cp -fipa-cp-clone -fipa-matrix-reorg @gol -fipa-pta -fipa-profile -fipa-pure-const -fipa-reference @gol ! -fira-algorithm=@var{algorithm} @gol -fira-region=@var{region} @gol -fira-loop-pressure -fno-ira-share-save-slots @gol -fno-ira-share-spill-slots -fira-verbose=@var{n} @gol *************** Discover which static variables do not e *** 6766,6784 **** compilation unit. Enabled by default at @option{-O} and higher. - @item -fipa-struct-reorg - @opindex fipa-struct-reorg - Perform structure reorganization optimization, that change C-like structures - layout in order to better utilize spatial locality. This transformation is - affective for programs containing arrays of structures. Available in two - compilation modes: profile-based (enabled with @option{-fprofile-generate}) - or static (which uses built-in heuristics). It works only in whole program - mode, so it requires @option{-fwhole-program} to be - enabled. Structures considered @samp{cold} by this transformation are not - affected (see @option{--param struct-reorg-cold-struct-ratio=@var{value}}). - - With this flag, the program debug info reflects a new structure layout. - @item -fipa-pta @opindex fipa-pta Perform interprocedural pointer analysis and interprocedural modification --- 6766,6771 ---- *************** In each case, the @var{value} is an inte *** 8216,8230 **** @var{name} are given in the following table: @table @gcctabopt - @item struct-reorg-cold-struct-ratio - The threshold ratio (as a percentage) between a structure frequency - and the frequency of the hottest structure in the program. This parameter - is used by struct-reorg optimization enabled by @option{-fipa-struct-reorg}. - We say that if the ratio of a structure frequency, calculated by profiling, - to the hottest structure frequency in the program is less than this - parameter, then structure reorganization is not applied to this structure. - The default is 10. - @item predictable-branch-outcome When branch is predicted to be taken with probability lower than this threshold (in percent), then it is considered well predictable. The default is 10. --- 8203,8208 ---- Index: trunk/gcc/params.def =================================================================== *** trunk.orig/gcc/params.def 2011-03-21 16:32:50.000000000 +0100 --- trunk/gcc/params.def 2011-03-23 14:53:06.000000000 +0100 *************** along with GCC; see the file COPYING3. *** 39,54 **** Be sure to add an entry to invoke.texi summarizing the parameter. */ - /* The threshold ratio between current and hottest structure counts. - We say that if the ratio of the current structure count, - calculated by profiling, to the hottest structure count - in the program is less than this parameter, then structure - reorganization is not applied. The default is 10%. */ - DEFPARAM (PARAM_STRUCT_REORG_COLD_STRUCT_RATIO, - "struct-reorg-cold-struct-ratio", - "The threshold ratio between current and hottest structure counts", - 10, 0, 100) - /* When branch is predicted to be taken with probability lower than this threshold (in percent), then it is considered well predictable. */ DEFPARAM (PARAM_PREDICTABLE_BRANCH_OUTCOME, --- 39,44 ---- Index: trunk/gcc/params.h =================================================================== *** trunk.orig/gcc/params.h 2011-01-14 13:13:39.000000000 +0100 --- trunk/gcc/params.h 2011-03-23 14:53:22.000000000 +0100 *************** extern int default_param_value (compiler *** 118,125 **** extern void init_param_values (int *params); /* Macros for the various parameters. */ - #define STRUCT_REORG_COLD_STRUCT_RATIO \ - PARAM_VALUE (PARAM_STRUCT_REORG_COLD_STRUCT_RATIO) #define MAX_INLINE_INSNS_SINGLE \ PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE) #define MAX_INLINE_INSNS \ --- 118,123 ---- Index: trunk/gcc/timevar.def =================================================================== *** trunk.orig/gcc/timevar.def 2010-11-17 16:39:05.000000000 +0100 --- trunk/gcc/timevar.def 2011-03-23 14:54:02.000000000 +0100 *************** DEFTIMEVAR (TV_WHOPR_WPA_LTRANS_EXEC , " *** 70,76 **** DEFTIMEVAR (TV_IPA_REFERENCE , "ipa reference") DEFTIMEVAR (TV_IPA_PROFILE , "ipa profile") DEFTIMEVAR (TV_IPA_PURE_CONST , "ipa pure const") - DEFTIMEVAR (TV_IPA_TYPE_ESCAPE , "ipa type escape") DEFTIMEVAR (TV_IPA_PTA , "ipa points-to") DEFTIMEVAR (TV_IPA_SRA , "ipa SRA") DEFTIMEVAR (TV_IPA_FREE_LANG_DATA , "ipa free lang data") --- 70,75 ----