This is the mail archive of the
mailing list for the GCC project.
Re: [patch] Privatize gimplify_ctx structure.
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Trevor Saunders <tsaunders at mozilla dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 20 Nov 2013 16:51:48 +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>
On Wed, Nov 20, 2013 at 4:06 PM, Trevor Saunders <firstname.lastname@example.org> wrote:
> On Wed, Nov 20, 2013 at 03:18:07PM +0100, Richard Biener wrote:
>> On Wed, Nov 20, 2013 at 3:16 PM, Jakub Jelinek <email@example.com> wrote:
>> > On Wed, Nov 20, 2013 at 03:12:34PM +0100, Richard Biener wrote:
>> >> The limit looks reasonable, but you could have used a simple linked
>> >> list (and never free). Also being able to pop a random context
>> >> looks fragile ... that is, pop_gimplify_context shouldn't have an argument.
>> > Can't we use stack_vec<gimplify_context, 30> for that? Though that would
>> > mean a global var constructor and destructor, so alternatively just use
>> > a normal vec and .create(30) it somewhere during initialization?
>> only with gimplify_context *, otherwise things will break during re-allocation.
> hm? it seems like the only member of gimplify_ctx that can't just be
> memcpyd is the prev pointer which presumably could go away if you have a
> vec of all the contexts.
Callers have a pointer to gimplify_context AFAIK.
>> > Jakub