aboutsummaryrefslogtreecommitdiff
path: root/gcc/stmt.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-09-17 22:18:59 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-09-17 22:18:59 +0000
commite6fd097efca2e3f76d3fe51c55cd124998b7fd42 (patch)
tree746da641a670a45baec442090a6d5de50aee6389 /gcc/stmt.c
parentba7166773bd7a4d1e0da5bad0a61c20fac3bef78 (diff)
downloadgcc-e6fd097efca2e3f76d3fe51c55cd124998b7fd42.zip
gcc-e6fd097efca2e3f76d3fe51c55cd124998b7fd42.tar.gz
gcc-e6fd097efca2e3f76d3fe51c55cd124998b7fd42.tar.bz2
functiion.h (struct function): Add x_whole_function_mode_p.
* 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. From-SVN: r29487
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r--gcc/stmt.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 51110b8..5a9a25e 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -1016,13 +1016,24 @@ expand_fixup (tree_label, rtl_label, last_insn)
register rtx original_before_jump
= last_insn ? last_insn : get_last_insn ();
rtx start;
+ tree block;
+
+ block = make_node (BLOCK);
+ TREE_USED (block) = 1;
+
+ if (current_function->x_whole_function_mode_p)
+ {
+ find_loop_tree_blocks ();
+ retrofit_block (block, original_before_jump);
+ }
+ else
+ insert_block (block);
start_sequence ();
- pushlevel (0);
start = emit_note (NULL_PTR, NOTE_INSN_BLOCK_BEG);
fixup->before_jump = emit_note (NULL_PTR, NOTE_INSN_DELETED);
last_block_end_note = emit_note (NULL_PTR, NOTE_INSN_BLOCK_END);
- fixup->context = poplevel (1, 0, 0); /* Create the BLOCK node now! */
+ fixup->context = block;
end_sequence ();
emit_insns_after (start, original_before_jump);
}