This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] gcc::context creation
- From: Nathan Sidwell <nathan at acm dot org>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Biener <richard dot guenther at gmail dot com>, Martin Liška <mliska at suse dot cz>
- Date: Mon, 5 Jun 2017 06:57:47 -0400
- Subject: Re: [PATCH] gcc::context creation
- Authentication-results: sourceware.org; auth=none
- References: <email@example.com> <firstname.lastname@example.org> <20170524105728.GZ8499@tucnak> <email@example.com> <20170524115731.GE8499@tucnak> <firstname.lastname@example.org> <20170605094603.GB2154@tucnak>
On 06/05/2017 05:46 AM, Jakub Jelinek wrote:
Here is a patch to implement that. I chose to keep the 3 dumps predefined
dumps and just tweak their registered number, otherwise the changes would be
Yeah, that can wait for another day.
The patch additionally renames TDI_generic to TDI_gimple (to match
the dump name and content) and because we have more than 256 dumps these
days and we register them all even at -O0, the patch avoids 4 unnecessary
reallocations. Ok for trunk if testing passes?
LGTM, two nits below. (I can't approve though)
+/* Allow languages and middle-end to register their dumps before the
+ optimization passes. */
blank line needed here, I think?
+ lang_hooks.register_dumps (this);
+ /* If this assert fails, some FE registered more than
+ FIRST_ME_AUTO_NUMBERED_DUMP - FIRST_AUTO_NUMBERED_DUMP
+ dump files. Bump FIRST_ME_AUTO_NUMBERED_DUMP accordingly. */
+ gcc_assert (m_next_dump <= FIRST_ME_AUTO_NUMBERED_DUMP);
+ if (m_next_dump < FIRST_ME_AUTO_NUMBERED_DUMP)
+ m_next_dump = FIRST_ME_AUTO_NUMBERED_DUMP;
Unconditionally set it? there's the protecting assert. It's almost as
if you want 'else gcc_unreachable ()' (with suitable morph of < to <=).