Commit 62d285ff by Jeffrey A Law Committed by Jeff Law

ssa-dce.c (ssa_eliminate_dead_code): Renamed from eliminate_date_code.

        * ssa-dce.c (ssa_eliminate_dead_code): Renamed from
        eliminate_date_code.
        * ssa.h (ssa_eliminate_dead_code): Corresponding changes.
        * timevar.def (TV_SSA_DCE): Renamed from TV_DEAD_CODE_ELIM.
        * toplev.c (DFI_ssa_dce): Renamed from DFI_dce.
        (dump_file_info): Similar changes.
        (flag_ssa_dce): Similarly
        (f_options): Similar changes.
        (rest_of_compilation): Corresponding changes.
        * doc/invoke.texi: Update as option is now -fssa-dce instead
        of -fdce.  Update dump file name.

From-SVN: r43658
parent 8f2f6da1
Fri Jun 29 12:27:24 2001 Jeffrey A Law (law@cygnus.com) Fri Jun 29 12:27:24 2001 Jeffrey A Law (law@cygnus.com)
* ssa-dce.c (ssa_eliminate_dead_code): Renamed from
eliminate_date_code.
* ssa.h (ssa_eliminate_dead_code): Corresponding changes.
* timevar.def (TV_SSA_DCE): Renamed from TV_DEAD_CODE_ELIM.
* toplev.c (DFI_ssa_dce): Renamed from DFI_dce.
(dump_file_info): Similar changes.
(flag_ssa_dce): Similarly
(f_options): Similar changes.
(rest_of_compilation): Corresponding changes.
* doc/invoke.texi: Update as option is now -fssa-dce instead
of -fdce. Update dump file name.
* ssa-dce.c (note_inherently_necessary_set): New function. * ssa-dce.c (note_inherently_necessary_set): New function.
(find_inherently_necessary): Use it. Do not consider (find_inherently_necessary): Use it. Do not consider
NOTEs, CODE_LABELs or BARRIERS are necessary. Improve NOTEs, CODE_LABELs or BARRIERS are necessary. Improve
......
...@@ -254,7 +254,7 @@ in the following sections. ...@@ -254,7 +254,7 @@ in the following sections.
-falign-functions=@var{n} -falign-jumps=@var{n} @gol -falign-functions=@var{n} -falign-jumps=@var{n} @gol
-falign-labels=@var{n} -falign-loops=@var{n} @gol -falign-labels=@var{n} -falign-loops=@var{n} @gol
-fbranch-probabilities -fcaller-saves @gol -fbranch-probabilities -fcaller-saves @gol
-fcse-follow-jumps -fcse-skip-blocks -fdata-sections -fdce @gol -fcse-follow-jumps -fcse-skip-blocks -fdata-sections @gol
-fdelayed-branch -fdelete-null-pointer-checks @gol -fdelayed-branch -fdelete-null-pointer-checks @gol
-fexpensive-optimizations -ffast-math -ffloat-store @gol -fexpensive-optimizations -ffast-math -ffloat-store @gol
-fforce-addr -fforce-mem -ffunction-sections @gol -fforce-addr -fforce-mem -ffunction-sections @gol
...@@ -270,7 +270,7 @@ in the following sections. ...@@ -270,7 +270,7 @@ in the following sections.
-fregmove -frename-registers @gol -fregmove -frename-registers @gol
-frerun-cse-after-loop -frerun-loop-opt @gol -frerun-cse-after-loop -frerun-loop-opt @gol
-fschedule-insns -fschedule-insns2 @gol -fschedule-insns -fschedule-insns2 @gol
-fsingle-precision-constant -fssa @gol -fsingle-precision-constant -fssa -fssa-dce @gol
-fstrength-reduce -fstrict-aliasing -fthread-jumps -ftrapv @gol -fstrength-reduce -fstrict-aliasing -fthread-jumps -ftrapv @gol
-funroll-all-loops -funroll-loops @gol -funroll-all-loops -funroll-loops @gol
--param @var{name}=@var{value} --param @var{name}=@var{value}
...@@ -2946,7 +2946,7 @@ sometimes follows CSE), to @file{@var{file}.10.cse2}. ...@@ -2946,7 +2946,7 @@ sometimes follows CSE), to @file{@var{file}.10.cse2}.
Dump after the second flow pass, to @file{@var{file}.21.flow2}. Dump after the second flow pass, to @file{@var{file}.21.flow2}.
@item X @item X
@opindex dX @opindex dX
Dump after dead code elimination, to @file{@var{file}.06.dce}. Dump after SSA aggressive dead code elimination, to @file{@var{file}.06.ssadce}.
@item z @item z
@opindex dz @opindex dz
Dump after the peephole pass, to @file{@var{file}.22.peephole2}. Dump after the peephole pass, to @file{@var{file}.22.peephole2}.
...@@ -3732,10 +3732,10 @@ flow graph is translated into SSA form, optimizations are performed, and ...@@ -3732,10 +3732,10 @@ flow graph is translated into SSA form, optimizations are performed, and
the flow graph is translated back from SSA form. Users should not the flow graph is translated back from SSA form. Users should not
specify this option, since it is not yet ready for production use. specify this option, since it is not yet ready for production use.
@item -fdce @item -fssa-dce
@opindex fdce @opindex fssa-dce
Perform dead-code elimination in SSA form. Requires @option{-fssa}. Like Perform aggressive dead-code elimination in SSA form. Requires @option{-fssa}.
@option{-fssa}, this is an experimental feature. Like @option{-fssa}, this is an experimental feature.
@item -fsingle-precision-constant @item -fsingle-precision-constant
@opindex fsingle-precision-constant @opindex fsingle-precision-constant
......
...@@ -503,7 +503,7 @@ delete_insn_bb (insn) ...@@ -503,7 +503,7 @@ delete_insn_bb (insn)
/* Perform the dead-code elimination. */ /* Perform the dead-code elimination. */
void void
eliminate_dead_code () ssa_eliminate_dead_code ()
{ {
int i; int i;
rtx insn; rtx insn;
......
...@@ -33,7 +33,7 @@ extern int remove_phi_alternative PARAMS ((rtx, basic_block)); ...@@ -33,7 +33,7 @@ extern int remove_phi_alternative PARAMS ((rtx, basic_block));
/* Optimizations. */ /* Optimizations. */
/* In ssa-dce.c */ /* In ssa-dce.c */
extern void eliminate_dead_code PARAMS ((void)); extern void ssa_eliminate_dead_code PARAMS ((void));
/* SSA definitions and uses. */ /* SSA definitions and uses. */
/* This flag is set when the CFG is in SSA form. */ /* This flag is set when the CFG is in SSA form. */
......
...@@ -70,7 +70,7 @@ DEFTIMEVAR (TV_REORDER_BLOCKS , "reorder blocks") ...@@ -70,7 +70,7 @@ DEFTIMEVAR (TV_REORDER_BLOCKS , "reorder blocks")
DEFTIMEVAR (TV_SHORTEN_BRANCH , "shorten branches") DEFTIMEVAR (TV_SHORTEN_BRANCH , "shorten branches")
DEFTIMEVAR (TV_REG_STACK , "reg stack") DEFTIMEVAR (TV_REG_STACK , "reg stack")
DEFTIMEVAR (TV_TO_SSA , "convert to SSA") DEFTIMEVAR (TV_TO_SSA , "convert to SSA")
DEFTIMEVAR (TV_DEAD_CODE_ELIM , "eliminate dead code") DEFTIMEVAR (TV_SSA_DCE , "SSA aggressive DCE")
DEFTIMEVAR (TV_FROM_SSA , "convert from SSA") DEFTIMEVAR (TV_FROM_SSA , "convert from SSA")
DEFTIMEVAR (TV_FINAL , "final") DEFTIMEVAR (TV_FINAL , "final")
DEFTIMEVAR (TV_SYMOUT , "symout") DEFTIMEVAR (TV_SYMOUT , "symout")
......
...@@ -256,7 +256,7 @@ enum dump_file_index ...@@ -256,7 +256,7 @@ enum dump_file_index
DFI_cse, DFI_cse,
DFI_addressof, DFI_addressof,
DFI_ssa, DFI_ssa,
DFI_dce, DFI_ssa_dce,
DFI_ussa, DFI_ussa,
DFI_gcse, DFI_gcse,
DFI_loop, DFI_loop,
...@@ -302,7 +302,7 @@ struct dump_file_info dump_file[DFI_MAX] = ...@@ -302,7 +302,7 @@ struct dump_file_info dump_file[DFI_MAX] =
{ "cse", 's', 0, 0, 0 }, { "cse", 's', 0, 0, 0 },
{ "addressof", 'F', 0, 0, 0 }, { "addressof", 'F', 0, 0, 0 },
{ "ssa", 'e', 1, 0, 0 }, { "ssa", 'e', 1, 0, 0 },
{ "dce", 'X', 1, 0, 0 }, { "ssadce", 'X', 1, 0, 0 },
{ "ussa", 'e', 1, 0, 0 }, /* Yes, duplicate enable switch. */ { "ussa", 'e', 1, 0, 0 }, /* Yes, duplicate enable switch. */
{ "gcse", 'G', 1, 0, 0 }, { "gcse", 'G', 1, 0, 0 },
{ "loop", 'L', 1, 0, 0 }, { "loop", 'L', 1, 0, 0 },
...@@ -819,7 +819,7 @@ int flag_gnu_linker = 1; ...@@ -819,7 +819,7 @@ int flag_gnu_linker = 1;
int flag_ssa = 0; int flag_ssa = 0;
/* Enable dead code elimination. */ /* Enable dead code elimination. */
int flag_dce = 0; int flag_ssa_dce = 0;
/* Tag all structures with __attribute__(packed). */ /* Tag all structures with __attribute__(packed). */
int flag_pack_struct = 0; int flag_pack_struct = 0;
...@@ -1142,8 +1142,8 @@ lang_independent_options f_options[] = ...@@ -1142,8 +1142,8 @@ lang_independent_options f_options[] =
N_("Instrument function entry/exit with profiling calls") }, N_("Instrument function entry/exit with profiling calls") },
{"ssa", &flag_ssa, 1, {"ssa", &flag_ssa, 1,
N_("Enable SSA optimizations") }, N_("Enable SSA optimizations") },
{"dce", &flag_dce, 1, {"ssa-dce", &flag_ssa_dce, 1,
N_("Enable dead code elimination") }, N_("Enable aggressive SSA dead code elimination") },
{"leading-underscore", &flag_leading_underscore, 1, {"leading-underscore", &flag_leading_underscore, 1,
N_("External symbols have a leading underscore") }, N_("External symbols have a leading underscore") },
{"ident", &flag_no_ident, 0, {"ident", &flag_no_ident, 0,
...@@ -3064,18 +3064,18 @@ rest_of_compilation (decl) ...@@ -3064,18 +3064,18 @@ rest_of_compilation (decl)
blocks, e.g., calling find_basic_blocks () or cleanup_cfg (), blocks, e.g., calling find_basic_blocks () or cleanup_cfg (),
may cause problems. */ may cause problems. */
if (flag_dce) if (flag_ssa_dce)
{ {
/* Remove dead code. */ /* Remove dead code. */
timevar_push (TV_DEAD_CODE_ELIM); timevar_push (TV_SSA_DCE);
open_dump_file (DFI_dce, decl); open_dump_file (DFI_ssa_dce, decl);
insns = get_insns (); insns = get_insns ();
eliminate_dead_code(); ssa_eliminate_dead_code();
close_dump_file (DFI_dce, print_rtl_with_bb, insns); close_dump_file (DFI_ssa_dce, print_rtl_with_bb, insns);
timevar_pop (TV_DEAD_CODE_ELIM); timevar_pop (TV_SSA_DCE);
} }
/* Convert from SSA form. */ /* Convert from SSA form. */
......
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