aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>1999-12-16 17:50:29 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>1999-12-16 17:50:29 +0000
commita97901e608d0e3233e28a6d8e39d3124d661a650 (patch)
tree0e496457c98d2aabb71fdf3add8cb1bb884dc210 /gcc/function.c
parent0d9484c5ad47e319a075c5c091634b8adc3b9412 (diff)
downloadgcc-a97901e608d0e3233e28a6d8e39d3124d661a650.zip
gcc-a97901e608d0e3233e28a6d8e39d3124d661a650.tar.gz
gcc-a97901e608d0e3233e28a6d8e39d3124d661a650.tar.bz2
Makefile.in (INTREGRATE_H): Rename to INTEGRATE_H.
* Makefile.in (INTREGRATE_H): Rename to INTEGRATE_H. * function.c (insert_block_after_note): Remove. (retrofit_block): Likewise. (identify_blocks): Fix indentation. (reorder_blocks): Don't NULL out NOTE_SOURCE_FILE for a NOTE_INSN_BLOCK_BEG or NOTE_INSN_BLOCK_END. * function.h (insert_block_after_note): Remove prototype. (retrofit_block): Likewise. * integrate.c (expand_inline_function): Don't call find_loop_tree_blocks. Use expand_start_bindings_and_block, not just expand_start_bindings. Use the block_map to remap old NOTE_BLOCKs to new ones. (integrate_decl_tree): Keep track of remapped blocks. * integrate.h (struct inline_remap): Add block_map. * stmt.c (expand_fixup): Don't try to retrofit_blocks. Just set NOTE_BLOCK on the notes. (expand_start_bindings): Rename to ... (expand_start_bindings_and_block): Add parameter. Set NOTE_BLOCK. (expand_end_bindings): Set NOTE_BLOCK. * toplev.c (rest_of_compilation): In function-at-a-time-mode, reconstruct the BLOCK tree. * tree.h (expand_start_bindings): Macroize. Call ... (expand_start_bindings_and_block): New function. * optimize.c (struct inline_data): Remove scope_stmt. (remap_block): Don't use insert_block_after_note. Don't update scope_stmt. (expand_call_inline): Don't update scope_stmt. (optimize_function): Don't initialize scope_stmt. * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes. From-SVN: r30982
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c66
1 files changed, 2 insertions, 64 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 3211204..02ee9fb 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -5493,66 +5493,6 @@ round_trampoline_addr (tramp)
return 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. */
-
-void
-insert_block_after_note (block, old_block, begin_p)
- tree block;
- tree old_block;
- int begin_p;
-{
- if (begin_p)
- {
- /* 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)
- abort ();
-
- BLOCK_SUPERCONTEXT (block) = old_block;
- BLOCK_CHAIN (block) = BLOCK_SUBBLOCKS (old_block);
- BLOCK_SUBBLOCKS (old_block) = block;
- }
- else
- {
- BLOCK_SUPERCONTEXT (block) = BLOCK_SUPERCONTEXT (old_block);
- BLOCK_CHAIN (block) = BLOCK_CHAIN (old_block);
- BLOCK_CHAIN (old_block) = block;
- }
-}
-
-/* Insert the BLOCK in the block-tree before LAST_INSN. */
-
-void
-retrofit_block (block, last_insn)
- tree block;
- rtx last_insn;
-{
- rtx insn;
-
- /* Now insert the new BLOCK at the right place in the block trees
- for the function which called the inline function. We just look
- backwards for a NOTE_INSN_BLOCK_{BEG,END}. If we find the
- beginning of a block, then this new block becomes the first
- subblock of that block. If we find the end of a block, then this
- new block follows that block in the list of blocks. */
- for (insn = last_insn; insn; insn = PREV_INSN (insn))
- if (GET_CODE (insn) == NOTE
- && (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG
- || NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END))
- break;
-
- if (insn == NULL_RTX)
- abort ();
-
- insert_block_after_note (block,
- NOTE_BLOCK (insn),
- NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG);
-}
-
/* The functions identify_blocks and reorder_blocks provide a way to
reorder the tree of BLOCK nodes, for optimizers that reshuffle or
duplicate portions of the RTL code. Call identify_blocks before
@@ -5595,8 +5535,8 @@ identify_blocks (block, insns)
{
tree b;
- /* If there are more block notes than BLOCKs, something
- is badly wrong. */
+ /* If there are more block notes than BLOCKs, something
+ is badly wrong. */
if (current_block_number == n_blocks)
abort ();
@@ -5660,14 +5600,12 @@ reorder_blocks (block, insns)
BLOCK_CHAIN (block) = BLOCK_SUBBLOCKS (current_block);
BLOCK_SUBBLOCKS (current_block) = block;
current_block = block;
- NOTE_SOURCE_FILE (insn) = 0;
}
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
{
BLOCK_SUBBLOCKS (current_block)
= blocks_nreverse (BLOCK_SUBBLOCKS (current_block));
current_block = BLOCK_SUPERCONTEXT (current_block);
- NOTE_SOURCE_FILE (insn) = 0;
}
}