aboutsummaryrefslogtreecommitdiff
path: root/gcc/toplev.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-11-03 23:18:57 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-11-03 23:18:57 +0000
commitaeeeda0391708755e09263bec674298280794f60 (patch)
tree7691daea056bed68a7b131047a7e13c2876fb901 /gcc/toplev.c
parent0511851c7bebdaee1226960fe405c9089a120a23 (diff)
downloadgcc-aeeeda0391708755e09263bec674298280794f60.zip
gcc-aeeeda0391708755e09263bec674298280794f60.tar.gz
gcc-aeeeda0391708755e09263bec674298280794f60.tar.bz2
rtl.h (renumber_insns): New function.
* rtl.h (renumber_insns): New function. (remove_unnecessary_notes): Likewise. * emit-rtl.c (renumber_insns): Define. (remove_unncessary_notes): Likewise. * toplev.c (rest_of_compilation): Remove dead code. Use renumber_insns and remove_unncessary_notes. From-SVN: r30385
Diffstat (limited to 'gcc/toplev.c')
-rw-r--r--gcc/toplev.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 4152f23..232e515 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -3562,15 +3562,14 @@ rest_of_compilation (decl)
register rtx insns;
int start_time = get_run_time ();
int tem;
- /* Nonzero if we have saved the original DECL_INITIAL of the function,
- to be restored after we finish compiling the function
- (for use when compiling inline calls to this function). */
- tree saved_block_tree = 0;
- /* Likewise, for DECL_ARGUMENTS. */
- tree saved_arguments = 0;
int failure = 0;
int rebuild_label_notes_after_reload;
+ /* First, remove any notes we don't need. That will make iterating
+ over the instruction sequence faster, and allow the garbage
+ collector to reclaim the memory used by the notes. */
+ remove_unncessary_notes ();
+
/* If we are reconsidering an inline function
at the end of compilation, skip the stuff for making it inline. */
@@ -3792,6 +3791,13 @@ rest_of_compilation (decl)
if (ggc_p)
ggc_collect ();
+ /* Jump optimization, and the removal of NULL pointer checks, may
+ have reduced the number of instructions substantially. CSE, and
+ future passes, allocate arrays whose dimensions involve the maximum
+ instruction UID, so if we can reduce the maximum UID we'll save big on
+ memory. */
+ renumber_insns ();
+
/* Perform common subexpression elimination.
Nonzero value from `cse_main' means that jumps were simplified
and some code may now be unreachable, so do
@@ -3834,6 +3840,10 @@ rest_of_compilation (decl)
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".02.cse", insns);
}
+
+ /* The second pass of jump optimization is likely to have
+ removed a bunch more instructions. */
+ renumber_insns ();
}
purge_addressof (insns);
@@ -4455,18 +4465,6 @@ rest_of_compilation (decl)
sdbout_types (NULL_TREE);
#endif
- /* Put back the tree of subblocks and list of arguments
- from before we copied them.
- Code generation and the output of debugging info may have modified
- the copy, but the original is unchanged. */
-
- if (saved_block_tree != 0)
- {
- DECL_INITIAL (decl) = saved_block_tree;
- DECL_ARGUMENTS (decl) = saved_arguments;
- DECL_ABSTRACT_ORIGIN (decl) = NULL_TREE;
- }
-
reload_completed = 0;
flow2_completed = 0;
no_new_pseudos = 0;