OSDN Git Service

* vec.h (VEC_stack_alloc): Define different version if
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jun 2009 00:10:23 +0000 (00:10 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 17 Jun 2009 00:10:23 +0000 (00:10 +0000)
GATHER_STATISTICS is defined, to accept and ignore MEM_STAT.
(DEF_VEC_ALLOC_FUNC_P_STACK): Remove MEM_STAT_DECL.
(DEF_VEC_ALLOC_FUNC_O_STACK): Likewise.
(DEF_VEC_ALLOC_FUNC_I_STACK): Likewise.

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

gcc/ChangeLog
gcc/vec.h

index 67f67ea..c7d5a93 100644 (file)
@@ -1,3 +1,11 @@
+2009-06-16  Ian Lance Taylor  <iant@google.com>
+
+       * vec.h (VEC_stack_alloc): Define different version if
+       GATHER_STATISTICS is defined, to accept and ignore MEM_STAT.
+       (DEF_VEC_ALLOC_FUNC_P_STACK): Remove MEM_STAT_DECL.
+       (DEF_VEC_ALLOC_FUNC_O_STACK): Likewise.
+       (DEF_VEC_ALLOC_FUNC_I_STACK): Likewise.
+
 2009-06-16  H.J. Lu  <hongjiu.lu@intel.com>
 
        * config.gcc (extra_headers): Add ia32intrin.h for x86.
index d408c6d..d16fdaa 100644 (file)
--- a/gcc/vec.h
+++ b/gcc/vec.h
@@ -1229,9 +1229,15 @@ extern void *vec_stack_o_reserve_exact (void *, int, size_t, size_t
                                         MEM_STAT_DECL);
 extern void vec_stack_free (void *);
 
+#ifdef GATHER_STATISTICS
+#define VEC_stack_alloc(T,alloc,name,line,function)                      \
+  (VEC_OP (T,stack,alloc1)                                               \
+   (alloc, XALLOCAVAR (VEC(T,stack), VEC_embedded_size (T, alloc))))
+#else
 #define VEC_stack_alloc(T,alloc)                                         \
   (VEC_OP (T,stack,alloc1)                                               \
    (alloc, XALLOCAVAR (VEC(T,stack), VEC_embedded_size (T, alloc))))
+#endif
 
 #define DEF_VEC_ALLOC_P_STACK(T)                                         \
 VEC_TA(T,base,stack);                                                    \
@@ -1241,9 +1247,9 @@ struct vec_swallow_trailing_semi
 
 #define DEF_VEC_ALLOC_FUNC_P_STACK(T)                                    \
 static inline VEC(T,stack) *VEC_OP (T,stack,alloc1)                      \
-     (int alloc_, VEC(T,stack)* space MEM_STAT_DECL)                     \
+     (int alloc_, VEC(T,stack)* space)                                   \
 {                                                                        \
-   return (VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space); \
+  return (VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space);   \
 }
 
 #define DEF_VEC_ALLOC_O_STACK(T)                                         \
@@ -1254,9 +1260,9 @@ struct vec_swallow_trailing_semi
 
 #define DEF_VEC_ALLOC_FUNC_O_STACK(T)                                    \
 static inline VEC(T,stack) *VEC_OP (T,stack,alloc1)                      \
-     (int alloc_, VEC(T,stack)* space MEM_STAT_DECL)                     \
+     (int alloc_, VEC(T,stack)* space)                                   \
 {                                                                        \
-  return ((VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space); \
+  return ((VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space);          \
 }
 
 #define DEF_VEC_ALLOC_I_STACK(T)                                         \
@@ -1267,9 +1273,9 @@ struct vec_swallow_trailing_semi
 
 #define DEF_VEC_ALLOC_FUNC_I_STACK(T)                                    \
 static inline VEC(T,stack) *VEC_OP (T,stack,alloc1)                      \
-     (int alloc_, VEC(T,stack)* space MEM_STAT_DECL)                     \
+     (int alloc_, VEC(T,stack)* space)                                   \
 {                                                                        \
-  return ((VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space); \
+  return ((VEC(T,stack) *) vec_stack_p_reserve_exact_1 (alloc_, space);   \
 }
 
 #endif /* GCC_VEC_H */