Bernd (or any other bfin/c6x users), would you have some free cycles to test the cxx-conversion branch on bfin and c6x?

I needed to make a couple of mechanical changes to some VEC_* calls (patch attached). To build, you simply need to:

$ svn co ssh://gcc.gnu.org/svn/gcc/branches/cxx-conversion

and build the two targets. There are no functional changes in the branch, so everything should work as in trunk.


Thanks.  Diego.
commit 46224d791738dc036c4f747f940633ec8520b2da
Author: dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Sun Aug 12 18:42:52 2012 +0000

    2012-08-12  Diego Novillo  <dnovi...@google.com>
    
        * config/bfin/bfin.c (hwloop_optimize): Update some calls to
        VEC_* for vectors of non-pointers.
        * config/c6x/c6x.c (try_rename_operands): Likewise.
        (reshuffle_units): Likewise.
        * config/mips/mips.c (mips_multi_start): Likewise.
        (mips_multi_add): Likewise.
        (mips_multi_copy_insn): Likewise.
        (mips_multi_set_operand): Likewise.
        * hw-doloop.c (discover_loop): Likewise.
        (discover_loops): Likewise.
        (reorg_loops): Likewise.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/cxx-conversion@190329 
138bc75d-0d04-0410-961f-82ee72b054a4

diff --git a/gcc/ChangeLog.cxx-conversion b/gcc/ChangeLog.cxx-conversion
index 51dde17..e633c36 100644
--- a/gcc/ChangeLog.cxx-conversion
+++ b/gcc/ChangeLog.cxx-conversion
@@ -1,3 +1,17 @@
+2012-08-12  Diego Novillo  <dnovi...@google.com>
+
+       * config/bfin/bfin.c (hwloop_optimize): Update some calls to 
+       VEC_* for vectors of non-pointers.
+       * config/c6x/c6x.c (try_rename_operands): Likewise.
+       (reshuffle_units): Likewise.
+       * config/mips/mips.c (mips_multi_start): Likewise.
+       (mips_multi_add): Likewise.
+       (mips_multi_copy_insn): Likewise.
+       (mips_multi_set_operand): Likewise.
+       * hw-doloop.c (discover_loop): Likewise.
+       (discover_loops): Likewise.
+       (reorg_loops): Likewise.
+
 2012-08-11   Diego Novillo  <dnovi...@google.com>
 
        Merge from trunk rev 190300.
diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 3a4b8af..0a0d702 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -3478,7 +3478,7 @@ hwloop_optimize (hwloop_info loop)
       /* If we have to insert the LSETUP before a jump, count that jump in the
         length.  */
       if (VEC_length (edge, loop->incoming) > 1
-         || !(VEC_last (edge, loop->incoming)->flags & EDGE_FALLTHRU))
+         || !(VEC_last (edge, loop->incoming).flags & EDGE_FALLTHRU))
        {
          gcc_assert (JUMP_P (insn));
          insn = PREV_INSN (insn);
@@ -3747,7 +3747,7 @@ hwloop_optimize (hwloop_info loop)
     {
       rtx prev = BB_END (loop->incoming_src);
       if (VEC_length (edge, loop->incoming) > 1
-         || !(VEC_last (edge, loop->incoming)->flags & EDGE_FALLTHRU))
+         || !(VEC_last (edge, loop->incoming).flags & EDGE_FALLTHRU))
        {
          gcc_assert (JUMP_P (prev));
          prev = PREV_INSN (prev);
diff --git a/gcc/config/c6x/c6x.c b/gcc/config/c6x/c6x.c
index a189a1d..1905504 100644
--- a/gcc/config/c6x/c6x.c
+++ b/gcc/config/c6x/c6x.c
@@ -126,7 +126,7 @@ DEF_VEC_ALLOC_O(c6x_sched_insn_info, heap);
 static VEC(c6x_sched_insn_info, heap) *insn_info;
 
 #define INSN_INFO_LENGTH (VEC_length (c6x_sched_insn_info, insn_info))
-#define INSN_INFO_ENTRY(N) (*VEC_index (c6x_sched_insn_info, insn_info, (N)))
+#define INSN_INFO_ENTRY(N) (VEC_index (c6x_sched_insn_info, insn_info, (N)))
 
 static bool done_cfi_sections;
 
@@ -3448,8 +3448,8 @@ try_rename_operands (rtx head, rtx tail, unit_req_table 
reqs, rtx insn,
     {
       unsigned int mask1, mask2, mask_changed;
       int count, side1, side2, req1, req2;
-      insn_rr_info *this_rr = VEC_index (insn_rr_info, insn_rr,
-                                        INSN_UID (chain->insn));
+      insn_rr_info *this_rr = &VEC_index (insn_rr_info, insn_rr,
+                                         INSN_UID (chain->insn));
 
       count = get_unit_reqs (chain->insn, &req1, &side1, &req2, &side2);
 
@@ -3555,7 +3555,7 @@ reshuffle_units (basic_block loop)
       if (!get_unit_operand_masks (insn, &mask1, &mask2))
        continue;
 
-      info = VEC_index (insn_rr_info, insn_rr, INSN_UID (insn));
+      info = &VEC_index (insn_rr_info, insn_rr, INSN_UID (insn));
       if (info->op_info == NULL)
        continue;
 
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index f36f65b..3688136 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -3971,7 +3971,8 @@ mips_multi_start (void)
 static struct mips_multi_member *
 mips_multi_add (void)
 {
-  return VEC_safe_push (mips_multi_member, heap, mips_multi_members, 0);
+  return VEC_safe_push (mips_multi_member, heap, mips_multi_members,
+                       (struct mips_multi_member *) 0);
 }
 
 /* Add a normal insn with the given asm format to the current multi-insn
@@ -4026,7 +4027,7 @@ mips_multi_copy_insn (unsigned int i)
   struct mips_multi_member *member;
 
   member = mips_multi_add ();
-  memcpy (member, VEC_index (mips_multi_member, mips_multi_members, i),
+  memcpy (member, &VEC_index (mips_multi_member, mips_multi_members, i),
          sizeof (*member));
   gcc_assert (!member->is_label_p);
 }
@@ -4038,7 +4039,7 @@ mips_multi_copy_insn (unsigned int i)
 static void
 mips_multi_set_operand (unsigned int i, unsigned int op, rtx x)
 {
-  VEC_index (mips_multi_member, mips_multi_members, i)->operands[op] = x;
+  VEC_index (mips_multi_member, mips_multi_members, i).operands[op] = x;
 }
 
 /* Write out the asm code for the current multi-insn sequence.  */
diff --git a/gcc/hw-doloop.c b/gcc/hw-doloop.c
index 925039f..cd9b3f2 100644
--- a/gcc/hw-doloop.c
+++ b/gcc/hw-doloop.c
@@ -345,12 +345,12 @@ discover_loop (hwloop_info loop, basic_block tail_bb, rtx 
tail_insn, rtx reg)
 }
 
 /* Analyze the structure of the loops in the current function.  Use
-   STACK for bitmap allocations.  Returns all the valid candidates for
+   LOOP_STACK for bitmap allocations.  Returns all the valid candidates for
    hardware loops found in this function.  HOOKS is the argument
    passed to reorg_loops, used here to find the iteration registers
    from a loop_end pattern.  */
 static hwloop_info
-discover_loops (bitmap_obstack *stack, struct hw_doloop_hooks *hooks)
+discover_loops (bitmap_obstack *loop_stack, struct hw_doloop_hooks *hooks)
 {
   hwloop_info loops = NULL;
   hwloop_info loop;
@@ -406,7 +406,7 @@ discover_loops (bitmap_obstack *stack, struct 
hw_doloop_hooks *hooks)
       loops = loop;
       loop->loop_no = nloops++;
       loop->blocks = VEC_alloc (basic_block, heap, 20);
-      loop->block_bitmap = BITMAP_ALLOC (stack);
+      loop->block_bitmap = BITMAP_ALLOC (loop_stack);
 
       if (dump_file)
        {
@@ -626,18 +626,18 @@ reorg_loops (bool do_reorder, struct hw_doloop_hooks 
*hooks)
 {
   hwloop_info loops = NULL;
   hwloop_info loop;
-  bitmap_obstack stack;
+  bitmap_obstack loop_stack;
 
   df_live_add_problem ();
   df_live_set_all_dirty ();
   df_analyze ();
 
-  bitmap_obstack_initialize (&stack);
+  bitmap_obstack_initialize (&loop_stack);
 
   if (dump_file)
     fprintf (dump_file, ";; Find loops, first pass\n\n");
 
-  loops = discover_loops (&stack, hooks);
+  loops = discover_loops (&loop_stack, hooks);
 
   if (do_reorder)
     {
@@ -647,7 +647,7 @@ reorg_loops (bool do_reorder, struct hw_doloop_hooks *hooks)
       if (dump_file)
        fprintf (dump_file, ";; Find loops, second pass\n\n");
 
-      loops = discover_loops (&stack, hooks);
+      loops = discover_loops (&loop_stack, hooks);
     }
 
   for (loop = loops; loop; loop = loop->next)

Reply via email to