diff mbox

VEC re-write [patch 12/25]

Message ID 20121115215354.34686C0916@torture.tor.corp.google.com
State New
Headers show

Commit Message

Diego Novillo Nov. 15, 2012, 9:53 p.m. UTC
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.

Comments

Ian Lance Taylor Nov. 16, 2012, 11:19 p.m. UTC | #1
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. UTC | #2
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
diff mbox

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);