From: Richard Henderson Date: Thu, 1 Jul 2004 08:23:29 +0000 (-0700) Subject: function.c (identify_blocks, [...]): Remove. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=e3b63af7b58b94a100340fc76efb60ed839e8607;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3e42262f5a3..ae10f5125c6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2004-07-01 Richard Henderson + + * 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 * builtins.c (fold_builtin_classify): New. diff --git a/gcc/function.c b/gcc/function.c index 3a9fc902860..7cfb1aaae87 100644 --- a/gcc/function.c +++ b/gcc/function.c @@ -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 diff --git a/gcc/function.h b/gcc/function.h index 7d8394b5123..ca15492bd86 100644 --- a/gcc/function.h +++ b/gcc/function.h @@ -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); diff --git a/gcc/rtl.h b/gcc/rtl.h index 0fa2c8cfda6..53db375e26b 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -981,7 +981,7 @@ enum insn_note NOTE_INSN_DELETED, /* These are used to mark the beginning and end of a lexical block. - See NOTE_BLOCK, identify_blocks and reorder_blocks. */ + See NOTE_BLOCK and reorder_blocks. */ NOTE_INSN_BLOCK_BEG, NOTE_INSN_BLOCK_END,