This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] Privatize gimplify_ctx structure.
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Andrew MacLeod <amacleod at redhat dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, Trevor Saunders <tsaunders at mozilla dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 Nov 2013 19:43:46 +0100
- Subject: Re: [patch] Privatize gimplify_ctx structure.
- Authentication-results: sourceware.org; auth=none
- References: <528CBAA0 dot 5060801 at redhat dot com> <CAFiYyc00hQJL3t2S8hw96HC+tp9T6B8mcFzTXQduaQG5F8nQag at mail dot gmail dot com> <20131120141658 dot GJ892 at tucnak dot redhat dot com> <CAFiYyc0HO3vMrLjCUa+TcoC54xd9LH+bEETBLGgSyrJRJEh_EA at mail dot gmail dot com> <20131120150622 dot GA19586 at tsaunders-iceball dot corp dot tor1 dot mozilla dot com> <CAFiYyc0a+Mn+Cr6Hqv1LMc0H_s1YV+JOyV_-2aQTKch74DeTPQ at mail dot gmail dot com> <528CE3BA dot 7010105 at redhat dot com> <528CE7AE dot 4020502 at redhat dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Nov 20, 2013 at 11:47:42AM -0500, Andrew MacLeod wrote:
> + static inline struct gimplify_ctx *
> + ctx_alloc (void)
> + {
> + struct gimplify_ctx * c = ctx_pool;
> +
> + if (c)
> + ctx_pool = c->prev_context;
> + else
> + c = (struct gimplify_ctx *) xmalloc (sizeof (struct gimplify_ctx));
Use
c = XNEW (struct gimplify_ctx);
instead?
Jakub