diff options
author | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-17 22:18:59 +0000 |
---|---|---|
committer | mmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-09-17 22:18:59 +0000 |
commit | 604c4de747a74a7b52bec1893133688439b9d269 (patch) | |
tree | 746da641a670a45baec442090a6d5de50aee6389 /gcc/integrate.c | |
parent | 2768cf814272d587bca00613a003b8eb736be754 (diff) | |
download | gcc-604c4de747a74a7b52bec1893133688439b9d269.tar.gz |
* functiion.h (struct function): Add x_whole_function_mode_p.
(retrofit_block): Declare.
* function.c (retrofit_block): New function.
(identify_blocks): Add assertions. Allow an incomplete set of
block notes if we're still generating code for the function.
* integrate.c: Include loop.h.
(expand_inline_function): Call find_loop_tree_blocks to map block
notes to blocks when in whole-function mode. Use retrofit_block
to insert new BLOCKs for the inlined function, rather than
insert_block.
* stmt.c (expand_fixup): Likewise. Don't use pushlevel/polevel.
* Makefile.in (integrate.o): Depend on loop.h.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@29487 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 3c278767ce0..e1b7990f21a 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */ #include "function.h" #include "toplev.h" #include "intl.h" +#include "loop.h" #include "obstack.h" #define obstack_chunk_alloc xmalloc @@ -74,8 +75,6 @@ static void set_decl_origin_self PROTO((tree)); static void set_block_abstract_flags PROTO((tree, int)); static void process_reg_param PROTO((struct inline_remap *, rtx, rtx)); - - void set_decl_abstract_flags PROTO((tree, int)); static tree copy_and_set_decl_abstract_origin PROTO((tree)); @@ -742,6 +741,11 @@ expand_inline_function (fndecl, parms, target, ignore, type, RTX_INTEGRATED_P (note) = 1; } + /* Figure out where the blocks are if we're going to have to insert + new BLOCKs into the existing block tree. */ + if (current_function->x_whole_function_mode_p) + find_loop_tree_blocks (); + /* Process each argument. For each, set up things so that the function's reference to the argument will refer to the argument being passed. We only replace REG with REG here. Any simplifications are done @@ -1279,7 +1283,16 @@ expand_inline_function (fndecl, parms, target, ignore, type, BLOCK_ABSTRACT_ORIGIN (block) = (DECL_ABSTRACT_ORIGIN (fndecl) == NULL ? fndecl : DECL_ABSTRACT_ORIGIN (fndecl)); inline_function_decl = 0; - insert_block (block); + + if (current_function->x_whole_function_mode_p) + /* Insert the block into the already existing block-tree. */ + retrofit_block (block, map->insns_at_start); + else + /* In statement-at-a-time mode, we just tell the front-end to add + this block to the list of blocks at this binding level. We + can't do it the way it's done for function-at-a-time mode the + superblocks have not been created yet. */ + insert_block (block); /* End the scope containing the copied formal parameter variables and copied LABEL_DECLs. We pass NULL_TREE for the variables list |