Patchwork VEC re-write [patch 12/25]

login
register
mail settings
Submitter Diego Novillo
Date Nov. 15, 2012, 9:53 p.m.
Message ID <20121115215354.34686C0916@torture.tor.corp.google.com>
Download mbox | patch
Permalink /patch/199427/
State New
Headers show

Comments

Diego Novillo - Nov. 15, 2012, 9:53 p.m.
2012-11-15  Diego Novillo  <dnovillo@google.com>

	Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)

	* config/bfin/bfin.c: Use new vec API in vec.h.
Ian Taylor - Nov. 16, 2012, 11:19 p.m.
On Thu, Nov 15, 2012 at 1:53 PM, Diego Novillo <dnovillo@google.com> wrote:
> 2012-11-15  Diego Novillo  <dnovillo@google.com>
>
>         Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
>
>         * config/bfin/bfin.c: Use new vec API in vec.h.

I think that changes like this count as obvious and do not require
separate approval if the rest of the patches are approved.

Ian
Jeff Law - Nov. 16, 2012, 11:28 p.m.
On 11/16/2012 04:19 PM, Ian Lance Taylor wrote:
> On Thu, Nov 15, 2012 at 1:53 PM, Diego Novillo <dnovillo@google.com> wrote:
>> 2012-11-15  Diego Novillo  <dnovillo@google.com>
>>
>>          Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
>>
>>          * config/bfin/bfin.c: Use new vec API in vec.h.
>
> I think that changes like this count as obvious and do not require
> separate approval if the rest of the patches are approved.
Agreed.
jeff

Patch

diff --git a/gcc/config/bfin/bfin.c b/gcc/config/bfin/bfin.c
index 2c01cf7..f2d8473 100644
--- a/gcc/config/bfin/bfin.c
+++ b/gcc/config/bfin/bfin.c
@@ -3480,8 +3480,8 @@  hwloop_optimize (hwloop_info loop)
       insn = BB_END (loop->incoming_src);
       /* 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))
+      if (vec_safe_length (loop->incoming) > 1
+	  || !(loop->incoming->last ()->flags & EDGE_FALLTHRU))
 	{
 	  gcc_assert (JUMP_P (insn));
 	  insn = PREV_INSN (insn);
@@ -3749,8 +3749,8 @@  hwloop_optimize (hwloop_info loop)
   if (loop->incoming_src)
     {
       rtx prev = BB_END (loop->incoming_src);
-      if (VEC_length (edge, loop->incoming) > 1
-	  || !(VEC_last (edge, loop->incoming)->flags & EDGE_FALLTHRU))
+      if (vec_safe_length (loop->incoming) > 1
+	  || !(loop->incoming->last ()->flags & EDGE_FALLTHRU))
 	{
 	  gcc_assert (JUMP_P (prev));
 	  prev = PREV_INSN (prev);