diff options
author | Jason Merrill <jason@casey.cygnus.com> | 1999-12-16 00:09:35 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1999-12-15 19:09:35 -0500 |
commit | 5afb79e7f856b5a9b4414ee34940b568aa77abe8 (patch) | |
tree | 8f73132ac5140a32542ad1c3a7a0a0ab4b8f62b4 /gcc/function.c | |
parent | 6150df627a7fb825a10280e54c35c8250e69bae0 (diff) | |
download | gcc-5afb79e7f856b5a9b4414ee34940b568aa77abe8.zip gcc-5afb79e7f856b5a9b4414ee34940b568aa77abe8.tar.gz gcc-5afb79e7f856b5a9b4414ee34940b568aa77abe8.tar.bz2 |
function.c (retrofit_block): Abort if we don't find a suitable insn.
* function.c (retrofit_block): Abort if we don't find a suitable insn.
(insert_block_after_note): Abort if we don't have a previous block.
Remove FN parameter.
* function.h: Adjust.
* tree.c (walk_tree): Walk operand subtrees in forward order.
* optimize.c (expand_call_inline): Likewise.
(optimize_function): Initialize id->scope_stmt to something useful.
(remap_block): Assume id->scope_stmt has a useful value.
From-SVN: r30965
Diffstat (limited to 'gcc/function.c')
-rw-r--r-- | gcc/function.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/gcc/function.c b/gcc/function.c index 2392f32..3211204 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -5495,22 +5495,22 @@ round_trampoline_addr (tramp) /* Insert the BLOCK in the block-tree, knowing that the previous block-note is for OLD_BLOCK. BEGIN_P is non-zero if the previous - block-note was the for the beginning of a BLOCK. FN is the - FUNCTION_DECL into which the BLOCK is being inserted. */ + block-note was the for the beginning of a BLOCK. */ void -insert_block_after_note (block, old_block, begin_p, fn) +insert_block_after_note (block, old_block, begin_p) tree block; tree old_block; int begin_p; - tree fn; { if (begin_p) { - /* If there was no previous block, use the top-level block for - the function. */ + /* If there was no previous block, something's gone terribly + wrong. We used to try to use DECL_INITIAL for the current + function, but that will never be correct, and completely + hoses the block structure. */ if (!old_block) - old_block = DECL_INITIAL (fn); + abort (); BLOCK_SUPERCONTEXT (block) = old_block; BLOCK_CHAIN (block) = BLOCK_SUBBLOCKS (old_block); @@ -5545,12 +5545,12 @@ retrofit_block (block, last_insn) || NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)) break; + if (insn == NULL_RTX) + abort (); + insert_block_after_note (block, - insn ? NOTE_BLOCK (insn) : NULL_TREE, - insn - ? (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG) - : 1, - current_function_decl); + NOTE_BLOCK (insn), + NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG); } /* The functions identify_blocks and reorder_blocks provide a way to |