mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-23 00:51:00 +08:00
function.c (identify_blocks, [...]): Remove.
* function.c (identify_blocks, identify_blocks_1): Remove. * function.h (identify_blocks): Remove. * rtl.h (NOTE_INSN_BLOCK_BEG): Update comment. From-SVN: r83961
This commit is contained in:
parent
64a9295a72
commit
e3b63af7b5
@ -1,3 +1,9 @@
|
||||
2004-07-01 Richard Henderson <rth@redhat.com>
|
||||
|
||||
* function.c (identify_blocks, identify_blocks_1): Remove.
|
||||
* function.h (identify_blocks): Remove.
|
||||
* rtl.h (NOTE_INSN_BLOCK_BEG): Update comment.
|
||||
|
||||
2004-07-01 Paolo Bonzini <bonzini@gnu.org>
|
||||
|
||||
* builtins.c (fold_builtin_classify): New.
|
||||
|
@ -252,7 +252,6 @@ static rtx instantiate_new_reg (rtx, HOST_WIDE_INT *);
|
||||
static int instantiate_virtual_regs_1 (rtx *, rtx, int);
|
||||
static void pad_to_arg_alignment (struct args_size *, int, struct args_size *);
|
||||
static void pad_below (struct args_size *, enum machine_mode, tree);
|
||||
static tree *identify_blocks_1 (rtx, tree *, tree *, tree *);
|
||||
static void reorder_blocks_1 (rtx, tree, varray_type *);
|
||||
static void reorder_fix_fragments (tree);
|
||||
static int all_blocks (tree, tree *);
|
||||
@ -5823,93 +5822,6 @@ fix_lexical_addr (rtx addr, tree var)
|
||||
return plus_constant (base, displacement);
|
||||
}
|
||||
|
||||
/* Put all this function's BLOCK nodes including those that are chained
|
||||
onto the first block into a vector, and return it.
|
||||
Also store in each NOTE for the beginning or end of a block
|
||||
the index of that block in the vector.
|
||||
The arguments are BLOCK, the chain of top-level blocks of the function,
|
||||
and INSNS, the insn chain of the function. */
|
||||
|
||||
void
|
||||
identify_blocks (void)
|
||||
{
|
||||
int n_blocks;
|
||||
tree *block_vector, *last_block_vector;
|
||||
tree *block_stack;
|
||||
tree block = DECL_INITIAL (current_function_decl);
|
||||
|
||||
if (block == 0)
|
||||
return;
|
||||
|
||||
/* Fill the BLOCK_VECTOR with all of the BLOCKs in this function, in
|
||||
depth-first order. */
|
||||
block_vector = get_block_vector (block, &n_blocks);
|
||||
block_stack = xmalloc (n_blocks * sizeof (tree));
|
||||
|
||||
last_block_vector = identify_blocks_1 (get_insns (),
|
||||
block_vector + 1,
|
||||
block_vector + n_blocks,
|
||||
block_stack);
|
||||
|
||||
/* If we didn't use all of the subblocks, we've misplaced block notes. */
|
||||
/* ??? This appears to happen all the time. Latent bugs elsewhere? */
|
||||
if (0 && last_block_vector != block_vector + n_blocks)
|
||||
abort ();
|
||||
|
||||
free (block_vector);
|
||||
free (block_stack);
|
||||
}
|
||||
|
||||
/* Subroutine of identify_blocks. Do the block substitution on the
|
||||
insn chain beginning with INSNS.
|
||||
|
||||
BLOCK_STACK is pushed and popped for each BLOCK_BEGIN/BLOCK_END pair.
|
||||
BLOCK_VECTOR is incremented for each block seen. */
|
||||
|
||||
static tree *
|
||||
identify_blocks_1 (rtx insns, tree *block_vector, tree *end_block_vector,
|
||||
tree *orig_block_stack)
|
||||
{
|
||||
rtx insn;
|
||||
tree *block_stack = orig_block_stack;
|
||||
|
||||
for (insn = insns; insn; insn = NEXT_INSN (insn))
|
||||
{
|
||||
if (GET_CODE (insn) == NOTE)
|
||||
{
|
||||
if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_BEG)
|
||||
{
|
||||
tree b;
|
||||
|
||||
/* If there are more block notes than BLOCKs, something
|
||||
is badly wrong. */
|
||||
if (block_vector == end_block_vector)
|
||||
abort ();
|
||||
|
||||
b = *block_vector++;
|
||||
NOTE_BLOCK (insn) = b;
|
||||
*block_stack++ = b;
|
||||
}
|
||||
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_BLOCK_END)
|
||||
{
|
||||
/* If there are more NOTE_INSN_BLOCK_ENDs than
|
||||
NOTE_INSN_BLOCK_BEGs, something is badly wrong. */
|
||||
if (block_stack == orig_block_stack)
|
||||
abort ();
|
||||
|
||||
NOTE_BLOCK (insn) = *--block_stack;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* If there are more NOTE_INSN_BLOCK_BEGINs than NOTE_INSN_BLOCK_ENDs,
|
||||
something is badly wrong. */
|
||||
if (block_stack != orig_block_stack)
|
||||
abort ();
|
||||
|
||||
return block_vector;
|
||||
}
|
||||
|
||||
/* Identify BLOCKs referenced by more than one NOTE_INSN_BLOCK_{BEG,END},
|
||||
and create duplicate blocks. */
|
||||
/* ??? Need an option to either create block fragments or to create
|
||||
|
@ -546,9 +546,6 @@ extern int trampolines_created;
|
||||
return the `struct function' for it. */
|
||||
struct function *find_function_data (tree);
|
||||
|
||||
/* Set NOTE_BLOCK for each block note in the current function. */
|
||||
extern void identify_blocks (void);
|
||||
|
||||
/* Identify BLOCKs referenced by more than one NOTE_INSN_BLOCK_{BEG,END},
|
||||
and create duplicate blocks. */
|
||||
extern void reorder_blocks (void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user