From bf3a27b83f6d5fc0203eb4eca0bbaf425d737532 Mon Sep 17 00:00:00 2001 From: marxin Date: Wed, 4 Nov 2015 16:50:45 +0000 Subject: Pass manager: add support for termination of pass list * cgraphunit.c (cgraph_node::expand_thunk): Call allocate_struct_function before init_function_start. (cgraph_node::expand): Use push_cfun and pop_cfun. * config/i386/i386.c (ix86_code_end): Call allocate_struct_function before init_function_start. * config/rs6000/rs6000.c (rs6000_code_end): Likewise. * function.c (init_function_start): Move preamble to all callers. * passes.c (do_per_function_toporder): Use push_cfun and pop_cfun. (execute_one_pass): Handle newly added TODO_discard_function. (execute_pass_list_1): Terminate if cfun equals to NULL. (execute_pass_list): Do not push and pop cfun, expect that cfun is set. * tree-pass.h (TODO_discard_function): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@229764 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/function.c | 5 ----- 1 file changed, 5 deletions(-) (limited to 'gcc/function.c') diff --git a/gcc/function.c b/gcc/function.c index aaf49a4bbb9..0d7cabc1d4c 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -4957,11 +4957,6 @@ init_dummy_function_start (void) void init_function_start (tree subr) { - if (subr && DECL_STRUCT_FUNCTION (subr)) - set_cfun (DECL_STRUCT_FUNCTION (subr)); - else - allocate_struct_function (subr, false); - /* Initialize backend, if needed. */ initialize_rtl (); -- cgit v1.2.1