aboutsummaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authorSteven Bosscher <steven@gcc.gnu.org>2004-07-27 19:09:32 +0000
committerSteven Bosscher <steven@gcc.gnu.org>2004-07-27 19:09:32 +0000
commit3fbd86b1a8f955095a30129300bf55d12195b392 (patch)
tree3d2deb55bb0ac08950644e984c159ecbcc49e955 /gcc/passes.c
parentd078f7c01015454aeb28818c67a69198659ecf85 (diff)
downloadgcc-3fbd86b1a8f955095a30129300bf55d12195b392.zip
gcc-3fbd86b1a8f955095a30129300bf55d12195b392.tar.gz
gcc-3fbd86b1a8f955095a30129300bf55d12195b392.tar.bz2
cfgexpand.c (tree_expand_cfg): Fix comment.
* cfgexpand.c (tree_expand_cfg): Fix comment. * calls.c (expand_call): Ignore rtx_equal_function_value_matters. * function.c (purge_single_hard_subreg_set, purge_hard_subreg_sets): Remove. (prepare_function_start): Don't set rtx_equal_function_value_matters. * integrate.c (copy_rtx_and_substitute): Don't test for it. * passes.c (rest_of_compilation): Don't call purge_hard_subreg_sets. Don't set rtx_equal_function_value_matters. Don't register RTL hooks here again. Update leading comment. * rtl.c (rtx_equal_function_value_matters): Remove. (rtx_equal_p): Don't test for it. * simplify-rtx.c (simplify_binary_operation, simplify_subreg): Likewise. * rtl.h (enum insn_note): Remove NOTE_INSN_LOOP_END_TOP_COND. * rtl.c (note_insn_name): Likewise. * emit-rtl.c (remove_unnecessary_notes): Don't handle it. * final.c (final_scan_insn): Likewise. * except.c (finish_eh_generation): Don't call cfg_cleanup from here. * passes.c (rest_of_handle_eh): Do it here. * stmt.c (struct nesting): Remove struct nesting block member. (struct stmt_status): Remove x_block_start_count field. (current_block_start_count): Remove. From-SVN: r85228
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c36
1 files changed, 14 insertions, 22 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index c290ff30..4b50a1f 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -1481,8 +1481,12 @@ rest_of_handle_eh (void)
timevar_push (TV_JUMP);
open_dump_file (DFI_eh, current_function_decl);
+ cleanup_cfg (CLEANUP_PRE_LOOP | CLEANUP_NO_INSN_DEL);
+
finish_eh_generation ();
+ cleanup_cfg (CLEANUP_PRE_LOOP | CLEANUP_NO_INSN_DEL);
+
close_dump_file (DFI_eh, print_rtl, get_insns ());
timevar_pop (TV_JUMP);
}
@@ -1698,11 +1702,14 @@ rest_of_clean_state (void)
}
-/* This is called from finish_function (within langhooks.parse_file)
- after each top-level definition is parsed.
- It is supposed to compile that function or variable
- and output the assembler code for it.
- After we return, the tree storage is freed. */
+/* This function is called from the pass manager in tree-optimize.c
+ after all tree passes have finished for a single function, and we
+ have expanded the function body from trees to RTL.
+ Once we are here, we have decided that we're supposed to output
+ that function, ie. that we should write assembler code for it.
+
+ We run a series of low-level passes here on the function's RTL
+ representation. Each pass is called via a rest_of_* function. */
void
rest_of_compilation (void)
@@ -1711,11 +1718,8 @@ rest_of_compilation (void)
know we want to output it. */
DECL_DEFER_OUTPUT (current_function_decl) = 0;
- /* Register rtl specific functions for cfg. */
- rtl_register_cfg_hooks ();
-
- /* Now that we're out of the frontend, we shouldn't have any more
- CONCATs anywhere. */
+ /* Now that we're done expanding trees to RTL, we shouldn't have any
+ more CONCATs anywhere. */
generating_concat_p = 0;
/* When processing delayed functions, prepare_function_start () won't
@@ -1760,18 +1764,6 @@ rest_of_compilation (void)
TREE_ASM_WRITTEN (current_function_decl) = 1;
- /* Now that integrate will no longer see our rtl, we need not
- distinguish between the return value of this function and the
- return value of called functions. Also, we can remove all SETs
- of subregs of hard registers; they are only here because of
- integrate. Also, we can now initialize pseudos intended to
- carry magic hard reg data throughout the function.
-
- FIXME: All this looks thoroughly obsolete... maybe we can
- get rid of both these lines unconditionally? */
- rtx_equal_function_value_matters = 0;
- purge_hard_subreg_sets (get_insns ());
-
/* Early return if there were errors. We can run afoul of our
consistency checks, and there's not really much point in fixing them. */
if (rtl_dump_and_exit || flag_syntax_only || errorcount || sorrycount)