diff gcc/insn-addr.h @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents a06113de4d67
children 84e7813d76e9
line wrap: on
line diff
--- a/gcc/insn-addr.h	Sun Aug 21 07:07:55 2011 +0900
+++ b/gcc/insn-addr.h	Fri Oct 27 22:46:09 2017 +0900
@@ -1,5 +1,5 @@
 /* Macros to support INSN_ADDRESSES
-   Copyright (C) 2000, 2007 Free Software Foundation, Inc.
+   Copyright (C) 2000-2017 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -20,27 +20,25 @@
 #ifndef GCC_INSN_ADDR_H
 #define GCC_INSN_ADDR_H
 
-#include "vecprim.h"
-
-extern VEC(int,heap) *insn_addresses_;
+extern vec<int> insn_addresses_;
 extern int insn_current_address;
 
-#define INSN_ADDRESSES(id) (*&(VEC_address (int, insn_addresses_) [id]))
+#define INSN_ADDRESSES(id) (insn_addresses_[id])
 #define INSN_ADDRESSES_ALLOC(size)			\
   do							\
     {							\
-      insn_addresses_ = VEC_alloc (int, heap, size);	\
-      VEC_safe_grow (int, heap, insn_addresses_, size);	\
-      memset (VEC_address (int, insn_addresses_),	\
+      insn_addresses_.create (size);			\
+      insn_addresses_.safe_grow_cleared (size);		\
+      memset (insn_addresses_.address (),		\
 	      0, sizeof (int) * size);			\
     }							\
   while (0)
-#define INSN_ADDRESSES_FREE() (VEC_free (int, heap, insn_addresses_))
-#define INSN_ADDRESSES_SET_P() (insn_addresses_ != 0)
-#define INSN_ADDRESSES_SIZE() (VEC_length (int, insn_addresses_))
+#define INSN_ADDRESSES_FREE() (insn_addresses_.release ())
+#define INSN_ADDRESSES_SET_P() (insn_addresses_.exists ())
+#define INSN_ADDRESSES_SIZE() (insn_addresses_.length ())
 
 static inline void
-insn_addresses_new (rtx insn, int insn_addr)
+insn_addresses_new (rtx_insn *insn, int insn_addr)
 {
   unsigned insn_uid = INSN_UID ((insn));
 
@@ -50,8 +48,8 @@
       if (size <= insn_uid)
 	{
 	  int *p;
-	  VEC_safe_grow (int, heap, insn_addresses_, insn_uid + 1);
-	  p = VEC_address (int, insn_addresses_);
+	  insn_addresses_.safe_grow (insn_uid + 1);
+	  p = insn_addresses_.address ();
 	  memset (&p[size],
 		  0, sizeof (int) * (insn_uid + 1 - size));
 	}