Commit 597d6703 by Kazu Hirata Committed by Kazu Hirata

Makefile.in (GTFILES): Move functions.h after tree.h.

	* Makefile.in (GTFILES): Move functions.h after tree.h.
	* function.c (reset_block_changes, record_block_change,
	check_block_change, free_block_changes): Use VEC instead of
	VARRAY.
	* function.h (function): Change the type of
	ib_boundaries_block to VEC(tree,gc) *.
	* tree-inline.c (copy_cfg_body): Initialize
	ib_boundaries_block to NULL instead of (varray_type) 0.

From-SVN: r112894
parent dacb336e
...@@ -9,6 +9,15 @@ ...@@ -9,6 +9,15 @@
first_partition to VEC(int,heap) *. first_partition to VEC(int,heap) *.
(tpa_first_partition): Use VEC instead of VARRAY. (tpa_first_partition): Use VEC instead of VARRAY.
* Makefile.in (GTFILES): Move functions.h after tree.h.
* function.c (reset_block_changes, record_block_change,
check_block_change, free_block_changes): Use VEC instead of
VARRAY.
* function.h (function): Change the type of
ib_boundaries_block to VEC(tree,gc) *.
* tree-inline.c (copy_cfg_body): Initialize
ib_boundaries_block to NULL instead of (varray_type) 0.
2006-04-12 Roger Sayle <roger@eyesopen.com> 2006-04-12 Roger Sayle <roger@eyesopen.com>
* expr.c (emit_group_store): Correct operand order in call to * expr.c (emit_group_store): Correct operand order in call to
......
...@@ -2803,8 +2803,8 @@ s-constrs-h: $(MD_DEPS) build/genpreds$(build_exeext) ...@@ -2803,8 +2803,8 @@ s-constrs-h: $(MD_DEPS) build/genpreds$(build_exeext)
GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \ GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
$(CPP_ID_DATA_H) $(host_xm_file_list) \ $(CPP_ID_DATA_H) $(host_xm_file_list) \
$(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \ $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
$(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \ $(srcdir)/coverage.c $(srcdir)/rtl.h \
$(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(SYMTAB_H) \ $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/function.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
$(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \ $(srcdir)/real.h $(srcdir)/varray.h $(srcdir)/insn-addr.h $(srcdir)/hwint.h \
$(srcdir)/ipa-reference.h $(srcdir)/output.h \ $(srcdir)/ipa-reference.h $(srcdir)/output.h \
$(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \ $(srcdir)/cselib.h $(srcdir)/basic-block.h $(srcdir)/cgraph.h \
......
...@@ -5518,8 +5518,8 @@ reposition_prologue_and_epilogue_notes (rtx f ATTRIBUTE_UNUSED) ...@@ -5518,8 +5518,8 @@ reposition_prologue_and_epilogue_notes (rtx f ATTRIBUTE_UNUSED)
void void
reset_block_changes (void) reset_block_changes (void)
{ {
VARRAY_TREE_INIT (cfun->ib_boundaries_block, 100, "ib_boundaries_block"); cfun->ib_boundaries_block = VEC_alloc (tree, gc, 100);
VARRAY_PUSH_TREE (cfun->ib_boundaries_block, NULL_TREE); VEC_quick_push (tree, cfun->ib_boundaries_block, NULL_TREE);
} }
/* Record the boundary for BLOCK. */ /* Record the boundary for BLOCK. */
...@@ -5535,13 +5535,12 @@ record_block_change (tree block) ...@@ -5535,13 +5535,12 @@ record_block_change (tree block)
if(!cfun->ib_boundaries_block) if(!cfun->ib_boundaries_block)
return; return;
last_block = VARRAY_TOP_TREE (cfun->ib_boundaries_block); last_block = VEC_pop (tree, cfun->ib_boundaries_block);
VARRAY_POP (cfun->ib_boundaries_block);
n = get_max_uid (); n = get_max_uid ();
for (i = VARRAY_ACTIVE_SIZE (cfun->ib_boundaries_block); i < n; i++) for (i = VEC_length (tree, cfun->ib_boundaries_block); i < n; i++)
VARRAY_PUSH_TREE (cfun->ib_boundaries_block, last_block); VEC_safe_push (tree, gc, cfun->ib_boundaries_block, last_block);
VARRAY_PUSH_TREE (cfun->ib_boundaries_block, block); VEC_safe_push (tree, gc, cfun->ib_boundaries_block, block);
} }
/* Finishes record of boundaries. */ /* Finishes record of boundaries. */
...@@ -5556,17 +5555,17 @@ check_block_change (rtx insn, tree *block) ...@@ -5556,17 +5555,17 @@ check_block_change (rtx insn, tree *block)
{ {
unsigned uid = INSN_UID (insn); unsigned uid = INSN_UID (insn);
if (uid >= VARRAY_ACTIVE_SIZE (cfun->ib_boundaries_block)) if (uid >= VEC_length (tree, cfun->ib_boundaries_block))
return; return;
*block = VARRAY_TREE (cfun->ib_boundaries_block, uid); *block = VEC_index (tree, cfun->ib_boundaries_block, uid);
} }
/* Releases the ib_boundaries_block records. */ /* Releases the ib_boundaries_block records. */
void void
free_block_changes (void) free_block_changes (void)
{ {
cfun->ib_boundaries_block = NULL; VEC_free (tree, gc, cfun->ib_boundaries_block);
} }
/* Returns the name of the current function. */ /* Returns the name of the current function. */
......
...@@ -346,7 +346,7 @@ struct function GTY(()) ...@@ -346,7 +346,7 @@ struct function GTY(())
location_t function_end_locus; location_t function_end_locus;
/* Array mapping insn uids to blocks. */ /* Array mapping insn uids to blocks. */
struct varray_head_tag *ib_boundaries_block; VEC(tree,gc) *ib_boundaries_block;
/* The variables unexpanded so far. */ /* The variables unexpanded so far. */
tree unexpanded_var_list; tree unexpanded_var_list;
......
...@@ -893,7 +893,7 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency, ...@@ -893,7 +893,7 @@ copy_cfg_body (copy_body_data * id, gcov_type count, int frequency,
*new_cfun = *DECL_STRUCT_FUNCTION (callee_fndecl); *new_cfun = *DECL_STRUCT_FUNCTION (callee_fndecl);
new_cfun->cfg = NULL; new_cfun->cfg = NULL;
new_cfun->decl = new_fndecl = copy_node (callee_fndecl); new_cfun->decl = new_fndecl = copy_node (callee_fndecl);
new_cfun->ib_boundaries_block = (varray_type) 0; new_cfun->ib_boundaries_block = NULL;
DECL_STRUCT_FUNCTION (new_fndecl) = new_cfun; DECL_STRUCT_FUNCTION (new_fndecl) = new_cfun;
push_cfun (new_cfun); push_cfun (new_cfun);
init_empty_tree_cfg (); init_empty_tree_cfg ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment