diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-02 04:21:27 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-08-02 04:21:27 +0000 |
commit | 1deb248ef2fc317c1131553bd35ae9e2271882ab (patch) | |
tree | effa31090707b8e4d80bb9f56140fd2884c53bc1 /gcc/ssa.c | |
parent | 76c0b418e85d653b0fbdb1f9c5e6cd0150a760d5 (diff) | |
download | gcc-1deb248ef2fc317c1131553bd35ae9e2271882ab.tar.gz |
* Makefile.in (OBJS): Added dce.o.
(ssa.o): Updated target to include ssa.h.
(flow.o): Likewise.
(toplev.o): Likewise.
(dce.o): Created target.
* basic-block.h: Added comments.
(INVALID_BLOCK): Added definition.
(connect_infinite_loops_to_exit): Added declaration.
Moved SSA declarations to ssa.h.
* flow.c: Added inclusion of ssa.h.
(struct depth_first_search_dsS, depth_first_search_ds):
Added definitions.
(compute_immediate_postdominators): Added definition.
(connect_infinite_loops_to_exit): Likewise.
(flow_dfs_compute_reverse_init): Likewise.
(flow_dfs_compute_reverse_add_bb): Likewise.
(flow_dfs_compute_reverse_execute): Likewise.
(flow_dfs_compute_reverse_finish): Likewise.
* rtl.h (rtx/in_struct): Added use to determine insn necessity.
(LABEL_P): Added definition.
(JUMP_P): Likewise.
(NOTE_P): Likewise.
(BARRIER_P): Likewise.
(JUMP_TABLE_DATA_P): Likewise.
(INSN_DEAD_CODE_P): Likewise.
* ssa.c: Replaced inclusions with ssa.h inclusion.
(CONVERT_HARD_REGISTER_TO_SSA_P): Moved to ssa.h.
(rename_registers): Removed unnecessary variables.
* ssa.h: Created by moving declarations from ssa.c and
basic-block.h.
* timevar.def: Defined TV_DEAD_CODE_ELIM.
* toplev.c: Added ssa.h inclusion.
(dump_file_index): Added DFI_dce.
(dump_file): Added "dce" entry.
Defined flag_ssa.
(f_options): Added dce entry.
* invoke.texi: Document -fdce. Emphasize experimental status of
-fssa.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35419 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ssa.c')
-rw-r--r-- | gcc/ssa.c | 49 |
1 files changed, 15 insertions, 34 deletions
diff --git a/gcc/ssa.c b/gcc/ssa.c index 61ce4ced7e8..bb4bda71aab 100644 --- a/gcc/ssa.c +++ b/gcc/ssa.c @@ -46,6 +46,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "recog.h" #include "basic-block.h" #include "output.h" +#include "ssa.h" /* We cannot use <assert.h> in GCC source, since that would include GCC's assert.h, which may not be compatible with the host compiler. */ @@ -91,24 +92,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA left in for a limited time only, as a debugging tool until the coalescing algorithm is validated. */ -/* 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))) - static int conservative_reg_partition; /* This flag is set when the CFG is in SSA form. */ @@ -152,20 +135,20 @@ struct ssa_rename_from_hash_table_data { partition reg_partition; }; -void ssa_rename_from_initialize +static void ssa_rename_from_initialize PARAMS ((void)); -rtx ssa_rename_from_lookup +static rtx ssa_rename_from_lookup PARAMS ((int reg)); -unsigned int original_register +static unsigned int original_register PARAMS ((unsigned int regno)); -void ssa_rename_from_insert +static void ssa_rename_from_insert PARAMS ((unsigned int reg, rtx r)); -void ssa_rename_from_free +static void ssa_rename_from_free PARAMS ((void)); typedef int (*srf_trav) PARAMS ((int regno, rtx r, sbitmap canonical_elements, partition reg_partition)); static void ssa_rename_from_traverse PARAMS ((htab_trav callback_function, sbitmap canonical_elements, partition reg_partition)); -static void ssa_rename_from_print +/*static Avoid warnign message. */ void ssa_rename_from_print PARAMS ((void)); static int ssa_rename_from_print_1 PARAMS ((void **slot, void *data)); @@ -299,7 +282,7 @@ ssa_rename_to_insert(reg, r) /* Prepare ssa_rename_from for use. */ -void +static void ssa_rename_from_initialize () { /* We use an arbitrary initial hash table size of 64. */ @@ -312,7 +295,7 @@ ssa_rename_from_initialize () /* Find the REG entry in ssa_rename_from. Return NULL_RTX if no entry is found. */ -rtx +static rtx ssa_rename_from_lookup (reg) int reg; { @@ -329,7 +312,7 @@ ssa_rename_from_lookup (reg) the register is a pseudo, return the original register's number. Otherwise, return this register number REGNO. */ -unsigned int +static unsigned int original_register (regno) unsigned int regno; { @@ -339,7 +322,7 @@ original_register (regno) /* Add mapping from R to REG to ssa_rename_from even if already present. */ -void +static void ssa_rename_from_insert (reg, r) unsigned int reg; rtx r; @@ -359,7 +342,7 @@ ssa_rename_from_insert (reg, r) CANONICAL_ELEMENTS and REG_PARTITION pass data needed by the only current use of this function. */ -void +static void ssa_rename_from_traverse (callback_function, canonical_elements, reg_partition) htab_trav callback_function; @@ -374,7 +357,7 @@ ssa_rename_from_traverse (callback_function, /* Destroy ssa_rename_from. */ -void +static void ssa_rename_from_free () { htab_delete (ssa_rename_from_ht); @@ -382,7 +365,8 @@ ssa_rename_from_free () /* Print the contents of ssa_rename_from. */ -static void +/* static Avoid erroneous error message. */ +void ssa_rename_from_print () { printf ("ssa_rename_from's hash table contents:\n"); @@ -1146,9 +1130,6 @@ rename_registers (nregs, idom) int nregs; int *idom; { - int reg; - int mach_mode; - VARRAY_RTX_INIT (ssa_definition, nregs * 3, "ssa_definition"); VARRAY_RTX_INIT (ssa_uses, nregs * 3, "ssa_uses"); ssa_rename_from_initialize (); |