diff options
Diffstat (limited to 'gcc/passes.c')
-rw-r--r-- | gcc/passes.c | 36 |
1 files changed, 14 insertions, 22 deletions
diff --git a/gcc/passes.c b/gcc/passes.c index c290ff30d4e..4b50a1f5a41 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) |