OSDN Git Service

* Makefile.in (GTFILES): Move functions.h after tree.h.
authorkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Apr 2006 17:20:22 +0000 (17:20 +0000)
committerkazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 12 Apr 2006 17:20:22 +0000 (17:20 +0000)
* 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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@112894 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/Makefile.in
gcc/function.c
gcc/function.h
gcc/tree-inline.c

index d540abd..63ddbf5 100644 (file)
@@ -9,6 +9,15 @@
        first_partition to VEC(int,heap) *.
        (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>
 
        * expr.c (emit_group_store): Correct operand order in call to
index 67fdd77..68db99c 100644 (file)
@@ -2803,8 +2803,8 @@ s-constrs-h: $(MD_DEPS) build/genpreds$(build_exeext)
 GTFILES = $(srcdir)/input.h $(srcdir)/coretypes.h \
   $(CPP_ID_DATA_H) $(host_xm_file_list) \
   $(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
-  $(srcdir)/coverage.c $(srcdir)/function.h $(srcdir)/rtl.h \
-  $(srcdir)/optabs.h $(srcdir)/tree.h $(srcdir)/libfuncs.h $(SYMTAB_H) \
+  $(srcdir)/coverage.c $(srcdir)/rtl.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)/ipa-reference.h $(srcdir)/output.h \
   $(srcdir)/cselib.h $(srcdir)/basic-block.h  $(srcdir)/cgraph.h \
index ecdf282..26c99fa 100644 (file)
@@ -5518,8 +5518,8 @@ reposition_prologue_and_epilogue_notes (rtx f ATTRIBUTE_UNUSED)
 void
 reset_block_changes (void)
 {
-  VARRAY_TREE_INIT (cfun->ib_boundaries_block, 100, "ib_boundaries_block");
-  VARRAY_PUSH_TREE (cfun->ib_boundaries_block, NULL_TREE);
+  cfun->ib_boundaries_block = VEC_alloc (tree, gc, 100);
+  VEC_quick_push (tree, cfun->ib_boundaries_block, NULL_TREE);
 }
 
 /* Record the boundary for BLOCK.  */
@@ -5535,13 +5535,12 @@ record_block_change (tree block)
   if(!cfun->ib_boundaries_block)
     return;
 
-  last_block = VARRAY_TOP_TREE (cfun->ib_boundaries_block);
-  VARRAY_POP (cfun->ib_boundaries_block);
+  last_block = VEC_pop (tree, cfun->ib_boundaries_block);
   n = get_max_uid ();
-  for (i = VARRAY_ACTIVE_SIZE (cfun->ib_boundaries_block); i < n; i++)
-    VARRAY_PUSH_TREE (cfun->ib_boundaries_block, last_block);
+  for (i = VEC_length (tree, cfun->ib_boundaries_block); i < n; i++)
+    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.  */
@@ -5556,17 +5555,17 @@ check_block_change (rtx insn, tree *block)
 {
   unsigned uid = INSN_UID (insn);
 
-  if (uid >= VARRAY_ACTIVE_SIZE (cfun->ib_boundaries_block))
+  if (uid >= VEC_length (tree, cfun->ib_boundaries_block))
     return;
 
-  *block = VARRAY_TREE (cfun->ib_boundaries_block, uid);
+  *block = VEC_index (tree, cfun->ib_boundaries_block, uid);
 }
 
 /* Releases the ib_boundaries_block records.  */
 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.  */
index 282e04c..859709f 100644 (file)
@@ -346,7 +346,7 @@ struct function GTY(())
   location_t function_end_locus;
 
   /* Array mapping insn uids to blocks.  */
-  struct varray_head_tag *ib_boundaries_block;
+  VEC(tree,gc) *ib_boundaries_block;
 
   /* The variables unexpanded so far.  */
   tree unexpanded_var_list;
index 3e35842..a6ee6ed 100644 (file)
@@ -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->cfg = NULL;
       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;
       push_cfun (new_cfun);
       init_empty_tree_cfg ();