Commit 8019538f by Ian Lance Taylor Committed by Ian Lance Taylor

vec.h (VEC_stack_alloc): Define different version if GATHER_STATISTICS is defined...

	* 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.

From-SVN: r148562
parent 9fdcbf40
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> 2009-06-16 H.J. Lu <hongjiu.lu@intel.com>
* config.gcc (extra_headers): Add ia32intrin.h for x86. * config.gcc (extra_headers): Add ia32intrin.h for x86.
......
...@@ -1229,9 +1229,15 @@ extern void *vec_stack_o_reserve_exact (void *, int, size_t, size_t ...@@ -1229,9 +1229,15 @@ extern void *vec_stack_o_reserve_exact (void *, int, size_t, size_t
MEM_STAT_DECL); MEM_STAT_DECL);
extern void vec_stack_free (void *); 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) \ #define VEC_stack_alloc(T,alloc) \
(VEC_OP (T,stack,alloc1) \ (VEC_OP (T,stack,alloc1) \
(alloc, XALLOCAVAR (VEC(T,stack), VEC_embedded_size (T, alloc)))) (alloc, XALLOCAVAR (VEC(T,stack), VEC_embedded_size (T, alloc))))
#endif
#define DEF_VEC_ALLOC_P_STACK(T) \ #define DEF_VEC_ALLOC_P_STACK(T) \
VEC_TA(T,base,stack); \ VEC_TA(T,base,stack); \
...@@ -1241,7 +1247,7 @@ struct vec_swallow_trailing_semi ...@@ -1241,7 +1247,7 @@ struct vec_swallow_trailing_semi
#define DEF_VEC_ALLOC_FUNC_P_STACK(T) \ #define DEF_VEC_ALLOC_FUNC_P_STACK(T) \
static inline VEC(T,stack) *VEC_OP (T,stack,alloc1) \ 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); \
} }
...@@ -1254,7 +1260,7 @@ struct vec_swallow_trailing_semi ...@@ -1254,7 +1260,7 @@ struct vec_swallow_trailing_semi
#define DEF_VEC_ALLOC_FUNC_O_STACK(T) \ #define DEF_VEC_ALLOC_FUNC_O_STACK(T) \
static inline VEC(T,stack) *VEC_OP (T,stack,alloc1) \ 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); \
} }
...@@ -1267,7 +1273,7 @@ struct vec_swallow_trailing_semi ...@@ -1267,7 +1273,7 @@ struct vec_swallow_trailing_semi
#define DEF_VEC_ALLOC_FUNC_I_STACK(T) \ #define DEF_VEC_ALLOC_FUNC_I_STACK(T) \
static inline VEC(T,stack) *VEC_OP (T,stack,alloc1) \ 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); \
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment