Commit c132886e by Richard Henderson Committed by Richard Henderson

ssa.c, [...]: Remove files.

        * 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.

From-SVN: r73789
parent bd6946d1
2003-11-20 Richard Henderson <rth@redhat.com>
* 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.
2003-11-20 Bob Wilson <bob.wilson@acm.org>
* configure.in: Add xtensa-*-* targets to test for dwarf2 debug_line.
......
......@@ -865,15 +865,15 @@ OBJS-common = \
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 \
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
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 \
......@@ -1467,7 +1467,7 @@ version.o: version.c version.h
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
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
......@@ -1533,7 +1533,7 @@ toplev.o : toplev.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) $(RTL_
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) \
$(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) \
......@@ -1669,14 +1669,6 @@ resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h $(SYSTEM_H) coretype
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)
......@@ -1702,7 +1694,7 @@ unroll.o : unroll.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) insn-co
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)
$(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
......@@ -2068,7 +2060,7 @@ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h $(srcdir)/cpplib.h \
$(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)/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 \
......
......@@ -628,18 +628,6 @@ fsingle-precision-constant
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
......
......@@ -291,7 +291,7 @@ in the following sections.
-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
-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
......@@ -4674,23 +4674,6 @@ You will not be able to use @code{gprof} on all systems if you
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
......@@ -4704,9 +4687,6 @@ a separate optimization pass.
Perform branch target register load optimization after prologue / epilogue
threading.
@item --param @var{name}=@var{value}
@opindex param
In some places, GCC uses various constants to control the amount of
......
......@@ -237,57 +237,6 @@ the second conditional test. The source code for this pass is in
@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
......
......@@ -136,7 +136,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "toplev.h"
#include "recog.h"
#include "expr.h"
#include "ssa.h"
#include "timevar.h"
#include "obstack.h"
......@@ -293,7 +292,6 @@ static void notice_stack_pointer_modification_1 (rtx, rtx, void *);
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);
......@@ -1033,20 +1031,6 @@ mark_regs_live_at_end (regset set)
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.
......@@ -1208,14 +1192,6 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
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);
......@@ -3908,14 +3884,6 @@ mark_used_regs (struct propagate_block_info *pbi, rtx x, rtx cond, rtx insn)
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;
}
......
......@@ -1087,7 +1087,7 @@ open_base_files (void)
"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",
"basic-block.h", "cselib.h", "insn-addr.h", "optabs.h",
"libfuncs.h", "debug.h", "ggc.h", "cgraph.h",
NULL
};
......
......@@ -1299,18 +1299,6 @@ common_handle_option (size_t scode, const char *arg,
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;
......
......@@ -1208,20 +1208,6 @@ DEF_RTL_EXPR(SS_TRUNCATE, "ss_truncate", "e", '1')
/* 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:
......
/* Static Single Assignment (SSA) definitions for GCC
Copyright (C) 2000, 2001, 2003 Free Software Foundation, Inc.
Written by Jeffrey D. Oldham <oldham@codesourcery.com>.
This file is part of GCC.
GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 2, or (at your option) any later
version.
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
02111-1307, USA. */
/* Main SSA routines. */
extern void convert_to_ssa (void);
extern void convert_from_ssa (void);
typedef int (*successor_phi_fn) (rtx, int, int, void *);
extern int for_each_successor_phi (basic_block bb, successor_phi_fn,
void *);
void compute_dominance_frontiers (sbitmap *frontiers, dominance_info idom);
extern int remove_phi_alternative (rtx, basic_block);
/* Optimizations. */
/* In ssa-dce.c */
extern void ssa_eliminate_dead_code (void);
/* In ssa-ccp.c */
extern void ssa_const_prop (void);
/* SSA definitions and uses. */
/* This flag is set when the CFG is in SSA form. */
extern int in_ssa_form;
/* Element I is the single instruction that sets register I. */
extern GTY(()) varray_type ssa_definition;
/* Element I is an INSN_LIST of instructions that use register I. */
extern varray_type ssa_uses;
/* Specify which hard registers should be converted. */
/* All pseudo-registers (having register number >=
FIRST_PSEUDO_REGISTER) and hard registers satisfying
CONVERT_HARD_REGISTER_TO_SSA_P are converted to SSA form. */
/* Given a hard register number REG_NO, return nonzero if and only if
the register should be converted to SSA. */
#ifndef CONVERT_HARD_REGISTER_TO_SSA_P
#define CONVERT_HARD_REGISTER_TO_SSA_P(REG_NO) (0) /* default of no hard registers */
#endif /* CONVERT_HARD_REGISTER_TO_SSA_P */
/* Given a register number REG_NO, return nonzero if and only if the
register should be converted to SSA. */
#define CONVERT_REGISTER_TO_SSA_P(REG_NO) \
((!HARD_REGISTER_NUM_P (REG_NO)) || \
(CONVERT_HARD_REGISTER_TO_SSA_P (REG_NO)))
2003-11-20 Richard Henderson <rth@redhat.com>
* gcc.dg/20020201-2.c: Remove.
* gcc.dg/20020201-4.c: Remove.
* gcc.dg/20020304-1.c: Remove.
2003-11-19 Nathanael Nerode <neroden@gcc.gnu.org>
* gcc.dg/cpp/trad/xwin1.c: New test case.
......
/* This testcase caused ICE because gcc was not able to add instructions
on edge from ENTRY block successor to itself. */
/* { dg-do compile } */
/* { dg-options "-O3 -fssa" } */
struct A { int a1; int a2; };
struct B { long int b[32]; };
extern int bar (struct B *, struct A *);
int
foo (struct B x)
{
struct A a, b;
struct B c;
int d;
while (1)
{
a.a1 = 0;
a.a2 = 0;
b = a;
c = x;
d = bar (&c, &b);
if (d >= 0)
return d;
}
return 0;
}
/* This testcase failed because recog_for_combine used to pass a different
pattern than contained in insn to recog. */
/* { dg-do compile } */
/* { dg-options "-O2 -fssa -fssa-ccp" } */
/* { dg-options "-O2 -march=i686 -fssa -fssa-ccp" { target i?86-*-* } } */
extern int bar (char *);
int
foo (void)
{
char b[512];
bar (b);
return __builtin_strlen (b);
}
/* { dg-do compile } */
/* { dg-options "-O -fssa -fssa-ccp" } */
double a[10][35], b[10][8];
int c, c, d, e, f, g, h;
int foo ()
{
int i, j, k, l;
if (c > 10)
c = 10;
for (j = 0; j < c; j++)
{
k = 0;
for (l = 0; l < h; l++)
{
if (d != 5)
return -1;
k = l * g;
a[j][k] = (double) e; k++;
a[j][k] = (double) f; k++;
}
for (i = 0;i < 35; i++)
{
if (a[j][i] >= 0.9)
a[j][i] = 0.9;
if (a[j][i] <= 0.1)
a[j][i] = 0.1;
}
k = 0;
b[j][k] = (double) e; k++;
b[j][k] = (double) f; k++;
}
return 0;
}
......@@ -92,10 +92,6 @@ DEFTIMEVAR (TV_DBR_SCHED , "delay branch sched")
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")
......
......@@ -63,7 +63,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "regs.h"
#include "timevar.h"
#include "diagnostic.h"
#include "ssa.h"
#include "params.h"
#include "reload.h"
#include "dwarf2asm.h"
......@@ -125,7 +124,6 @@ static void print_switch_values (FILE *, int, int, const char *,
/* 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);
......@@ -254,10 +252,6 @@ enum dump_file_index
DFI_sibling,
DFI_eh,
DFI_jump,
DFI_ssa,
DFI_ssa_ccp,
DFI_ssa_dce,
DFI_ussa,
DFI_null,
DFI_cse,
DFI_addressof,
......@@ -298,8 +292,8 @@ enum dump_file_index
Remaining -d letters:
" m q "
" JK O Q Y "
" e m q "
" JK O Q WXY "
*/
static struct dump_file_info dump_file[DFI_MAX] =
......@@ -309,10 +303,6 @@ static struct dump_file_info dump_file[DFI_MAX] =
{ "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 },
......@@ -904,15 +894,6 @@ int flag_gnu_linker = 1;
/* 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;
......@@ -1149,9 +1130,6 @@ static const lang_independent_options f_options[] =
{"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 },
......@@ -2750,71 +2728,6 @@ rest_of_handle_inlining (tree decl)
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)
......@@ -3325,12 +3238,6 @@ rest_of_compilation (tree decl)
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);
if (optimize)
......
......@@ -118,9 +118,6 @@ extern int flag_unroll_loops;
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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment