This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
remove rtl ssa pass
- From: Richard Henderson <rth at redhat dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Nov 2003 20:12:25 -0800
- Subject: remove rtl ssa pass
I got tired of seeing these test cases randomly fail or not depending on
vaguaries of rtl code generation on the tree-ssa branch. I was also
thinking that we had a number of bugs open against mainline wrt the now
unmaintained -fssa options.
Turns out I was wrong about the open bugs; they've all been closed WONTFIX.
But I still think this is a good idea -- there is no sense encouraging use
of routines that we know are broken.
We do use parts of ssa.c on tree-ssa branch. Diego has volunteered to move
those bits to tree-ssa.c during the next merge.
Tested on i686-linux, applied to mainline.
r~
* ssa.c, ssa-dce.c, ssa-ccp.c: Remove files.
* Makefile.in (OBJS-common, GTFILES): Don't reference them.
(gtype-desc.o, toplev.o, flow.o): Remove ssa.h.
(ssa.o, ssa-dce.o, ssa-ccp.o): Remove.
* flow.c: Don't include ssa.h.
(set_phi_alternative_reg): Remove.
(calculate_global_regs_live): Don't call it.
(mark_used_regs): Don't handle PHI.
* gengtype.c (open_base_files): Don't reference ssa.h.
* rtl.def (PHI): Remove.
* timevar.def (TV_TO_SSA, TV_SSA_CCP, TV_SSA_DCE, TV_FROM_SSA): Kill.
* common.opt: Remove -fssa, -fssa-ccp, -fssa-dce.
* opts.c (common_handle_option): Likewise.
* toplev.c (f_options): Likewise.
(DFI_ssa, DFI_ssa_ccp, DFI_ssa_dce, DFI_ussa): Remove.
(dump_file): Update to match.
(flag_ssa, flag_ssa_ccp, flag_ssa_dce): Remove.
(rest_of_handle_ssa): Remove.
(rest_of_compilation): Don't call it.
* toplev.h (flag_ssa, flag_ssa_dce, flag_ssa_ccp): Remove.
* doc/invoke.texi: Remove -fssa, -fssa-ccp, -fssa-dce.
* doc/passes.texi (SSA optimizations): Remove.
* gcc.dg/20020201-2.c: Remove.
* gcc.dg/20020201-4.c: Remove.
* gcc.dg/20020304-1.c: Remove.
Index: gcc/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/Makefile.in,v
retrieving revision 1.1199
diff -c -p -d -r1.1199 Makefile.in
*** gcc/Makefile.in 21 Nov 2003 00:39:18 -0000 1.1199
--- gcc/Makefile.in 21 Nov 2003 03:53:12 -0000
*************** OBJS-common = \
*** 865,879 ****
insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \
integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \
loop.o optabs.o options.o opts.o params.o postreload.o predict.o \
! print-rtl.o print-tree.o value-prof.o \
profile.o ra.o ra-build.o ra-colorize.o ra-debug.o ra-rewrite.o \
real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
! 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 \
--- 865,879 ----
insn-extract.o insn-opinit.o insn-output.o insn-peep.o insn-recog.o \
integrate.o intl.o jump.o langhooks.o lcm.o lists.o local-alloc.o \
loop.o optabs.o options.o opts.o params.o postreload.o predict.o \
! print-rtl.o print-tree.o value-prof.o \
profile.o ra.o ra-build.o ra-colorize.o ra-debug.o ra-rewrite.o \
real.o recog.o reg-stack.o regclass.o regmove.o regrename.o \
reload.o reload1.o reorg.o resource.o rtl.o rtlanal.o rtl-error.o \
sbitmap.o sched-deps.o sched-ebb.o sched-rgn.o sched-vis.o sdbout.o \
! sibcall.o simplify-rtx.o sreal.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 \
*************** version.o: version.c version.h
*** 1467,1473 ****
gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) varray.h \
$(HASHTAB_H) $(TREE_H) $(RTL_H) function.h insn-config.h $(EXPR_H) $(OPTABS_H) \
libfuncs.h debug.h $(GGC_H) bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h \
! ssa.h cselib.h insn-addr.h
ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \
$(HASHTAB_H) toplev.h $(PARAMS_H) hosthooks.h
--- 1467,1473 ----
gtype-desc.o: gtype-desc.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) varray.h \
$(HASHTAB_H) $(TREE_H) $(RTL_H) function.h insn-config.h $(EXPR_H) $(OPTABS_H) \
libfuncs.h debug.h $(GGC_H) bitmap.h $(BASIC_BLOCK_H) hard-reg-set.h \
! cselib.h insn-addr.h
ggc-common.o: ggc-common.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(GGC_H) \
$(HASHTAB_H) toplev.h $(PARAMS_H) hosthooks.h
*************** toplev.o : toplev.c $(CONFIG_H) $(SYSTEM
*** 1533,1539 ****
debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \
dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) value-prof.h \
! ssa.h $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h cfglayout.h real.h cfgloop.h \
hosthooks.h $(LANGHOOKS_DEF_H) cgraph.h $(COVERAGE_H)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
--- 1533,1539 ----
debug.h insn-config.h intl.h $(RECOG_H) Makefile toplev.h \
dwarf2out.h sdbout.h dbxout.h $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) \
graph.h $(LOOP_H) except.h $(REGS_H) $(TIMEVAR_H) value-prof.h \
! $(PARAMS_H) $(TM_P_H) reload.h dwarf2asm.h $(TARGET_H) \
langhooks.h insn-flags.h cfglayout.h real.h cfgloop.h \
hosthooks.h $(LANGHOOKS_DEF_H) cgraph.h $(COVERAGE_H)
$(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
*************** resource.o : resource.c $(CONFIG_H) $(RT
*** 1669,1682 ****
lcm.o : lcm.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) \
hard-reg-set.h flags.h real.h insn-config.h $(INSN_ATTR_H) $(RECOG_H) $(EXPR_H) \
$(BASIC_BLOCK_H) $(TM_P_H) df.h function.h
- ssa.o : ssa.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(REGS_H) varray.h \
- $(EXPR_H) hard-reg-set.h flags.h function.h real.h insn-config.h $(RECOG_H) \
- $(BASIC_BLOCK_H) output.h ssa.h
- ssa-dce.o : ssa-dce.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) hard-reg-set.h \
- $(BASIC_BLOCK_H) ssa.h insn-config.h $(RECOG_H) output.h
- ssa-ccp.o : ssa-ccp.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) hard-reg-set.h \
- $(BASIC_BLOCK_H) ssa.h insn-config.h $(RECOG_H) output.h \
- errors.h $(GGC_H) df.h function.h
df.o : df.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
insn-config.h $(RECOG_H) function.h $(REGS_H) alloc-pool.h hard-reg-set.h \
$(BASIC_BLOCK_H) df.h $(FIBHEAP_H)
--- 1669,1674 ----
*************** unroll.o : unroll.c $(CONFIG_H) $(SYSTEM
*** 1702,1708 ****
alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h
flow.o : flow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
flags.h insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
! $(RECOG_H) function.h except.h $(EXPR_H) ssa.h $(GGC_H) $(TM_P_H)
cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h insn-config.h \
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
function.h except.h $(GGC_H) $(TM_P_H) alloc-pool.h
--- 1694,1700 ----
alloc-pool.o : alloc-pool.c $(CONFIG_H) $(SYSTEM_H) alloc-pool.h
flow.o : flow.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) $(TREE_H) \
flags.h insn-config.h $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h \
! $(RECOG_H) function.h except.h $(EXPR_H) $(GGC_H) $(TM_P_H)
cfg.o : cfg.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) flags.h insn-config.h \
$(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
function.h except.h $(GGC_H) $(TM_P_H) alloc-pool.h
*************** GTFILES = $(srcdir)/input.h $(srcdir)/co
*** 2068,2074 ****
$(host_xm_file_list) $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) \
$(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
! $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/ssa.h $(srcdir)/insn-addr.h \
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h \
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
--- 2060,2066 ----
$(host_xm_file_list) $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) \
$(srcdir)/bitmap.h $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(srcdir)/hashtable.h \
! $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h \
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
$(srcdir)/c-common.h $(srcdir)/c-tree.h \
$(srcdir)/alias.c $(srcdir)/bitmap.c $(srcdir)/cselib.c $(srcdir)/cgraph.c \
Index: gcc/common.opt
===================================================================
RCS file: /cvs/gcc/gcc/gcc/common.opt,v
retrieving revision 1.20
diff -c -p -d -r1.20 common.opt
*** gcc/common.opt 19 Oct 2003 21:37:30 -0000 1.20
--- gcc/common.opt 21 Nov 2003 03:53:12 -0000
*************** fsingle-precision-constant
*** 628,645 ****
Common
Convert floating point constants to single precision constants
- fssa
- Common
- Enable static single assignment optimizations
-
- fssa-ccp
- Common
- Enable SSA conditional constant propagation
-
- fssa-dce
- Common
- Enable aggressive SSA dead code elimination
-
fstack-check
Common
Insert stack checking code into the program
--- 628,633 ----
Index: gcc/flow.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/flow.c,v
retrieving revision 1.563
diff -c -p -d -r1.563 flow.c
*** gcc/flow.c 17 Oct 2003 10:30:43 -0000 1.563
--- gcc/flow.c 21 Nov 2003 03:53:12 -0000
*************** Software Foundation, 59 Temple Place - S
*** 136,142 ****
#include "toplev.h"
#include "recog.h"
#include "expr.h"
- #include "ssa.h"
#include "timevar.h"
#include "obstack.h"
--- 136,141 ----
*************** static void notice_stack_pointer_modific
*** 293,299 ****
static void notice_stack_pointer_modification (rtx);
static void mark_reg (rtx, void *);
static void mark_regs_live_at_end (regset);
- static int set_phi_alternative_reg (rtx, int, int, void *);
static void calculate_global_regs_live (sbitmap, sbitmap, int);
static void propagate_block_delete_insn (rtx);
static rtx propagate_block_delete_libcall (rtx, rtx);
--- 292,297 ----
*************** mark_regs_live_at_end (regset set)
*** 1033,1052 ****
diddle_return_value (mark_reg, set);
}
- /* Callback function for for_each_successor_phi. DATA is a regset.
- Sets the SRC_REGNO, the regno of the phi alternative for phi node
- INSN, in the regset. */
-
- static int
- set_phi_alternative_reg (rtx insn ATTRIBUTE_UNUSED,
- int dest_regno ATTRIBUTE_UNUSED, int src_regno,
- void *data)
- {
- regset live = (regset) data;
- SET_REGNO_REG_SET (live, src_regno);
- return 0;
- }
-
/* Propagate global life info around the graph of basic blocks. Begin
considering blocks with their corresponding bit set in BLOCKS_IN.
If BLOCKS_IN is null, consider it the universal set.
--- 1031,1036 ----
*************** calculate_global_regs_live (sbitmap bloc
*** 1208,1221 ****
SET_REGNO_REG_SET (new_live_at_end, PIC_OFFSET_TABLE_REGNUM);
}
- /* Regs used in phi nodes are not included in
- global_live_at_start, since they are live only along a
- particular edge. Set those regs that are live because of a
- phi node alternative corresponding to this particular block. */
- if (in_ssa_form)
- for_each_successor_phi (bb, &set_phi_alternative_reg,
- new_live_at_end);
-
if (bb == ENTRY_BLOCK_PTR)
{
COPY_REG_SET (bb->global_live_at_end, new_live_at_end);
--- 1192,1197 ----
*************** mark_used_regs (struct propagate_block_i
*** 3907,3920 ****
cond = COND_EXEC_TEST (x);
x = COND_EXEC_CODE (x);
goto retry;
-
- case PHI:
- /* We _do_not_ want to scan operands of phi nodes. Operands of
- a phi function are evaluated only when control reaches this
- block along a particular edge. Therefore, regs that appear
- as arguments to phi should not be added to the global live at
- start. */
- return;
default:
break;
--- 3883,3888 ----
Index: gcc/gengtype.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gengtype.c,v
retrieving revision 1.40
diff -c -p -d -r1.40 gengtype.c
*** gcc/gengtype.c 18 Oct 2003 18:45:16 -0000 1.40
--- gcc/gengtype.c 21 Nov 2003 03:53:12 -0000
*************** open_base_files (void)
*** 1087,1093 ****
"config.h", "system.h", "coretypes.h", "tm.h", "varray.h",
"hashtab.h", "splay-tree.h", "bitmap.h", "tree.h", "rtl.h",
"function.h", "insn-config.h", "expr.h", "hard-reg-set.h",
! "basic-block.h", "cselib.h", "insn-addr.h", "ssa.h", "optabs.h",
"libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
NULL
};
--- 1087,1093 ----
"config.h", "system.h", "coretypes.h", "tm.h", "varray.h",
"hashtab.h", "splay-tree.h", "bitmap.h", "tree.h", "rtl.h",
"function.h", "insn-config.h", "expr.h", "hard-reg-set.h",
! "basic-block.h", "cselib.h", "insn-addr.h", "optabs.h",
"libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
NULL
};
Index: gcc/opts.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/opts.c,v
retrieving revision 1.45
diff -c -p -d -r1.45 opts.c
*** gcc/opts.c 9 Nov 2003 02:37:54 -0000 1.45
--- gcc/opts.c 21 Nov 2003 03:53:12 -0000
*************** common_handle_option (size_t scode, cons
*** 1299,1316 ****
flag_single_precision_constant = value;
break;
- case OPT_fssa:
- flag_ssa = value;
- break;
-
- case OPT_fssa_ccp:
- flag_ssa_ccp = value;
- break;
-
- case OPT_fssa_dce:
- flag_ssa_dce = value;
- break;
-
case OPT_fstack_check:
flag_stack_check = value;
break;
--- 1299,1304 ----
Index: gcc/rtl.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.def,v
retrieving revision 1.73
diff -c -p -d -r1.73 rtl.def
*** gcc/rtl.def 18 Oct 2003 18:45:15 -0000 1.73
--- gcc/rtl.def 21 Nov 2003 03:53:12 -0000
*************** DEF_RTL_EXPR(SS_TRUNCATE, "ss_truncate",
*** 1208,1227 ****
/* Unsigned saturating truncate. */
DEF_RTL_EXPR(US_TRUNCATE, "us_truncate", "e", '1')
- /* The SSA phi operator.
-
- The argument is a vector of 2N rtxes. Element 2N+1 is a CONST_INT
- containing the block number of the predecessor through which control
- has passed when the register at element 2N is used.
-
- Note that PHI may only appear at the beginning of a basic block.
-
- ??? There may be multiple PHI insns, but they are all evaluated
- in parallel. This probably ought to be changed to use a real
- PARALLEL, as that would be less confusing and more in the spirit
- of canonical RTL. It is, however, easier to manipulate this way. */
- DEF_RTL_EXPR(PHI, "phi", "E", 'x')
-
/*
Local variables:
--- 1208,1213 ----
Index: gcc/timevar.def
===================================================================
RCS file: /cvs/gcc/gcc/gcc/timevar.def,v
retrieving revision 1.21
diff -c -p -d -r1.21 timevar.def
*** gcc/timevar.def 19 Oct 2003 21:37:30 -0000 1.21
--- gcc/timevar.def 21 Nov 2003 03:53:12 -0000
*************** DEFTIMEVAR (TV_DBR_SCHED , "
*** 92,101 ****
DEFTIMEVAR (TV_REORDER_BLOCKS , "reorder blocks")
DEFTIMEVAR (TV_SHORTEN_BRANCH , "shorten branches")
DEFTIMEVAR (TV_REG_STACK , "reg stack")
- DEFTIMEVAR (TV_TO_SSA , "convert to SSA")
- DEFTIMEVAR (TV_SSA_CCP , "SSA CCP")
- DEFTIMEVAR (TV_SSA_DCE , "SSA aggressive DCE")
- DEFTIMEVAR (TV_FROM_SSA , "convert from SSA")
DEFTIMEVAR (TV_FINAL , "final")
DEFTIMEVAR (TV_SYMOUT , "symout")
--- 92,97 ----
Index: gcc/toplev.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.c,v
retrieving revision 1.844
diff -c -p -d -r1.844 toplev.c
*** gcc/toplev.c 13 Nov 2003 19:40:13 -0000 1.844
--- gcc/toplev.c 21 Nov 2003 03:53:12 -0000
*************** Software Foundation, 59 Temple Place - S
*** 63,69 ****
#include "regs.h"
#include "timevar.h"
#include "diagnostic.h"
- #include "ssa.h"
#include "params.h"
#include "reload.h"
#include "dwarf2asm.h"
--- 63,68 ----
*************** static void print_switch_values (FILE *,
*** 125,131 ****
/* Rest of compilation helper functions. */
static bool rest_of_handle_inlining (tree);
- static rtx rest_of_handle_ssa (tree, rtx);
static void rest_of_handle_cse (tree, rtx);
static void rest_of_handle_cse2 (tree, rtx);
static void rest_of_handle_gcse (tree, rtx);
--- 124,129 ----
*************** enum dump_file_index
*** 254,263 ****
DFI_sibling,
DFI_eh,
DFI_jump,
- DFI_ssa,
- DFI_ssa_ccp,
- DFI_ssa_dce,
- DFI_ussa,
DFI_null,
DFI_cse,
DFI_addressof,
--- 252,257 ----
*************** enum dump_file_index
*** 298,305 ****
Remaining -d letters:
! " m q "
! " JK O Q Y "
*/
static struct dump_file_info dump_file[DFI_MAX] =
--- 292,299 ----
Remaining -d letters:
! " e m q "
! " JK O Q WXY "
*/
static struct dump_file_info dump_file[DFI_MAX] =
*************** static struct dump_file_info dump_file[D
*** 309,318 ****
{ "sibling", 'i', 0, 0, 0 },
{ "eh", 'h', 0, 0, 0 },
{ "jump", 'j', 0, 0, 0 },
- { "ssa", 'e', 1, 0, 0 },
- { "ssaccp", 'W', 1, 0, 0 },
- { "ssadce", 'X', 1, 0, 0 },
- { "ussa", 'e', 1, 0, 0 }, /* Yes, duplicate enable switch. */
{ "null", 'u', 0, 0, 0 },
{ "cse", 's', 0, 0, 0 },
{ "addressof", 'F', 0, 0, 0 },
--- 303,308 ----
*************** int flag_gnu_linker = 1;
*** 904,918 ****
/* Nonzero means put zero initialized data in the bss section. */
int flag_zero_initialized_in_bss = 1;
- /* Enable SSA. */
- int flag_ssa = 0;
-
- /* Enable ssa conditional constant propagation. */
- int flag_ssa_ccp = 0;
-
- /* Enable ssa aggressive dead code elimination. */
- int flag_ssa_dce = 0;
-
/* Tag all structures with __attribute__(packed). */
int flag_pack_struct = 0;
--- 894,899 ----
*************** static const lang_independent_options f_
*** 1149,1157 ****
{"dump-unnumbered", &flag_dump_unnumbered, 1 },
{"instrument-functions", &flag_instrument_function_entry_exit, 1 },
{"zero-initialized-in-bss", &flag_zero_initialized_in_bss, 1 },
- {"ssa", &flag_ssa, 1 },
- {"ssa-ccp", &flag_ssa_ccp, 1 },
- {"ssa-dce", &flag_ssa_dce, 1 },
{"leading-underscore", &flag_leading_underscore, 1 },
{"ident", &flag_no_ident, 0 },
{ "peephole2", &flag_peephole2, 1 },
--- 1130,1135 ----
*************** rest_of_handle_inlining (tree decl)
*** 2750,2820 ****
return (bool) DECL_EXTERNAL (decl);
}
- /* Rest of compilation helper to convert the rtl to SSA form. */
- static rtx
- rest_of_handle_ssa (tree decl, rtx insns)
- {
- timevar_push (TV_TO_SSA);
- open_dump_file (DFI_ssa, decl);
-
- cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
- convert_to_ssa ();
-
- close_dump_file (DFI_ssa, print_rtl_with_bb, insns);
- timevar_pop (TV_TO_SSA);
-
- /* Perform sparse conditional constant propagation, if requested. */
- if (flag_ssa_ccp)
- {
- timevar_push (TV_SSA_CCP);
- open_dump_file (DFI_ssa_ccp, decl);
-
- ssa_const_prop ();
-
- close_dump_file (DFI_ssa_ccp, print_rtl_with_bb, get_insns ());
- timevar_pop (TV_SSA_CCP);
- }
-
- /* It would be useful to cleanup the CFG at this point, but block
- merging and possibly other transformations might leave a PHI
- node in the middle of a basic block, which is a strict no-no. */
-
- /* The SSA implementation uses basic block numbers in its phi
- nodes. Thus, changing the control-flow graph or the basic
- blocks, e.g., calling find_basic_blocks () or cleanup_cfg (),
- may cause problems. */
-
- if (flag_ssa_dce)
- {
- /* Remove dead code. */
-
- timevar_push (TV_SSA_DCE);
- open_dump_file (DFI_ssa_dce, decl);
-
- insns = get_insns ();
- ssa_eliminate_dead_code ();
-
- close_dump_file (DFI_ssa_dce, print_rtl_with_bb, insns);
- timevar_pop (TV_SSA_DCE);
- }
-
- /* Convert from SSA form. */
-
- timevar_push (TV_FROM_SSA);
- open_dump_file (DFI_ussa, decl);
-
- convert_from_ssa ();
- /* New registers have been created. Rescan their usage. */
- reg_scan (insns, max_reg_num (), 1);
-
- close_dump_file (DFI_ussa, print_rtl_with_bb, insns);
- timevar_pop (TV_FROM_SSA);
-
- ggc_collect ();
-
- return insns;
- }
-
/* Try to identify useless null pointer tests and delete them. */
static void
rest_of_handle_null_pointer (tree decl, rtx insns)
--- 2728,2733 ----
*************** rest_of_compilation (tree decl)
*** 3324,3335 ****
/* Now is when we stop if -fsyntax-only and -Wreturn-type. */
if (rtl_dump_and_exit || flag_syntax_only || DECL_DEFER_OUTPUT (decl))
goto exit_rest_of_compilation;
-
- /* Long term, this should probably move before the jump optimizer too,
- but I didn't want to disturb the rtl_dump_and_exit and related
- stuff at this time. */
- if (optimize > 0 && flag_ssa)
- insns = rest_of_handle_ssa (decl, insns);
timevar_push (TV_JUMP);
--- 3237,3242 ----
Index: gcc/toplev.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/toplev.h,v
retrieving revision 1.115
diff -c -p -d -r1.115 toplev.h
*** gcc/toplev.h 24 Oct 2003 21:28:10 -0000 1.115
--- gcc/toplev.h 21 Nov 2003 03:53:12 -0000
*************** extern int flag_unroll_loops;
*** 118,126 ****
extern int flag_unroll_all_loops;
extern int flag_unswitch_loops;
extern int flag_cprop_registers;
- extern int flag_ssa;
- extern int flag_ssa_ccp;
- extern int flag_ssa_dce;
extern int time_report;
extern int flag_new_regalloc;
--- 118,123 ----
Index: gcc/doc/invoke.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/invoke.texi,v
retrieving revision 1.360
diff -c -p -d -r1.360 invoke.texi
*** gcc/doc/invoke.texi 16 Nov 2003 11:24:56 -0000 1.360
--- gcc/doc/invoke.texi 21 Nov 2003 03:53:13 -0000
*************** in the following sections.
*** 291,297 ****
-fsched-stalled-insns=@var{n} -sched-stalled-insns-dep=@var{n} @gol
-fsched2-use-superblocks @gol
-fsched2-use-traces -fsignaling-nans @gol
! -fsingle-precision-constant -fssa -fssa-ccp -fssa-dce @gol
-fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps @gol
-funroll-all-loops -funroll-loops -fpeel-loops @gol
-funswitch-loops -fold-unroll-loops -fold-unroll-all-loops @gol
--- 291,297 ----
-fsched-stalled-insns=@var{n} -sched-stalled-insns-dep=@var{n} @gol
-fsched2-use-superblocks @gol
-fsched2-use-traces -fsignaling-nans @gol
! -fsingle-precision-constant @gol
-fstrength-reduce -fstrict-aliasing -ftracer -fthread-jumps @gol
-funroll-all-loops -funroll-loops -fpeel-loops @gol
-funswitch-loops -fold-unroll-loops -fold-unroll-all-loops @gol
*************** You will not be able to use @code{gprof}
*** 4674,4696 ****
specify this option and you may have problems with debugging if
you specify both this option and @option{-g}.
- @item -fssa
- @opindex fssa
- Perform optimizations in static single assignment form. Each function's
- flow graph is translated into SSA form, optimizations are performed, and
- the flow graph is translated back from SSA form. Users should not
- specify this option, since it is not yet ready for production use.
-
- @item -fssa-ccp
- @opindex fssa-ccp
- Perform Sparse Conditional Constant Propagation in SSA form. Requires
- @option{-fssa}. Like @option{-fssa}, this is an experimental feature.
-
- @item -fssa-dce
- @opindex fssa-dce
- Perform aggressive dead-code elimination in SSA form. Requires @option{-fssa}.
- Like @option{-fssa}, this is an experimental feature.
-
@item -fbranch-target-load-optimize
@opindex fbranch-target-load-optimize
Perform branch target register load optimization before prologue / epilogue
--- 4674,4679 ----
*************** a separate optimization pass.
*** 4703,4711 ****
@opindex fbranch-target-load-optimize2
Perform branch target register load optimization after prologue / epilogue
threading.
-
-
-
@item --param @var{name}=@var{value}
@opindex param
--- 4686,4691 ----
Index: gcc/doc/passes.texi
===================================================================
RCS file: /cvs/gcc/gcc/gcc/doc/passes.texi,v
retrieving revision 1.28
diff -c -p -d -r1.28 passes.texi
*** gcc/doc/passes.texi 11 Oct 2003 22:57:48 -0000 1.28
--- gcc/doc/passes.texi 21 Nov 2003 03:53:13 -0000
*************** the second conditional test. The source
*** 237,293 ****
@file{jump.c}. This optimization is only performed if
@option{-fthread-jumps} is enabled.
- @cindex SSA optimizations
- @cindex Single Static Assignment optimizations
- @opindex fssa
- @item
- Static Single Assignment (SSA) based optimization passes. The
- SSA conversion passes (to/from) are turned on by the @option{-fssa}
- option (it is also done automatically if you enable an SSA optimization pass).
- These passes utilize a form called Static Single Assignment. In SSA form,
- each variable (pseudo register) is only set once, giving you def-use
- and use-def chains for free, and enabling a lot more optimization
- passes to be run in linear time.
- Conversion to and from SSA form is handled by functions in
- @file{ssa.c}.
-
- @opindex de
- The option @option{-de} causes a debugging dump of the RTL code after
- this pass. This dump file's name is made by appending @samp{.ssa} to
- the input file name.
- @itemize @bullet
- @cindex SSA Conditional Constant Propagation
- @cindex Conditional Constant Propagation, SSA based
- @cindex conditional constant propagation
- @opindex fssa-ccp
- @item
- SSA Conditional Constant Propagation. Turned on by the @option{-fssa-ccp}
- option. This pass performs conditional constant propagation to simplify
- instructions including conditional branches. This pass is more aggressive
- than the constant propagation done by the CSE and GCSE passes, but operates
- in linear time.
-
- @opindex dW
- The option @option{-dW} causes a debugging dump of the RTL code after
- this pass. This dump file's name is made by appending @samp{.ssaccp} to
- the input file name.
-
- @cindex SSA DCE
- @cindex DCE, SSA based
- @cindex dead code elimination
- @opindex fssa-dce
- @item
- SSA Aggressive Dead Code Elimination. Turned on by the @option{-fssa-dce}
- option. This pass performs elimination of code considered unnecessary because
- it has no externally visible effects on the program. It operates in
- linear time.
-
- @opindex dX
- The option @option{-dX} causes a debugging dump of the RTL code after
- this pass. This dump file's name is made by appending @samp{.ssadce} to
- the input file name.
- @end itemize
-
@cindex common subexpression elimination
@cindex constant propagation
@item
--- 237,242 ----